lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c656fa4d-eb76-4caa-8a71-a8d8a2ba6206@oracle.com>
Date: Thu, 20 Mar 2025 09:19:40 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: alx@...nel.org, brauner@...nel.org, djwong@...nel.org, dchinner@...hat.com,
        linux-man@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        ojaswin@...ux.ibm.com, ritesh.list@...il.com,
        martin.petersen@...cle.com
Subject: Re: [PATCH RFC] statx.2: Add stx_atomic_write_unit_max_opt

On 20/03/2025 07:00, Christoph Hellwig wrote:
> On Wed, Mar 19, 2025 at 11:44:02AM +0000, John Garry wrote:
>> XFS supports atomic writes - or untorn writes - based on different methods:
>> - HW offload in the disk
>> - Software emulation
>>
>> The value reported in stx_atomic_write_unit_max will be the max of the
>> software emulation method.
> 
> I don't think emulation is a good word.  A file system implementing
> file systems things is not emulation.

Sure, I am still in the mindset that a filesystem-based atomic write is 
a 2nd-class citizen and just trying to emulate what can be done in the disk.

> 
>> We want STATX_WRITE_ATOMIC to get this new member in addition to the
>> already-existing members, so mention that a value of 0 means that
>> stx_atomic_write_unit_max holds this limit.
> 
> Does that actually work?  Can userspace assume all unknown statx
> fields are padded to zero?  If so my dio read align change could have
> done away with the extra flag.

I will double check that, but if we needed to add another mask just for 
getting this, then yuck.

> 
> 
But is there value in reporting this limit? I am not sure. I am not sure 
what the user would do with this info.

Maybe, for example, they want to write 1K consecutive 16K pages, each 
atomically, and decide to do a big 16M atomic write but find that it is 
slow as bdev atomic limit is < 16M.

Maybe I should just update the documentation to mention that for XFS 
they should check the mounted bdev atomic limits.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ