[PATCH v2 00/14] nfsd: refactor nfs4_create_file()
NeilBrown <[email protected]>
| Newsgroups | gmane.linux.nfs |
|---|---|
| Message-ID | <[email protected]> |
This v2 incorporates changes to address issues reported by sashiko.dev. Of particular interest is that for open/create we now get pre/post attributes OUTSIDE of the locked region, so we cannot tell the client that they are atomic. This is a slight regression in that it may require the client to revalidate the directory contents more often. We may be able to address it by using directory leases. It would rather this were done after this series lands, though I will try to get it done before making locking changes for other operations (mkdir, link, symlink, etc). This series also goes further than the previous series by completing all the nfsd changes. Once the planned vfs_lookup_open() becomes available we can simply switch from the current do_lookup_open() to that. Original series description was: nfs4_create_file() duplicates knowledge about opening a file which exists in the VFS, mostly in lookup_open(). It does use dentry_create() which shares some code, but there is more code that could be shared. The nfsd code doesn't get some details quite right, particularly patch 06 shows this. I hope to introduce a new VFS interface which encapulates more of what nfsd needs and shares more code with lookup_open(). I particularly want this as it will simplify some changes to locking rules that I am working on. This series re-arranges the nfsd code to get it ready for switching to the new interface. Once that interface lands we can then switch over fairly easily. Hopefully the series helps clarity even before that happens. The series is against nfsd-testing. Thanks, NeilBrown [PATCH v2 01/14] nfsd: honour client-provided attributes for [PATCH v2 02/14] nfsd: replace fh_fill_both_attrs() with [PATCH v2 03/14] nfsd: move fh_want_write() after preamble in [PATCH v2 04/14] nfsd: move more nfs-specific code into preamble of [PATCH v2 05/14] nfsd: remove subtlety from nfsd4_create_file() [PATCH v2 06/14] nfsd: in nfsd4_create_file() let VFS report if file [PATCH v2 07/14] nfsd: nfsd4_create_file(): Move NFSD_MAY_CREATE [PATCH v2 08/14] nfsd: always open file in nfsd4_create_file() [PATCH v2 09/14] nfsd: reduce range of directory lock in [PATCH v2 10/14] nfsd: open-code nfsd4_vfs_create() into [PATCH v2 11/14] nfsd: move some code out of the [PATCH v2 12/14] nfsd: reduce want-write range in nfsd4_create_file() [PATCH v2 13/14] nfsd: separate out VFS-specific from from [PATCH v2 14/14] nfsd: use do_lookup_open() for non-creating open