public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: cel@kernel.org
Cc: NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
	Roland Mainz <roland.mainz@nrubsig.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2] NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
Date: Tue, 6 May 2025 22:32:57 -0700	[thread overview]
Message-ID: <aBrwiS1DM1i-DBXH@infradead.org> (raw)
In-Reply-To: <20250506150105.11874-1-cel@kernel.org>

On Tue, May 06, 2025 at 11:01:05AM -0400, cel@kernel.org 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.


      parent reply	other threads:[~2025-05-07  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 15:01 [PATCH v2] NFSD: Implement FATTR4_CLONE_BLKSIZE attribute cel
2025-05-06 15:10 ` Roland Mainz
2025-05-07  5:32 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBrwiS1DM1i-DBXH@infradead.org \
    --to=hch@infradead.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=roland.mainz@nrubsig.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox