Re: [PATCH v10 2/8] fuse: introduce atomic open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/24/23 12:12, Yuan Yao wrote:
Thank you for addressing the symbolic link problems!
Additionally, I found an incompatibility with the no_open feature.
When the FUSE server has the no_open feature enabled, the atomic_open
FUSE request returns a d_entry with an empty file handler and open
option FOPEN_KEEP_CACHE (for files) or FOPEN_CACHE_DIR (for
directories). With this situation, if we can set fc->no_open = 1 or
fc->no_opendir = 1 after receiving the such FUSE reply, as follows,
will make the atomic_open compatible with no_open feature:
+       if (!inode) {
+               flags &= ~(O_CREAT | O_EXCL | O_TRUNC);
+               fuse_sync_release(NULL, ff, flags);
+               fuse_queue_forget(fm->fc, forget, outentry.nodeid, 1);
+               err = -ENOMEM;
+               goto out_err;
+       }
+
+ if(ff->fh == 0) {
+        if(ff->open_flags & FOPEN_KEEP_CACHE)
+            fc->no_open = 1;
+        if(ff->open_flags & FOPEN_CACHE_DIR)
+          fc->no_opendir = 1;
+       }
+
+       /* prevent racing/parallel lookup on a negative hashed */


Thanks again for your review!

Hmm, are you sure atomic open needs to handle no-open? fuse_file_open sets no-open / no-opendir on -ENOSYS. _fuse_atomic_open has a handler for -ENOSYS and falls back to the existing create_open. So why does atomic open need a no-open handling?


Thanks,
Bernd








[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux