Re: Inquiry about ext4 atomic write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"lilei.777@xxxxxxxxxxxxx" <lilei.777@xxxxxxxxxxxxx> 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@xxxxxxxxx/

Hi Lei, 

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

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@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
[2]: https://lore.kernel.org/linux-xfs/20241204154344.3034362-1-john.g.garry@xxxxxxxxxx/


-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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux