summaryrefslogtreecommitdiffstats
path: root/sdcard
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Switch sdcardfs over to bind mounts."Daniel Rosenberg2016-11-301-5/+25
|\ | | | | | | | | | | am: 94b9e4df04 Change-Id: I2dc89613d382ea5fd86bd1a1736310d3e8e49dbc
| * Switch sdcardfs over to bind mounts.Daniel Rosenberg2016-11-281-5/+25
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Use FUSE_COMPAT_22_INIT_OUT_SIZE always as the resopnse size of ↵Daichi Hirono2016-11-161-6/+3
|\| | | | | | | | | | | | | | | FUSE_INIT." am: 0673412bb9 Change-Id: I85e6be67fdd5285c2abc26a097301c7136a676f9
| * Use FUSE_COMPAT_22_INIT_OUT_SIZE always as the resopnse size of FUSE_INIT.Daichi Hirono2016-11-161-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We return the minor version number 15 to FUSE_INIT since we don't handle BATCH_FORGET. Thus the kernel does not accept the latest size of fuse_init_out. Instead we need to use FUSE_COMPAT_22_INIT_OUT_SIZE. Previously the code unintentionally used FUSE_COMPAT_22_INIT_OUT_SIZE always because we override the minor version out->minor to 15. Because sdcard.c shares the buffer for |in| and |out|, it overrides the version number of in->minnor as well. The if closure in the previous code "if (in->minor <= 22)" was always true. The CL removes the if closure to explicitly use FUSE_COMPAT_22_INIT_OUT_SIZE always. Bug: 32779923 Test: Manually boot Android and check if the storage shows up in Settings app. Change-Id: Ibbc50da7fb82be148acfc5f1a3d46fefbe211f9d
* | Merge "Small clean up of fuse code." am: 54c211db2e am: f620b87efeChristopher Ferris2016-10-102-44/+60
|\| | | | | | | | | | | am: c2eaefdd15 Change-Id: I800d48fb1d74531681cdcd35fcd3ea674e7c3025
| * Small clean up of fuse code.Christopher Ferris2016-10-072-44/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available am: 738e0dcf0aThierry Strudel2016-09-261-0/+17
|\ \ | |/ |/| | | | | | | am: 5f4db94228 Change-Id: I05fbf1cffb44595d354219b1753cd7c2b37e10db
| * [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if availableThierry Strudel2016-08-041-0/+17
| | | | | | | | | | | | | | | | | | | | Use a non yet maintainer reviewed kernel patch from QCOM that greatly improves IO speed in case it is available from the device specific kernel headers. Bug: 24216004 Bug: 30222859 Change-Id: I4101d80082c9ad9d042dde5c620ddb309d193d52
* | sdcard: Fix bad mergeDaniel Rosenberg2016-08-312-4/+105
| | | | | | | | | | | | | | | | | | | | A few changes got dropped along merge resolution. This adds them back Affected CLs: Ie188cb044be2ad87166f2d43c32a1f6b97660de0 Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6 Change-Id: I1924f5a4bd7564ceaf9bb3a45b7fb7804b3619d7
* | Fix one last use of TRACE().Jorge Lucangeli Obes2016-07-291-2/+2
| | | | | | | | | | | | Bug: 30222003 Change-Id: I3d0a29cb92e83416eb6851b54cb72886da4f7cf2 (cherry picked from commit a65f3e1a1fdaf2a23f0cea0d0aedee81117a6e1a)
* | Merge \"Fix sdcard logging.\"Jorge Lucangeli Obes2016-07-274-55/+54
|\ \ | | | | | | | | | | | | | | | am: 47b077a44f Change-Id: Ib0a0b5083d09d60bd0ee42bebcecced05b3645e5
| * | Fix sdcard logging.Jorge Lucangeli Obes2016-07-264-55/+54
| | | | | | | | | | | | | | | | | | | | | Use C++ logging for everything. Bug: 30222003 Change-Id: I5c5d85102b01df6965a515b59aa275ac85f50f00
* | | resolve merge conflicts of c6e22ba to stage-aosp-masterJorge Lucangeli Obes2016-07-212-36/+52
|\| | | | | | | | | | | Change-Id: I65550ff841d27f985a3ab8618ecdf4a3500fb0be
| * | sdcard: Fix compilation with FUSE_TRACE == 1.Jorge Lucangeli Obes2016-07-212-36/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "PRI{u,x}64" was not compiling on C++ because of macro expansions. Implement DLOG the same way DCHECK is implemented in <android-base/logging.h>, and mechanically replace the problematic lines with C++ logging. Remaining TRACE() lines will be replaced in a follow-up CL. Bug: 30222003 Change-Id: I377a91722eb4c035093fc96b79438c4f638b9a45
* | | Merge \"sdcard: Use std::map.\"Jorge Lucangeli Obes2016-07-203-30/+24
|\| | | | | | | | | | | | | | | | | am: c15ab6e2c6 Change-Id: Icacd305ffdf501ce6d7a6bbdd73d5f245575d804
| * | sdcard: Use std::map.Jorge Lucangeli Obes2016-07-193-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge \"Use arraysize() for supplementary groups.\"Jorge Lucangeli Obes2016-07-181-1/+2
|\| | | | | | | | | | | | | | | | | am: ddbcecec3a Change-Id: Ia8405d8bc181b1cdbf1f0812c0dbe8f7701747ef
| * | Use arraysize() for supplementary groups.Jorge Lucangeli Obes2016-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | | Also make adbd use ScopedMinijail. Bug: 30191189 Change-Id: I5e259aa466817b51037912aba043ba75bd35f9e1
* | | Merge \"Use Minijail for privilege dropping.\"Jorge Lucangeli Obes2016-07-182-11/+15
|\| | | | | | | | | | | | | | | | | am: 97f49e5cb3 Change-Id: I032ea3fcdac1a16bf36d43731b8533214264fee2
| * | Use Minijail for privilege dropping.Jorge Lucangeli Obes2016-07-152-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge \"Convert fuse.c to C++.\"Jorge Lucangeli Obes2016-07-143-63/+57
|\| | | | | | | | | | | | | | | | | am: a17427cb1e Change-Id: Ie112f67f724e511b6c8ffabd0db04f3e017132cc
| * | Merge "Convert fuse.c to C++."Treehugger Robot2016-07-143-63/+57
| |\ \
| | * | Convert fuse.c to C++.Jorge Lucangeli Obes2016-07-143-63/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix string literals and cast void* appropriately. Alternatively, we could switch some of the allocations to new/delete, but we would need to make sure that none of those end up passed to other code that will call free(3) on them. Bug: 30110940 Change-Id: I6f39df65cd960930530e5a1f8420a28d50adc25d
* | | | Merge \"Use C++ logging in sdcard.cpp.\"Jorge Lucangeli Obes2016-07-142-68/+61
|\| | | | | | | | | | | | | | | | | | | | | | | am: 2703425de8 Change-Id: I90103d0521bd2cd4de3710adf3bc6013721cb6f9
| * | | Use C++ logging in sdcard.cpp.Jorge Lucangeli Obes2016-07-142-68/+61
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | resolve merge conflicts of 1b9b273 to stage-aosp-masterJorge Lucangeli Obes2016-07-134-691/+625
|\| | | | | | | | | | | Change-Id: I12a541cb698d1df866b8be4dc1e35cb99e6f1e64
| * | Extract the FUSE implementation from the main sdcard.c file.Jorge Lucangeli Obes2016-07-134-564/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "enable integer sanitizer for sdcard service" am: 532ab82e10Nick Kralevich2016-05-061-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | am: 2f67f4687b * commit '2f67f4687b94bcead719d504ea4f77571ae84b3b': enable integer sanitizer for sdcard service Change-Id: Ib54476445c01a1f5bd6234aec66c7019939a3858
| * | enable integer sanitizer for sdcard serviceDaniel Micay2016-05-051-0/+3
| | | | | | | | | | | | | | | | | | | | | The previous false positive fix (df9c4a01) is enough to pass tests, and it doesn't appear that there are any remaining issues. Change-Id: Ib9812f1201ff0cd2ae8c8371737754fc328765b5
* | | Add support for FUSE_CANONICAL_PATHDaniel Rosenberg2016-04-261-0/+36
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | am: 2abee9e * commit '2abee9e063d1549fb006853b27f378c7d22192af': Add support for FUSE_CANONICAL_PATH Change-Id: I47a41bc0b5b3a013e59932cbf66ae6852e15b1c3
| * | Add support for FUSE_CANONICAL_PATHDaniel Rosenberg2016-04-251-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows inotify requests on FUSE to be alerted when any other stacked filesystem would trigger an inotify for the same file. Bug: 23904372 Change-Id: I4289b38230c314432eaf2c0d20d4ccefc058f59e
* | | Merge "sdcard: avoid benign unsigned overflow" am: 64461c2Treehugger Robot2016-04-261-1/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | am: 182b310 * commit '182b310b1de5654a93c21417c77722897b93882d': sdcard: avoid benign unsigned overflow Change-Id: I14e80911060bb609de5b91a4c56315cd701857f9
| * | sdcard: avoid benign unsigned overflowDaniel Micay2016-04-261-1/+2
| | | | | | | | | | | | Change-Id: Id9427b4e01602bba31f8958b8d491b092b31482b
| * | Merge commit '4352ee87fd74b931d4b58192fb8974e91aa899d0' into HEADBill Yi2016-02-171-0/+17
| |\ \
| | * \ Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-dev ↵Thierry Strudel2016-01-141-0/+17
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b84295d027 am: bbaa2b296a * commit 'bbaa2b296ad836e9d6511549661884d94b53ccee': [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
| | | * | [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if availableThierry Strudel2016-01-131-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a non yet maintainer reviewed kernel patch from QCOM that greatly improves IO speed in case it is available from the device specific kernel headers. Bug: 24216004 Change-Id: I4101d80082c9ad9d042dde5c620ddb309d193d52
| | | * | Re-derive permissions after package changes.Jeff Sharkey2015-12-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packages change, existing package-specific directories may have gained/lost a UID mapping, so we need to update the permissions for any in-memory nodes. This allows an app to deliver data for another package before that package is installed, which is the typical pattern of how OBB files are delivered. Also fix bug by re-deriving permissions when files are moved. Bug: 25399427 Change-Id: I06f38a24ad7dee5f5099ba81429aef03208e5683
* | | | | Merge "Fix overflow in path building" into nyc-devDaniel Rosenberg2016-04-131-1/+1
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: c414027 * commit 'c414027e927fa025877afd53b27886b6c3b19cfd': Fix overflow in path building Change-Id: I6e2692539738d81055cc49a183a34261074e5e68
| * | | | Fix overflow in path buildingDaniel Rosenberg2016-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An incorrect size was causing an unsigned value to wrap, causing it to write past the end of the buffer. Bug: 28085658 Change-Id: Ie9625c729cca024d514ba2880ff97209d435a165
* | | | | Give users and devices control over sdcardfs.Jeff Sharkey2016-04-071-1/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 20ca983 * commit '20ca9836b9a780c41a22850f478a29f29677553e': Give users and devices control over sdcardfs. Change-Id: I0144b346157952f79fdde5100f0fdc01daa58d9b
| * | | | Give users and devices control over sdcardfs.Jeff Sharkey2016-04-071-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying only on kernel support for sdcardfs, give each device the ability to quickly toggle between sdcardfs and FUSE. Also add the ability to users to explicitly enable/disable the behavior for testing and debugging purposes. Bug: 27991427 Change-Id: Ie188cb044be2ad87166f2d43c32a1f6b97660de0
* | | | | Merge "Revert "Revert "sdcard: Support sdcardfs""" into nyc-devDaniel Rosenberg2016-03-311-1/+104
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 71f6b95 * commit '71f6b9569c2c707d061b96e48021b4be617e40a4': Revert "Revert "sdcard: Support sdcardfs"" Change-Id: I37880f88c21bec8a0dcd4ff8e93ea0986f0b8475
| * | | | Revert "Revert "sdcard: Support sdcardfs""Daniel Rosenberg2016-03-311-1/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue resolved by commit 6855c48093e109c92df39340a8355a3be2540b8e "Skip mounting sdcardfs in core mode." This reverts commit f8fccd2f5a799540ba5a80098cc11cab276fb8f5. Bug: 27932087 Change-Id: Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6
* | | | | Merge "Revert "sdcard: Support sdcardfs"" into nyc-devMark Salyzyn2016-03-311-104/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 6267d70 * commit '6267d70b2646e020c09439944bebc6aff1d7d652': Revert "sdcard: Support sdcardfs" Change-Id: Iab8254f8cbbf54c29857dcf51911a208eab02115
| * | | | Revert "sdcard: Support sdcardfs"Mark Salyzyn2016-03-311-104/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bd0efa89cf93bf055bd91b1641477da2937ce8d. Bug: 27932087 Change-Id: Ie27f17c1f283514b90ce9da0c895b528d87e5f47
* | | | | Merge "sdcard: Support sdcardfs" into nyc-devDaniel Rosenberg2016-03-171-1/+104
|\| | | | | |/ / / |/| | | | | | | | | | | | | | | | | | | am: a775e62 * commit 'a775e6269308db9c56a8b53b85e7bfbb739b2221': sdcard: Support sdcardfs
| * | | sdcard: Support sdcardfsDaniel Rosenberg2016-03-161-1/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ability to use sdcardfs if kernel support is found. In the future, we will likely remove the fuse components entirely, but for now, just use sdcardfs when possible. Bug: 19160983 Change-Id: I35e4d6cb5976c00c6f87ff7fc478ba9f9d212c05 Signed-off-by: Daniel Rosenberg <drosen@google.com>
| * | | Re-derive permissions after package changes.Jeff Sharkey2015-12-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packages change, existing package-specific directories may have gained/lost a UID mapping, so we need to update the permissions for any in-memory nodes. This allows an app to deliver data for another package before that package is installed, which is the typical pattern of how OBB files are delivered. Also fix bug by re-deriving permissions when files are moved. Bug: 25399427 Change-Id: I06f38a24ad7dee5f5099ba81429aef03208e5683
* | | | Add dependency on liblogDimitry Ivanov2016-02-121-1/+1
| |/ / |/| | | | | | | | | | | Bug: http://b/27171986 Change-Id: I4af3b4b9f17972327b926ad9ee0d03672d1d4a64
* | | Re-derive permissions after package changes.Jeff Sharkey2015-12-161-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packages change, existing package-specific directories may have gained/lost a UID mapping, so we need to update the permissions for any in-memory nodes. This allows an app to deliver data for another package before that package is installed, which is the typical pattern of how OBB files are delivered. Also fix bug by re-deriving permissions when files are moved. Bug: 25399427 Change-Id: I06f38a24ad7dee5f5099ba81429aef03208e5683