Re: [PATCH v5 5/7] NFSD: filecache: only get DIO alignment attrs if NFSD_IO_DIRECT enabled

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

 



On Fri, Aug 08, 2025 at 01:59:07PM -0400, Chuck Lever wrote:
> On 8/7/25 12:25 PM, Mike Snitzer wrote:
> > Suggested-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
> > ---
> >  fs/nfsd/filecache.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
> > index 5447dba6c5da0..5601e839a72da 100644
> > --- a/fs/nfsd/filecache.c
> > +++ b/fs/nfsd/filecache.c
> > @@ -1058,8 +1058,12 @@ nfsd_file_getattr(const struct svc_fh *fhp, struct nfsd_file *nf)
> >  	struct kstat stat;
> >  	__be32 status;
> >  
> > -	/* Currently only need to get DIO alignment info for regular files */
> > -	if (!S_ISREG(inode->i_mode))
> > +	/* Currently only need to get DIO alignment info for regular files
> > +	 * IFF NFSD_IO_DIRECT is enabled for nfsd_io_cache_{read,write}.
> 
> What happens if the I/O mode is changed from buffered to direct I/O
> while there are open files? I think you will need to collect the
> alignment parameters on all opens regardless of the I/O mode setting.

Good point... so will just drop this patch, thanks.




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux