Age | Commit message (Collapse) | Author |
|
We have been seeing reports where race condition was happening as a
result of node deletion, while trying to check if an app has access to
it.
With this fix, we are making sure that the node won't be deleted after
it was looked up and before checking the needed info on it.
Bug: 374685576
Bug: 339567926
Bug: 396594195
Test: atest CtsMediaProviderTranscodeTests
Flag: EXEMPT bugfix
Change-Id: I91caba1ee65f7b6a9827253e9256f88bf16fb854
|
|
Original change: https://android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/3499291
Change-Id: Ic7e50632f7e42a990124a5011f2cf049daf1c558
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
libc++ is stricter about transitive includes for C++23.
Change-Id: Ifd53f1f193c02aa71cfd9d73c8f06b40eccbf249
|
|
|
|
Users were able to see .picker_transcoded directory when they show
hidden files in Files app. Put checks in FuseDaemon to make sure that no
operations are allowed on this directory. We only allowed access to
MediaProvider which bypass fuse for such files access.
Bug: 393979202
Test: Manual
Flag: EXEMPT bugfix
Change-Id: I8fd05894c0eef72e6545577a353880da75ffdd21
|
|
Android requires changes to upstream passthrough to be able to use it
successfully. If these changes are not present, do not use it.
Bug: 376007121
Flag: EXEMPT bugfix
Test: Boot mainline kernel without fuse_passthrough sysfs entry
Device should not use upstream passthrough
Change-Id: I051cf898bcc8825c43e36012c9baaaf248ca66d5
|
|
This reverts commit 685a81435ee1bfd8f7952deb1e39cdc14f65fd7e.
Reason for revert: Putting back the changes after removal from M-11
Change-Id: I98d931ea94c784a1296942e05b9d8313301d3892
|
|
This reverts commit e3a6f0d1940c3103da7d31ce9eb4d8c96d7c3390.
Reason for revert: b/386302885
Change-Id: Ia5ab2c8b335318d1d7928c2a068f139b7bf1ac43
|
|
into main
|
|
Test: atest FuseUtilsTest.cpp
Bug: 378021978
Flag: EXEMPT, bug fix
Change-Id: I66c05397a1350c3fd1af52218f803e1202ed9b3d
|
|
|
|
Certain unicodes are not getting correctly encoded and decoded by UTF-8 encoding.
Adding a check to avoid filenames containing these characters.
Bug: 263914218
Test: NA
Flag: com.android.providers.media.flags.enable_unicode_check
Change-Id: I67828d34adfbe3c8f3888f6cf265249e0715c974
|
|
The upstream kernel has merged in a version of Passthrough with a
differing interface. If we detect that, use it, as Android's version of
Passthrough will be unavailable.
Change-Id: Ib6b0da7a8b4a7ddeadc4dcae0e26801947670a11
Test: atest android.scopedstorage.cts.general.ScopedStorageDeviceTest
using mainline kernel
Flag: EXEMPT (Controlled by flag supplied by fuse kernel module)
Bug: 333497409
|
|
Some code flow with fuse bpf enabled can set inode number to 0. Adding a check to skip any crash in that case.
Change-Id: I649b24ca95d7f5a9810f1247d30b0fadc1d4fba5
Test: n/a
Bug: 367845222
Flag: EXEMPT bug fix
|
|
|
|
Added restore code for restoring file metadata after restore operation
of B&R. Any file scan after restore will check for presence of file in
the leveldb backup file for metadata restore. A file metadata will be
restored only if it has same size as the actual file.
Test: atest RestoreExecutorTest
Bug: 336793178
Flag: com.android.providers.media.flags.enable_backup_and_restore
Change-Id: Iec6669f7b7d9afb92b2bd7c0b46d18914314d321
|
|
Current FuseDaemon is incompatible with renaming a file with
RENAME_NOREPLACE which does not allow a file to be renamed if newpath
already exists. However, there's no reason to disallow this because
checking EEXIST is already done in upper vfs kernel and thus it does
not affect the behavior of FuseDaemon.
Co-developed-by: Yoonho Shin <yoonho.shin@samsung.corp-partner.google.com>
Signed-off-by: Hobin Woo <hobin.woo@samsung.corp-partner.google.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:af401d1ec047186dec7d0977069df8c02adde1d6)
Merged-In: I0eed8a58efb6f61d916adc3f2596c63220ceb8ff
Change-Id: I0eed8a58efb6f61d916adc3f2596c63220ceb8ff
Flag: EXEMPT bug fix
|
|
This can happen when the filesystem is in a bad state, and we don't want to fail the entire directory listing.
Bug: 314054393
Change-Id: I8da411e37cbb323c6080c498fb44cb76701e609d
Test: N/A
Flag: EXEMPT bugfix
|
|
Bug: http://b/344654921
Test: m fuse_node_test FuseUtilsTest RedactionInfoTest pdfClient_test
Change-Id: I5e38d6bbeacb31cc36a104908a4f02d2f4566042
|
|
udc-mainline-prod am: 9c2cf98d8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/27518620
Change-Id: I296ec605ba450815a3f8c1757632cec4dfcfc59c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
udc-mainline-prod
|
|
Moving the backing up of public volume
data to it's own fuse daemon thread. This
will reduce the load on the EXTERNAL_PRIMARY
fuse daemon thread.
Bug: 294741698
Test: manual + atest StableUriIdleMaintenanceServiceTest#testDataMigrationForPublicVolume
Change-Id: I1e308914349b034a4824f1a24bce552d074a1687
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/27384514
Change-Id: Ie2fa2b129a5115dd1bd2d1da7aacb1696ad0ba0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
* changes:
Increase fuse daemon readdir buffer size to 32KB
Optimize Fuse readdir performance
|
|
20a5188ab9
Original change: https://android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/3098180
Change-Id: I03602165b6e388b789d2cb6ab960e7e64ea76fff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Bug: 171935194
Test: atest PerformanceTest#testDirOperations_1000
Change-Id: I7fd556a3476228509bc43f53ca55bc901d39bbc3
|
|
do_lookup() executes cross-user check everytime which could be
unnecessarily repeated over and over again in a readdir operation.
We move the cross-user check to is_user_accessible_path(), and
make it called once for a readdir operation. We can see 5%
improvements in a readdir operation.
Bug: 171935194
Test: atest PerformanceTest#testDirOperations_1000
Change-Id: Ied969d3f93a2647ab6ff341b3e8fa19ad6e2628e
|
|
Previously BpfFd::REMOVE conflicted with the "invalid value" of bpf_fd
(which is initialized to -1 and set to -1 if retrieving the bpf program
fails), so the else branch in fuse_bpf_fill_entries was effectively
unreachable.
Test: atest MediaProviderTests. This is obviously not covered by any
tests. Can the owner team add test coverage?
Change-Id: I16f4814f2a398613725d7db617f5f417e7d693f9
|
|
This comment was confusing as both bpf_fd and backing_fd are used in
this function.
Test: n/a
Change-Id: I1aba0c71d34af7346b9b977c08cd49bc2b144ddb
|
|
We are trying to get rid of the int-based version, so convert FuseDaemon
to using unique_fd.
A few things that stuck out:
- in the previous iteration, bpf_fd was never closed.
- the else branch in fuse_bpf_fill_entries is never reachable.
- if bpfFdGet() failed, the old code logged the fd (always -1) instead
of the errno.
- BpfFd::REMOVE (-1) happens to coincide with both the default value of
bpf_fd if bpf_enabled is false, and the return value of bpfFdGet() if
that call fails. This leads to an unreachable branch inside
fuse_bpf_fill_entries().
Test: atest MediaProviderTests
Change-Id: Ibfbcb0f6185c90ab8bae471571319902b4a3ecb4
|
|
|
|
It is allowed to rename from the fuse path to the root, data or obb,
of the fuse-bpf path, however, it finally returns EBADF from the kernel
since the file belongs to a fuse-bpf path not having any backing
information. For the sake of compatibility, we just return EXDEV, the same
as the case with renaming a file to a sub-directories within the fuse-bpf
path (i.e., copy & unlink).
Bug: 336656707
Test: N.A.
Change-Id: I38a4968de0997f53a06d83594e85eb8fe94d2681
Merged-In: I38a4968de0997f53a06d83594e85eb8fe94d2681
|
|
This reverts commit db5422b1ea8dab3bd86bb902a836cca99ca9cb66.
Reason for revert: 319271902
Test: N.A.
Change-Id: I50d7bdf6636fb693795eb42960b3da22aa954201
|
|
It is allowed to rename from the fuse path to the root, data or obb,
of the fuse-bpf path, however, it finally returns EBADF from the kernel
since the file belongs to a fuse-bpf path not having any backing
information. For the sake of compatibility, we just return EXDEV, the same
as the case with renaming a file to a sub-directories within the fuse-bpf
path (i.e., copy & unlink).
Bug: 336656707
Test: N.A.
Change-Id: I38a4968de0997f53a06d83594e85eb8fe94d2681
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/26818307
Change-Id: I6192aa4e95d71f406bdaac645b337e49f651a2b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Added jni code to perform leveldb operations. Test is executed in fake
mediaprovider and leveldb library is loaded for the same.
Test: atest com.android.providers.media.leveldb.LevelDBProxyTest
Bug: 336793168
Change-Id: Ib9821430d7494118ab3328efc317cb7f33082491
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/27053415
Change-Id: I1879aa41039bc84ec04abcd95601a6722ad76005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
Connecting to leveldb in upper fs results in delay in unmount due to existing nature of vold code. Unmount gets re-attempted in some scenarios causing a latency increase.
Test: atest StableUriIdleMaintenanceServiceTest
Bug: 335053149
Change-Id: I05549bd8cc11e3acbb14b6a1f2391bd2484820b5
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/26900868
Change-Id: I68a8910dd7ea6149eec8981462669cb3d44e3163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
On rollback, while recovering data from leveldb, we can end up in a
deadlock when a thread tries to lock a mutex twice. Updating recover
data logic to wait for external primary setup to complete before
recovering. Also changing lock to re-entrant lock.
Test: locally by triggering rollback
Bug: 333528476
Change-Id: Ie7fcf01e5c2f5d50f851710f86377b2ff8a900bc
|
|
Downloads" into main
|
|
This patch does the following two things:
- Set attribute timeout to 0 on paths for which ShouldNotCache is true.
ShouldNotCache was introduced in ag/16386050 to disable cache on
certain paths, and currently returns true if the path is on
StubVolume or it's under /storage/emulated/0/Download (only in ARC).
- Unset FUSE_CAP_WRITEBACK_CACHE if it's externally managed
(`uncached_mode` is true) or if it's ARC. The `uncached_mode` paramter
was introduced in ag/16386051 and is true only on StubVolumes.
Because ARC's /data/media/0/Download is a bind-mount from
/var/run/arc/media/MyFiles/Downloads (in StubVolume), ARC needs to
disable it not only on StubVolume but also on EmulatedVolume.
Bug: 304369618
Test: The test ag/16622273 shows the correct result on both MyFiles and
Download(s).
Change-Id: Iaefa204858f31b17d65d4bb106debea1534e8ca6
|
|
c45dd99e93
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/26460928
Change-Id: Ib54a096774d9bcc068b1e1787e929eb388e2d303
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Currently when vold unmounts a volume, we
remove the level db connection pointers from
fuse. It causes the methods that were already
in execution to fail.
Adding a lock to all methods that interact
with connections map to prevent such failures.
Bug: 327604826
Test: atest StableUriIdleMaintenanceServiceTest
Change-Id: I45da84ae30b4f98190f2c15900d72ccf480f5193
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/26422491
Change-Id: Iac3ed7c0016e480d3b2b15587b2b4a2df4ec220e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
If a readdir comes in where each entry is redacted, we must signal that
there may be more to come by setting 'again'.
Test: Create many redacted folders, and a single unredacted
Observe output of ls
Bug: 325550828
Change-Id: Ie55c782a1dd95a625cf52f64786d8fdded5ceb70
|
|
Size field is no longer needed by the kernel
Bug: 316860292
Test: Can create 200 dirs in /storage/emulated/0/Android/data
atest ScopedStorageDeviceTest passes
Change-Id: I097493bd8ce5c4fbff535922844a9416fad16466
Merged-In: I097493bd8ce5c4fbff535922844a9416fad16466
|
|
Original change: https://android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/2886331
Change-Id: I976a4f1b0924d28f70e103d327dc8921ec1115b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Size field is no longer needed by the kernel
Bug: 316860292
Test: Can create 200 dirs in /storage/emulated/0/Android/data
atest ScopedStorageDeviceTest passes
Change-Id: I097493bd8ce5c4fbff535922844a9416fad16466
Merged-In: I097493bd8ce5c4fbff535922844a9416fad16466
|