Re: [PATCH v2] NFSD: Implement FATTR4_CLONE_BLKSIZE attribute

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

 



On Tue, May 06, 2025 at 11:01:05AM -0400, cel@xxxxxxxxxx wrote:
> +static __be32 nfsd4_encode_fattr4_clone_blksize(struct xdr_stream *xdr,
> +						const struct nfsd4_fattr_args *args)

Overly long line here.  And easily avoided by using the much more
maintainable two-tab indents for prototype continuations.

> +{
> +	struct inode *inode = d_inode(args->dentry);
> +
> +	return nfsd4_encode_uint32_t(xdr, inode->i_sb->s_blocksize);

That's a bit of an assumption.  The generic clone prep function uses
the block size, but file systems aren't required to actually use
generic_remap_file_range_prep.

Probably still the best we can do, but a comment explaining including
a reference to generic_remap_checks / generic_remap_file_range_prep
would be very useful here.





[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