public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: alx@kernel.org, brauner@kernel.org, djwong@kernel.org,
	dchinner@redhat.com, linux-man@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, ojaswin@linux.ibm.com,
	ritesh.list@gmail.com, martin.petersen@oracle.com,
	linux-api@vger.kernel.org
Subject: Re: [PATCH RFC] statx.2: Add stx_atomic_write_unit_max_opt
Date: Thu, 3 Apr 2025 16:07:04 +0100	[thread overview]
Message-ID: <5485c1ad-8a20-40bc-aa75-68b820de5e1c@oracle.com> (raw)
In-Reply-To: <20250323064029.GA30848@lst.de>

On 23/03/2025 06:40, Christoph Hellwig wrote:

I'm not happy with the name stx_atomic_write_unit_max_opt - it's vague 
and subjective.

So I am thinking one of these:
a. stx_atomic_write_unit_max_dev
b. stx_atomic_write_unit_max_bdev
c. stx_atomic_write_unit_max_align
d. stx_atomic_write_unit_max_hw

The terms dev (or device) and bdev are already used in the meaning of 
some members in struct statx, so not too bad. However, when we support 
large atomic writes for XFS rtvol, the bdev atomic write limit and 
rtextsize would influence this value (so just bdev might be a bit 
misleading in the name).

As for stx_atomic_write_unit_max_align, it would mean "max 
alignment/granularity" for possible HW offload. Not great.

stx_atomic_write_unit_max_hw would match the bdev request queue sysfs 
names, but that it a different concept to statx. And it has the same 
issue as bdev for rtvol, above.

Any further suggestions or comments?

> On Fri, Mar 21, 2025 at 10:20:21AM +0000, John Garry wrote:
>> Coming back to what was discussed about not adding a new flag to fetch this
>> limit:
>>
>>> Does that actually work?  Can userspace assume all unknown statx
>>> fields are padded to zero?
>>
>> In cp_statx, we do pre-zero the statx structure. As such, the rule "if
>> zero, just use hard limit unit max" seems to hold.
> 
> Ok, canwe document this somewhere?
> 

Sure, but I want to decide on the name first.. if using 
stx_atomic_write_unit_max_bdev/_dev/hw, then it would be odd that this 
value reports 0 for old kernels (as the bdev limit would never really be 0).

Then if we have rule "stx_atomic_write_unit_max_bdev=0 means that 
stx_atomic_write_unit_max_bdev = stx_atomic_write_unit_max", this breaks 
for when we solely rely on FS-based atomics, as 
stx_atomic_write_unit_max_bdev would be 0 there and that should really 
mean 0 (and not stx_atomic_write_unit_max).

So then we should have a new mask to fetch this field, which is not 
ideal, but ok.


  reply	other threads:[~2025-04-03 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 11:44 [PATCH RFC] statx.2: Add stx_atomic_write_unit_max_opt John Garry
2025-03-20  7:00 ` Christoph Hellwig
2025-03-20  9:19   ` John Garry
2025-03-20 14:12     ` Christoph Hellwig
2025-03-21 10:20       ` John Garry
2025-03-23  6:40         ` Christoph Hellwig
2025-04-03 15:07           ` John Garry [this message]
2025-04-04  9:06             ` Christoph Hellwig
2025-04-04  9:23               ` John Garry
2025-04-07  6:51                 ` Christoph Hellwig

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=5485c1ad-8a20-40bc-aa75-68b820de5e1c@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=alx@kernel.org \
    --cc=brauner@kernel.org \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.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