aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libfuse: Mark vendor_availableandroid11-devWoody Lin2020-06-011-0/+2
| | | | | | Bug: 153840597 Change-Id: Ifaf9eeea0582c4a68faf20f52ddfbf84af254ac9 Merged-In: Ifaf9eeea0582c4a68faf20f52ddfbf84af254ac9
* Fix FUSE_CANONICAL_PATH responseZim2020-03-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bluecross kernel introduced a change, 4fb542f2aa1414cea5686efcf72a411b7213c375 that breaks responses to canonical paths. The patch above tried to guarantee that the canonical path returned from the FUSE daemon is null terminated. It does this by replacing the last character in the path returned from the FUSE daemon with '\0'. Since the size of the response returned from the FUSE daemon is gotten from strlen which doesn't take into account the null terminating character. This means that the kernel fix above will break the file path returned from userspace. Effectively replacing /storage/emulated/0 with /storage/emulated/. It is unclear how this breaks inotify on the root path but not inotify on Download/ for instance since that too is replaced by /storage/emulated/Downloa. One thing I've noticed is that in the case of Download, being replaced with Downloa, there is an error generated, since Downloa doesn't exist, but in the case of /storage/emulated/0, there is no error since /storage/emulated/ exists. In any case, this cl returns a buffer size including the '\0' to the kernel and seems right given that the actual size of the buffer returned to the kernel is now correct. Test: Manual tests with inotify and Documents UI detecting changes on /sdcard on both taimen and crosshatch Bug: 152035889 Change-Id: Ia4b9adec09dd501ec0c5327b9ea9577412cea6a2
* Merge "Support FUSE_CANONICAL_PATH in libfuse"TreeHugger Robot2020-01-135-0/+156
|\
| * Support FUSE_CANONICAL_PATH in libfuseZim2020-01-105-0/+156
| | | | | | | | | | | | | | | | | | | | | | FUSE_CANONICAL_PATH opcode, (2016) was added in some Android kernels to support inotify. Add canonical path handlers in libfuse and create a patch file to easily apply this patch on top of updates. Test: inotify - /sdcard on Taimen Test: atest FileObserver Bug: 147482155 Change-Id: I97a2c4247aa3e4a70af697569b56662a0755f72b
* | We should be showing raw LGPL license text.Jeff Sharkey2019-12-201-1/+1
|/ | | | | | | | | | The contents of LICENSE is vague, and doesn't actually include any license text. Since this repo only contains include/ and lib/, this change adjusts NOTICE to point at the LGPL2.txt. Bug: 142049860 Test: manual Change-Id: I5d65ebd90606bf92a9fdaed8ac800bab5d82cdd7
* Merge tag 'fuse-3.8.0' into HEAD am: 898c253bc0 am: 54ee84ad31Haibo Huang2019-11-133-4/+4
|\ | | | | | | | | | | am: 4db6b5519a Change-Id: I3ce12039ca60645aba738e116214a49f5c1097a8
| * Merge tag 'fuse-3.8.0' into HEAD am: 898c253bc0Haibo Huang2019-11-1324-184/+477
| |\ | | | | | | | | | | | | | | | am: 54ee84ad31 Change-Id: I791e883487b0ffb5348c232a5bf83b3a51feed61
| | * Merge tag 'fuse-3.8.0' into HEADHaibo Huang2019-11-1324-184/+477
| | |\ | | | | | | | | | | | | | | | | | | | | am: 898c253bc0 Change-Id: I2b399bfcc94a22e63bc77437e9b0a5717f1b34fe
| | | * Merge tag 'fuse-3.8.0' into HEADHaibo Huang2019-11-1324-184/+477
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tagged release. Manual fix to Android.bp. Change-Id: I509e84bb2661b95c4f45dca8fdcde655cae8ce5a
| | | | * Released 3.8.0Nikolaus Rath2019-11-033-3/+5
| | | | |
| | | | * Implement lseek operation (#457)Yuri Per2019-11-0311-0/+194
| | | | |
| | | | * Use the -o intr mount option on FreeBSD (#462)Alan Somers2019-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FUSE file systems normally indicate their interruptibility by returning ENOSYS to the first FUSE_INTERRUPT operation. But that causes two problems for file systems that aren't interruptible: 1) A process may block on a signal, even if another thread could've handled the signal. The kernel must know whether the FUSE thread is interruptible before deciding which thread should receive a signal. 2) The protocol allows a FUSE daemon to simply ignore FUSE_INTERRUPT operations. From the kernel's point of view, that is indistinguishable from a FUSE_INTERRUPT operation arriving after the original operation had already completed. Thus, the kernel can't interpret an ignored FUSE_INTERRUPT as an indication that the daemon is non-interruptible. With the -o nointr mount option, no FUSE_INTERRUPT operations will ever be sent. Most FUSE file systems should require no modifications to take advantage of this mount option.
| | | | * passthrough_ll: drop lo_dirp->fd field (#464)Stefan Hajnoczi2019-11-031-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdopendir(3) takes ownership of the file descriptor. The presence of the lo_dirp->fd field could lead to someone incorrectly adding a close(d->fd) cleanup call in the future. Do not store the file descriptor in struct lo_dirp since it is unused. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| | | | * Update README.md (#465)Emily Herbert2019-10-241-1/+1
| | | | |
| | | | * Released 3.7.0Nikolaus Rath2019-09-273-3/+10
| | | | |
| | | | * Whitelist UFSD (#451)tenzap2019-09-152-0/+3
| | | | |
| | | | * passthrough_ll: use fuse_log() instead of err()/errx()Stefan Hajnoczi2019-09-101-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send everything through fuse_log() instead of writing directly to stderr. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| | | | * passthrough_ll: use fuse_log()Stefan Hajnoczi2019-09-101-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of fuse_log() instead of printing directly to stderr. This demonstrates unified logging and also caught the fact that I forgot to add fuse_log APIs to lib/fuse_versionscript. So it's basically a test case :). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| | | | * log: move fuse_log() to the public header fileStefan Hajnoczi2019-09-104-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications may wish to call fuse_log() for unified logging. This way they don't need to define their own wrappers to invoke the log message handler function installed by fuse_set_log_func(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| | | | * passthrough_ll: fix fallocate variant ifdefs (#449)Dr. David Alan Gilbert2019-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If fallocate isn't available we incorrectly check for the value of HAVE_POSIX_FALLOCATE rather than it being defined. We also fail to initialise 'err' in the case where neither are defined. Fixes: 5fc562c90d7925963467 ("Add fallocate and use it instead of ...") Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| | | | * Introduce callback for loggingStefan Hajnoczi2019-09-0418-175/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce an API for custom log handler functions. This allows libfuse applications to send messages to syslog(3) or other logging systems. See include/fuse_log.h for details. Convert libfuse from fprintf(stderr, ...) to log_fuse(level, ...). Most messages are error messages with FUSE_LOG_ERR log level. There are also some debug messages which now use the FUSE_LOG_DEBUG log level. Note that lib/mount_util.c is used by both libfuse and fusermount3. Since fusermount3 does not link against libfuse, we cannot call fuse_log() from lib/mount_util.c. This file will continue to use fprintf(stderr, ...) until someone figures out how to split it up. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| | | | * Avoid gcc 9.1 strncpy(3) warnings (#447)Stefan Hajnoczi2019-08-293-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent GCC releases have warnings related to common strncpy(3) bugs. These warnings can be avoided by explicitly NUL-terminating the buffer or using memcpy(3) when the intention is to copy just the characters without the NUL terminator. This commit fixes the following warnings: [1/27] Compiling C object 'test/9f86d08@@test_syscalls@exe/test_syscalls.c.o'. In function ‘test_socket’, inlined from ‘main’ at ../test/test_syscalls.c:1899:9: ../test/test_syscalls.c:1760:2: warning: ‘strncpy’ output may be truncated copying 108 bytes from a string of length 1023 [-Wstringop-truncation] 1760 | strncpy(su.sun_path, testsock, sizeof(su.sun_path)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [2/27] Compiling C object 'lib/76b5a35@@fuse3@sha/fuse.c.o'. ../lib/fuse.c: In function ‘add_name’: ../lib/fuse.c:968:2: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 968 | strncpy(s, name, len); | ^~~~~~~~~~~~~~~~~~~~~ ../lib/fuse.c:944:15: note: length computed here 944 | size_t len = strlen(name); | ^~~~~~~~~~~~ [3/27] Compiling C object 'lib/76b5a35@@fuse3@sha/fuse_lowlevel.c.o'. ../lib/fuse_lowlevel.c: In function ‘fuse_add_direntry’: ../lib/fuse_lowlevel.c:288:2: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 288 | strncpy(dirent->name, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/fuse_lowlevel.c:276:12: note: length computed here 276 | namelen = strlen(name); | ^~~~~~~~~~~~ ../lib/fuse_lowlevel.c: In function ‘fuse_add_direntry_plus’: ../lib/fuse_lowlevel.c:381:2: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 381 | strncpy(dirent->name, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/fuse_lowlevel.c:366:12: note: length computed here 366 | namelen = strlen(name); | ^~~~~~~~~~~~ Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| | | | * Shorten comment.Nikolaus Rath2019-08-231-5/+0
| | | | |
| | | | * Improve description of READDIRPLUS_AUTO.Nikolaus Rath2019-08-231-0/+9
| | | | |
| | | | * Clarify bitfield padding issue (#445)AsumFace2019-08-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clarify bitfield padding issue * Add a more elaborate note to fuse_file_info
* | | | | Update to libfuse 3.8.0Zim2019-11-0921-181/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest release allows a custom logger Bug: 135341433 Test: adb shell ls /sdcard with persist.sys.fuse Change-Id: Iaa8a2bb7b6da3f364fba41b443527a998a26549f
* | | | | [automerger skipped] DO NOT MERGE - ↵Xin Li2019-10-300-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master am: 50e045381b am: 71530cffb2 -s ours am skip reason: subject contains skip directive Change-Id: I3978d4cc38c0fa07bd48d1ceda75df09b8214398
| * | | | DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into ↵Xin Li2019-10-300-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master am: 50e045381b Change-Id: Ie2117f02ce5f9a289baea020d68ef073122ca0de
| | * | | DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into ↵Xin Li2019-10-300-0/+0
| | |\ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | stage-aosp-master Bug: 142003500 Change-Id: Idd355b418c5441f6f06c79147fe532f3e220855b
* | | | libfuse: link against the NDK.Narayan Kamath2019-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Test: make Bug: 139927335 Change-Id: I144b4d5908ad6733eac72b32e9df9b40e5a8d82f
* | | | Export libfuse private header directoryZim2019-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android FUSE daemon does not have permissions to mount(). This means we cannot call fuse_session_mount() because it calls fuse_kern_mount() -> mount(). We can however add the opened /dev/fuse fd to the struct fuse_session. Unfortunately, struct fuse_session is defined in fuse_i.h which is in lib/ and not include/ so not exported. This cl exports the headers in lib/ Change-Id: I0602fd8610f181caf7b5126a9bd2f98d2012dcf2
* | | | Merge changes from topic "am-ac447072eb954fe7949adbd0fdf838c9" into ↵Paul Lawrence2019-08-020-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master am: d96eb2b7fd am: e3dfbd46f7 am: 28a738f049 am: bba493bd33 Change-Id: I2c90e2b2d2b6f5ee97728bae77f3f4f82cb2e59b
| * | | Merge changes from topic "am-ac447072eb954fe7949adbd0fdf838c9" into ↵Paul Lawrence2019-08-020-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master am: d96eb2b7fd am: e3dfbd46f7 am: 28a738f049 Change-Id: I44dbdb7107fb6a463af1078b40e9c5c9c9646325
| | * | Merge changes from topic "am-ac447072eb954fe7949adbd0fdf838c9" into ↵Paul Lawrence2019-08-020-0/+0
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master am: d96eb2b7fd am: e3dfbd46f7 Change-Id: I65d339994f04bd4b0fd7d666c47e9b2de23545a9
| | | * \ Merge changes from topic "am-ac447072eb954fe7949adbd0fdf838c9" into ↵Paul Lawrence2019-08-020-0/+0
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master am: d96eb2b7fd Change-Id: I8f343fc3330ee3a9e9acb798ca325079b550d9c3
| | | | * \ Merge changes from topic "am-ac447072eb954fe7949adbd0fdf838c9" into ↵ndk-sysroot-r21Android Build Merger (Role)2019-08-0270-17936/+113
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stage-aosp-master * changes: Merge remote-tracking branch 'user/master' am: 8e056f46af Fix two build nits am: 33a4c341e4 Remove a few more files am: 7053edb309 Remove GPL files am: 94aa887ced Add metadata files am: f082a5799a
| | | | | * \ Merge remote-tracking branch 'user/master'Paul Lawrence2019-08-020-0/+0
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 8e056f46af Change-Id: Ib99028d9c016b62a28bc9f4e7df603fb269f8f13
| | | | | | * \ Merge remote-tracking branch 'user/master'platform-tools-29.0.4platform-tools-29.0.3Paul Lawrence2019-08-0170-17936/+113
| | | | | | |\ \
* | | | | | | | | Fix two build nits am: 33a4c341e4 am: 7c1f187f8b am: bb8475d287 am: 5a04e3408aPaul Lawrence2019-08-020-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 8f351c704a Change-Id: I9761353de339395cc39ccdb2a9dd9067bc3d6cba
| * | | | | | | | Fix two build nits am: 33a4c341e4 am: 7c1f187f8b am: bb8475d287Paul Lawrence2019-08-022-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 5a04e3408a Change-Id: I0b06ce07aad1f39f4f2f89fa511567d33ee3f77a
| | * | | | | | | Fix two build nits am: 33a4c341e4 am: 7c1f187f8bPaul Lawrence2019-08-022-2/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: bb8475d287 Change-Id: I2ed0aaddc664dd8ca2ba0d5a0b66a9b6b71a376d
| | | * | | | | | Fix two build nits am: 33a4c341e4Paul Lawrence2019-08-022-2/+2
| | | |\ \ \ \ \ \ | | | | | |/ / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 7c1f187f8b Change-Id: I134f4d2bcbf9c5312bc2b8b1a424fe48525a089b
| | | | * | | | | Fix two build nitsPaul Lawrence2019-08-022-2/+2
| | | | |\ \ \ \ \ | | | | | | |_|/ / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 33a4c341e4 Change-Id: I27e49c9ef3fabc37f27f33587643da42946f1af2
* | | | | | | | | Remove a few more files am: 7053edb309 am: 315f06e8de am: 3c3fb89c6b am: ↵Paul Lawrence2019-08-020-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | da91ce4f1a am: 8e0408d512 Change-Id: I9129d1718b889ac25a3eb32968646accee7cbb8d
| * | | | | | | | Remove a few more files am: 7053edb309 am: 315f06e8de am: 3c3fb89c6bPaul Lawrence2019-08-025-100/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: da91ce4f1a Change-Id: I3644de8571a8fa6b09f22655df860cca3bc87412
| | * | | | | | | Remove a few more files am: 7053edb309 am: 315f06e8dePaul Lawrence2019-08-025-100/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 3c3fb89c6b Change-Id: I421d32d369e9999b57a664d8cb6d30aa00e46df1
| | | * | | | | | Remove a few more files am: 7053edb309Paul Lawrence2019-08-025-100/+0
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 315f06e8de Change-Id: I80168a5db22224fe1b6629ea75c5bc2bf63906cb
| | | | * | | | | Remove a few more filesPaul Lawrence2019-08-025-100/+0
| | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 7053edb309 Change-Id: I7bf49d0aaed72ffb1e40a457ebd7549712953467
* | | | | | | | | | Remove GPL files am: 94aa887ced am: b4099f5e0f am: 2609a900fb am: c77441c6bcPaul Lawrence2019-08-020-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 1ca65fd045 Change-Id: I2f4e51bbb8697b492fabed4a6f5526ec043dbd70
| * | | | | | | | | Remove GPL files am: 94aa887ced am: b4099f5e0f am: 2609a900fbPaul Lawrence2019-08-0262-17836/+94
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: c77441c6bc Change-Id: I849d56bb6f9909131b449f4f472f21aabd6d2aeb