]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge tag 'nfsd-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 6 Oct 2025 20:22:21 +0000 (13:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 6 Oct 2025 20:22:21 +0000 (13:22 -0700)
Pull nfsd updates from Chuck Lever:
 "Mike Snitzer has prototyped a mechanism for disabling I/O caching in
  NFSD. This is introduced in v6.18 as an experimental feature. This
  enables scaling NFSD in /both/ directions:

   - NFS service can be supported on systems with small memory
     footprints, such as low-cost cloud instances

   - Large NFS workloads will be less likely to force the eviction of
     server-local activity, helping it avoid thrashing

  Jeff Layton contributed a number of fixes to the new attribute
  delegation implementation (based on a pending Internet RFC) that we
  hope will make attribute delegation reliable enough to enable by
  default, as it is on the Linux NFS client.

  The remaining patches in this pull request are clean-ups and minor
  optimizations. Many thanks to the contributors, reviewers, testers,
  and bug reporters who participated during the v6.18 NFSD development
  cycle"

* tag 'nfsd-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (42 commits)
  nfsd: discard nfserr_dropit
  SUNRPC: Make RPCSEC_GSS_KRB5 select CRYPTO instead of depending on it
  NFSD: Add io_cache_{read,write} controls to debugfs
  NFSD: Do the grace period check in ->proc_layoutget
  nfsd: delete unnecessary NULL check in __fh_verify()
  NFSD: Allow layoutcommit during grace period
  NFSD: Disallow layoutget during grace period
  sunrpc: fix "occurence"->"occurrence"
  nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
  nfsd: nfserr_jukebox in nlm_fopen should lead to a retry
  NFSD: Reduce DRC bucket size
  NFSD: Delay adding new entries to LRU
  SUNRPC: Move the svc_rpcb_cleanup() call sites
  NFS: Remove rpcbind cleanup for NFSv4.0 callback
  nfsd: unregister with rpcbind when deleting a transport
  NFSD: Drop redundant conversion to bool
  sunrpc: eliminate return pointer in svc_tcp_sendmsg()
  sunrpc: fix pr_notice in svc_tcp_sendto() to show correct length
  nfsd: decouple the xprtsec policy check from check_nfsd_access()
  NFSD: Fix destination buffer size in nfsd4_ssc_setup_dul()
  ...

12 files changed:
1  2 
fs/nfsd/export.c
fs/nfsd/export.h
fs/nfsd/filecache.c
fs/nfsd/filecache.h
fs/nfsd/localio.c
fs/nfsd/nfsfh.c
fs/nfsd/vfs.c
include/linux/fs.h
include/linux/nfslocalio.h
include/linux/sunrpc/xdr.h
net/sunrpc/Kconfig
net/sunrpc/svc.c

Simple merge
Simple merge
Simple merge
Simple merge
index 9e0a37cd29d8af82d0a8bc452d859a782d32fb2b,269fa9391dc4668ae8a737f492c0761c4d7b0eaa..be710d809a3ba3bf698397fee44ce8ab01c82041
@@@ -132,9 -122,7 +132,8 @@@ static const struct nfsd_localio_operat
        .nfsd_net_put  = nfsd_net_put,
        .nfsd_open_local_fh = nfsd_open_local_fh,
        .nfsd_file_put_local = nfsd_file_put_local,
-       .nfsd_file_get_local = nfsd_file_get_local,
        .nfsd_file_file = nfsd_file_file,
 +      .nfsd_file_dio_alignment = nfsd_file_dio_alignment,
  };
  
  void nfsd_localio_ops_init(void)
diff --cc fs/nfsd/nfsfh.c
index 74cf1f4de17410eab4d8edea867fb114823f809a,3edccc38db42e56d5652f65c487c90c42f209d68..3eb724ec956606c5d40a2cfb890f58c32c1e5693
@@@ -662,6 -682,29 +682,33 @@@ out_negative
        return nfserr_serverfault;
  }
  
+ /**
+  * fh_getattr - Retrieve attributes on a local file
+  * @fhp: File handle of target file
+  * @stat: Caller-supplied kstat buffer to be filled in
+  *
+  * Returns nfs_ok on success, otherwise an NFS status code is
+  * returned.
+  */
+ __be32 fh_getattr(const struct svc_fh *fhp, struct kstat *stat)
+ {
+       struct path p = {
+               .mnt            = fhp->fh_export->ex_path.mnt,
+               .dentry         = fhp->fh_dentry,
+       };
++      struct inode *inode = d_inode(p.dentry);
+       u32 request_mask = STATX_BASIC_STATS;
++      if (S_ISREG(inode->i_mode))
++              request_mask |= (STATX_DIOALIGN | STATX_DIO_READ_ALIGN);
++
+       if (fhp->fh_maxsize == NFS4_FHSIZE)
+               request_mask |= (STATX_BTIME | STATX_CHANGE_COOKIE);
+       return nfserrno(vfs_getattr(&p, stat, request_mask,
+                                   AT_STATX_SYNC_AS_STAT));
+ }
  /**
   * fh_fill_pre_attrs - Fill in pre-op attributes
   * @fhp: file handle to be updated
diff --cc fs/nfsd/vfs.c
Simple merge
Simple merge
index 7ca2715edccca34f8f44d6b7452bf4a321560f4f,59ea90bd136b69c1cb7ddcbb0f5d9290684193c5..3d91043254e64ac521c558951af8c1b40dacd283
@@@ -63,10 -63,7 +63,9 @@@ struct nfsd_localio_operations 
                                                struct nfsd_file __rcu **pnf,
                                                const fmode_t);
        struct net *(*nfsd_file_put_local)(struct nfsd_file __rcu **);
-       struct nfsd_file *(*nfsd_file_get_local)(struct nfsd_file *);
        struct file *(*nfsd_file_file)(struct nfsd_file *);
 +      void (*nfsd_file_dio_alignment)(struct nfsd_file *,
 +                                      u32 *, u32 *, u32 *);
  } ____cacheline_aligned;
  
  extern void nfsd_localio_ops_init(void);
Simple merge
Simple merge
Simple merge