History log of /system/core/sdcard/sdcard.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c336f86284ee817a2e846452ad80e5d014d11414 18-Jan-2018 Daniel Rosenberg <drosen@google.com> Add support for esdfs mounting

If sdcardfs is turned off, try mounting esdfs.

Test: Override ro.sys.sdcardfs to be false, or run
sm set-sdcardfs off. If the kernel contains
esdfs, it will use it.
Bug: 63876697
Change-Id: I4db8bf336743edf62edfae41d753b1e3af163950
/system/core/sdcard/sdcard.cpp
68e1093028185cde31dcacf34a59f6c08848d3d4 08-Jan-2018 Jeff Sharkey <jsharkey@android.com> Remove FUSE logic; it's only a sdcardfs wrapper.

Leaving the FUSE logic intact was confusing to OEMs, who expected
that it would still work and pass CTS. Remove all the FUSE logic
and leave a comment block about why the wrapper exists.

Also use new Android.bp makefile format.

Test: builds, boots
Bug: 63524725
Change-Id: I8b2a4fa0227109d65689c43302dc6fa40394ff58
/system/core/sdcard/sdcard.cpp
e2e3610e6e76b782b77e79581a26f4c2fb619d9d 08-Jan-2018 Jeff Sharkey <jsharkey@android.com> Add "default_normal" support for sdcardfs.

Also cleans up fallback-retry logic for older kernels by
progressively removing each newer flag with each retry.

Test: internal CTS
Bug: 64672411
Change-Id: I3de3b64b68838fb2ef4505fe73c4e9865b2f9026
/system/core/sdcard/sdcard.cpp
9813914a3b5b7010bcb8d70df2b383aa9839e976 15-Sep-2017 Rom Lemarchand <romlem@google.com> Revert "Revert "Add derive_gid flag for mounting sdcardfs""

This reverts commit 28dbcaa23bde48fba22c9b7874f659de2630148c.

Reason for revert: All kernel prebuilts merged

(cherry picked from commit ac8dc7e76fe015786fafaf508620db78ef21cf4e)

Bug: 65600849
Bug: 65573871
Test: m
Change-Id: Ib3cae2908c9e8f2b69d8effe618a6f1ac94f44e2
/system/core/sdcard/sdcard.cpp
f09f965f9fe2c19a8b93d457a6a75a026be757b2 14-Sep-2017 Richard Uhler <ruhler@google.com> Revert "Add derive_gid flag for mounting sdcardfs"

This reverts commit 8ca02bbeb54bed3057414d12624da5a02fa4d3be.

Causes boot loop on bullhead.

(cherry picked from commit 28dbcaa23bde48fba22c9b7874f659de2630148c)

Bug: 63245673
Bug: 65660058
Test: m
Merged-In: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
Change-Id: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
/system/core/sdcard/sdcard.cpp
b7c118522f300cea3bc4044ff42e825ca5ed3ee2 07-Sep-2017 Daniel Rosenberg <drosen@google.com> Add derive_gid flag for mounting sdcardfs

Turns on the derive_gid feature for sdcardfs. This was moved
under a mount flag in the kernel.

Test: If the derive_gid flag is supported, the first mount
should succeed. If the flag is not, the second should
succeed.
Bug: 63245673
Change-Id: If1c1bce13d14120732e420252cb5605d33ce7c40
/system/core/sdcard/sdcard.cpp
cb4e1645626bc35ac90b794504c80ea2c33b22e2 30-Aug-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "sdcard: mute false compiler alarm"
1991ae94590bf6b6fc0a9f8afd4bb6cdac22668f 30-Aug-2017 Ting-Yuan Huang <laszio@google.com> sdcard: mute false compiler alarm

Clang static analyzer worries that strcpy to a field may overwrites
other fields. Use snprintf() instead.

Test: built without seeing the warning.

Change-Id: I75d8edf1353b5d052fd14a954362bd0632c258fa
/system/core/sdcard/sdcard.cpp
cd591813871902e27677d755160123b2a2454807 20-Mar-2017 Daniel Rosenberg <drosen@google.com> Make sdcardfs the default

This will cause devices to default to sdcardfs if the kernel
supports it.

Test: Booted a wiped device, ensured sdcardfs was enabled
Change-Id: Ibce012b841b78d37ade668a38e91dca74a637867
/system/core/sdcard/sdcard.cpp
fc592327a94dcfaac0f14b991ed7cab36c72551b 28-Oct-2016 Daniel Rosenberg <drosen@google.com> Switch sdcardfs over to bind mounts.

Sdcardfs has been modified to use bind mounts
in place of three separate mounts. This lowers
resource usage, and removes a number of race
conditions around updates via differnt views.

Test: Run storage cts tests with sdcardfs enabled
Change-Id: Icdc196ba3d6f46d54d27ef91c01ffebcf81dd47e
/system/core/sdcard/sdcard.cpp
d6b0d375490f9c31da0131582b7d77d1fdd79706 06-Oct-2016 Christopher Ferris <cferris@google.com> Small clean up of fuse code.

- Add TEMP_FAILURE_RETRY around all relevant system calls.
- Cleanup some of the read calls.
- Add error log messages when read/write calls do not actually read/write the
expected number of bytes.
- Add error messages for write failures in fuse_status/fuse_replay.

Test: Attached to the sdcard process and stepped through most of the modified
Test: code. Also, create/read/write/delete files in /storage/emulated/0
Test: directory.

Change-Id: I73e4c0db861960f4c0af1bf96b06cd61fa74be69
/system/core/sdcard/sdcard.cpp
9526819c7068266c1d063c7c4db039a534c7afff 27-Aug-2016 Daniel Rosenberg <drosen@google.com> sdcard: Fix bad merge

A few changes got dropped along merge resolution. This adds them back

Affected CLs:
Ie188cb044be2ad87166f2d43c32a1f6b97660de0
Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6

Change-Id: I1924f5a4bd7564ceaf9bb3a45b7fb7804b3619d7
/system/core/sdcard/sdcard.cpp
e157b253d4e8708779d8bad2e21929fedbe0168c 26-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> Fix sdcard logging.

Use C++ logging for everything.

Bug: 30222003
Change-Id: I5c5d85102b01df6965a515b59aa275ac85f50f00
/system/core/sdcard/sdcard.cpp
d6d8faa69068d92e0e4021fced181b448d4e8cbd 19-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> sdcard: Use std::map.

Having CaseInsensitiveCompare use strcasecomp is not ideal, but other
solutions are not prettier.

Also, add a TODO to fix FUSE_TRACE, broken by the switch to C++.

Bug: 27147273

Change-Id: I0017c3a7d0254eb81abd128b97cd06c5ad0d1dff
/system/core/sdcard/sdcard.cpp
bae15b4f46e2848b43b32a85f346ad2a3163240c 18-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> Use arraysize() for supplementary groups.

Also make adbd use ScopedMinijail.

Bug: 30191189
Change-Id: I5e259aa466817b51037912aba043ba75bd35f9e1
/system/core/sdcard/sdcard.cpp
c96f53e2fe7e67bd8a412575355e1b816f0aceaf 14-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> Use Minijail for privilege dropping.

Having so many copies of privilege-dropping code leads to errors.
De-duplicate this code and use Minijail for it.

Bug: 30156807

Change-Id: I36c85962b913a12efe5648a23cbacc5bcbb3853c
/system/core/sdcard/sdcard.cpp
c9e1710accb44dd95fc8e088f5139844e8d1268c 12-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> Use C++ logging in sdcard.cpp.

This gets rid of a bunch of "strerror(errno)" bits.
Will convert fuse.cpp after
https://android-review.googlesource.com/#/c/247780 lands.

Bug: 30110940

Change-Id: Iacefe5b6519b217ed687c709763fe5827b3b0b59
/system/core/sdcard/sdcard.cpp
c255f25ccb700880483c73d9ff823bf9540dd616 12-Jul-2016 Jorge Lucangeli Obes <jorgelo@google.com> Extract the FUSE implementation from the main sdcard.c file.

sdcard.c is a *really* big file. This makes it hard to do things like
improving priv dropping or adding more sandboxing. Extract all
FUSE-related code to a separate unit, fuse.{h|c}, which exports only
two functions. Convert the rest of sdcard.c to C++ as sdcard.cpp.
fuse.c is kept as C (at least for now) since interacting with the FUSE
API is realistically easier from C.

Bug: 30110940

Change-Id: I188bfdc21c184742117e07539adb09090d4d747c
/system/core/sdcard/sdcard.cpp