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>] [day] [month] [year] [list]
Message-ID: <87cyfws2bu.fsf@gmail.com>
Date: Wed, 05 Feb 2025 23:26:05 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: "lilei.777@...edance.com" <lilei.777@...edance.com>
Cc: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: Inquiry about ext4 atomic write

"lilei.777@...edance.com" <lilei.777@...edance.com> writes:

> Hi  Harjani,
>
> I tend to enable ext4 16kb atomic write on my X86 machine, and read your
> RFC.
> https://lwn.net/ml/linux-kernel/cover.1709356594.git.ritesh.list@gmail.com/

Hi Lei, 

This is the final version which got merged [1]
[1]: https://lore.kernel.org/all/cover.1730437365.git.ritesh.list@gmail.com/

On x86, we don't have bs > ps feature. And as of today iomap restricts
the atomic write to a single filesystem block. Hence for systems with 4k
pagesize, we can't have atomic write request of size 16k on a 4k
blocksize ext4. But on arm64 or powerpc (with 64k ps) we should be
able to enable this with 16k bs, because ext4 can work with bs < ps. 

>
> From the cover patch, it's seems that this feature will be successfully
> enabled
> if I enable bigalloc on ext4, and underlying device also supports 16kb
> write union.

Yes, there are still ongoing discussions around this in the community
[1][2]. 

[1]: https://lore.kernel.org/all/Z5nTaQgLGdD6hSvL@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com/
[2]: https://lore.kernel.org/linux-xfs/20241204154344.3034362-1-john.g.garry@oracle.com/


-ritesh

> However, after checking xstat result, i found atomic_write_unit_max was
> always 4096.
>
> This snippet below limits s_awu_max to 4096(bs) which is the max value on
> my platform.
>
> ```
> static void ext4_atomic_write_init(struct super_block *sb)
> {
> ...
> sbi->s_awu_min = max(sb->s_blocksize,
>      bdev_atomic_write_unit_min_bytes(bdev));
> sbi->s_awu_max = min(sb->s_blocksize,
>      bdev_atomic_write_unit_max_bytes(bdev));
> ...
> }
> ```
>
> I am wondering if I missed someting? Or if there any other ways could
> enable 16kb
> atomic write on my platform?
>
> Thanks!
> Li Lei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ