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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0febabf-25ee-4fbe-9dfe-77a240cc29db@oracle.com>
Date: Sun, 13 Oct 2024 22:06:04 +0100
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: axboe@...nel.dk, brauner@...nel.org, djwong@...nel.org,
        viro@...iv.linux.org.uk, jack@...e.cz, dchinner@...hat.com,
        cem@...nel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, hare@...e.de,
        martin.petersen@...cle.com, catherine.hoang@...cle.com,
        mcgrof@...nel.org, ritesh.list@...il.com, ojaswin@...ux.ibm.com
Subject: Re: [PATCH v7 5/8] xfs: Support FS_XFLAG_ATOMICWRITES

On 07/10/2024 06:42, Christoph Hellwig wrote:
> On Fri, Oct 04, 2024 at 02:07:05PM +0100, John Garry wrote:
>> Sure, that is true (about being able to atomically write 1x FS block if the
>> bdev support it).
>>
>> But if we are going to add forcealign or similar later, then it would make
>> sense (to me) to have FS_XFLAG_ATOMICWRITES (and its other flags) from the
>> beginning. I mean, for example, if FS_XFLAG_FORCEALIGN were enabled and we
>> want atomic writes, setting FS_XFLAG_ATOMICWRITES would be rejected if AG
>> count is not aligned with extsize, or extsize is not a power-of-2, or
>> extsize exceeds bdev limits. So FS_XFLAG_ATOMICWRITES could have some value
>> there.
>>
>> As such, it makes sense to have a consistent user experience and require
>> FS_XFLAG_ATOMICWRITES from the beginning.
> 
> Well, even with forcealign we're not going to lose support for atomic
> writes <= block size, are we?
> 

forcealign would not be required for atomic writes <= FS block size.

How about this modified approach:

a. Drop FS_XFLAG_ATOMICWRITES support from this series, and so we can 
always atomic write 1x FS block (if the bdev supports it)

b. If we agree to support forcealign afterwards, then we can introduce 
2x new flags:
	- FS_XFLAG_FORCEALIGN - as before
	- FS_XFLAG_BIG_ATOMICWRITES - this depends on  FS_XFLAG_FORCEALIGN 
being enabled per inode, and allows us to atomically write > 1 FS block

c. Later support writing < 1 FS block
	- this would not depend on forcealign
	- would require a real user, and I don't know one yet

better?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ