aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/nfs/export.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-02-15 06:53:54 -0500
committerChuck Lever <chuck.lever@oracle.com>2023-04-26 09:04:59 -0400
commitdcb779fcd4ed5984ad15991d574943d12a8693d1 (patch)
treeb276f91387db39a39b1e9d6b8292eb81bea67cd5 /fs/nfs/export.c
parentnfsd: update comment over __nfsd_file_cache_purge (diff)
downloadwireguard-linux-dcb779fcd4ed5984ad15991d574943d12a8693d1.tar.xz
wireguard-linux-dcb779fcd4ed5984ad15991d574943d12a8693d1.zip
nfsd: allow reaping files still under writeback
On most filesystems, there is no reason to delay reaping an nfsd_file just because its underlying inode is still under writeback. nfsd just relies on client activity or the local flusher threads to do writeback. The main exception is NFS, which flushes all of its dirty data on last close. Add a new EXPORT_OP_FLUSH_ON_CLOSE flag to allow filesystems to signal that they do this, and only skip closing files under writeback on such filesystems. Also, remove a redundant NULL file pointer check in nfsd_file_check_writeback, and clean up nfs's export op flag definitions. Signed-off-by: Jeff Layton <jlayton@kernel.org> Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfs/export.c')
-rw-r--r--fs/nfs/export.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/export.c b/fs/nfs/export.c
index d6a6d1ebb8fd..be686b8e0c54 100644
--- a/fs/nfs/export.c
+++ b/fs/nfs/export.c
@@ -149,7 +149,10 @@ const struct export_operations nfs_export_ops = {
.encode_fh = nfs_encode_fh,
.fh_to_dentry = nfs_fh_to_dentry,
.get_parent = nfs_get_parent,
- .flags = EXPORT_OP_NOWCC|EXPORT_OP_NOSUBTREECHK|
- EXPORT_OP_CLOSE_BEFORE_UNLINK|EXPORT_OP_REMOTE_FS|
- EXPORT_OP_NOATOMIC_ATTR,
+ .flags = EXPORT_OP_NOWCC |
+ EXPORT_OP_NOSUBTREECHK |
+ EXPORT_OP_CLOSE_BEFORE_UNLINK |
+ EXPORT_OP_REMOTE_FS |
+ EXPORT_OP_NOATOMIC_ATTR |
+ EXPORT_OP_FLUSH_ON_CLOSE,
};