All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chuck Lever <cel@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	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>
Subject: Re: [PATCH] NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
Date: Tue, 6 May 2025 06:49:52 -0700	[thread overview]
Message-ID: <aBoTgFTJ2rPB3Hsk@infradead.org> (raw)
In-Reply-To: <1fb2ff54-9e49-4697-9485-5323791a0f9b@kernel.org>

On Tue, May 06, 2025 at 09:45:56AM -0400, Chuck Lever wrote:
> On 5/6/25 4:10 AM, Christoph Hellwig wrote:
> > On Sun, Apr 27, 2025 at 12:39:14PM -0400, cel@kernel.org wrote:
> >> NFSD can return 0 here, as at least one client implementation we
> >> are aware of (the Linux NFS client) treats 0 as meaning "CLONE has
> >> no alignment restrictions".
> > 
> > Usually clone does have a restriction, though.
> 
> Then should this patch extract that block size and report it? Pointer
> to sample code would kickstart me to get that done.

I think reporting 0 as unknown makes perfect sense, just don't claim
that there is no limitation.

The generic remap range checks for file system block size alignment:

	if (!IS_ALIGNED(pos_in, bs) || !IS_ALIGNED(pos_out, bs))
		return -EINVAL;

in generic_remap_checks.


      reply	other threads:[~2025-05-06 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-27 16:39 [PATCH] NFSD: Implement FATTR4_CLONE_BLKSIZE attribute cel
2025-05-06  8:10 ` Christoph Hellwig
2025-05-06  9:31   ` Roland Mainz
2025-05-06 13:45   ` Chuck Lever
2025-05-06 13:49     ` 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=aBoTgFTJ2rPB3Hsk@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.