Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Pankaj Raghav <p.raghav@samsung.com>,
Cc: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
	Baokun Li <libaokun@linux.alibaba.com>,
	Zhang Yi <yi.zhang@huawei.com>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jan Kara <jack@suse.cz>, Pankaj Raghav <p.raghav@samsung.com>,
	linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH] ext4: set awu_max_opt to awu_max
Date: Thu, 10 Sep 2026 20:45:16 +0530	[thread overview]
Message-ID: <y0d9yw6z.ritesh.list@gmail.com> (raw)
In-Reply-To: <20260910100829.2532894-1-p.raghav@samsung.com>

Pankaj Raghav <p.raghav@samsung.com> writes:

> commit 5d894321c49e ("fs: add atomic write unit max opt to statx")
> added atomic write max optimal to statx. As XFS can support large atomic
> writes through SW, max_opt exposes the value that will be HW accelerated
> atomics.
>
> As ext4 does not support SW atomics, set awu_max_opt to awu_max.
>

As per the man page the awu_max_opt=0 means:

    A value of zero indicates that stx_atomic_write_unit_max is the
    optimised limit.

[1]: https://man7.org/linux/man-pages/man2/statx.2.html

But the value of 0 isn't wrong either. Jan, added that it might be more
clear to report awu_max there instead of 0. So, if are going to do it -
let's add this info to the commit msg. So it doesn't look like we were
trying to fix anything here ;)

btw note that bdev_statx() still reports 0 for awu_max_opt.

With that please feel free to add:

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> ---
>  fs/ext4/inode.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 26f0f9714f03..93056c971e74 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -6304,7 +6304,8 @@ int ext4_getattr(struct mnt_idmap *idmap, const struct path *path,
>  			awu_max = sbi->s_awu_max;
>  		}
>  
> -		generic_fill_statx_atomic_writes(stat, awu_min, awu_max, 0);
> +		generic_fill_statx_atomic_writes(stat, awu_min, awu_max,
> +						 awu_max);
>  	}
>  
>  	flags = ei->i_flags & EXT4_FL_USER_VISIBLE;
>
> base-commit: d5ba62a0b130441bcabca59c2fd2d59e65360234
> -- 
> 2.51.2

  parent reply	other threads:[~2026-09-10 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 10:08 [PATCH] ext4: set awu_max_opt to awu_max Pankaj Raghav
2026-09-10 10:10 ` sashiko-bot
2026-09-10 11:17 ` Jan Kara
2026-09-10 15:15 ` Ritesh Harjani [this message]
2026-09-11 14:15 ` Ojaswin Mujoo

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=y0d9yw6z.ritesh.list@gmail.com \
    --to=ritesh.list@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=p.raghav@samsung.com \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.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