linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@lst.de>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>, Chandan Babu R <chandan.babu@oracle.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	Hongbo Li <lihongbo22@huawei.com>,
	Ryusuke Konishi <konishi.ryusuke@gmail.com>,
	linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/5] xfs: report larger dio alignment for COW inodes
Date: Wed, 8 Jan 2025 10:11:27 +0000	[thread overview]
Message-ID: <32a8102c-2243-4cc0-b35f-5be2d36ffd98@oracle.com> (raw)
In-Reply-To: <20250108085549.1296733-6-hch@lst.de>

On 08/01/2025 08:55, Christoph Hellwig wrote:
> For I/O to reflinked blocks we always need to write an entire new file
> system block, and the code enforces the file system block alignment for
> the entire file if it has any reflinked blocks.  Mirror the larger
> value reported in the statx in the dio_offset_align in the xfs-specific
> XFS_IOC_DIOINFO ioctl for the same reason.
> 
> Don't bother adding a new field for the read alignment to this legacy
> ioctl as all new users should use statx instead.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   fs/xfs/xfs_ioctl.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 0789c18aaa18..20f3cf5391c6 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1204,7 +1204,16 @@ xfs_file_ioctl(
>   		struct xfs_buftarg	*target = xfs_inode_buftarg(ip);
>   		struct dioattr		da;
>   
> -		da.d_mem =  da.d_miniosz = target->bt_logical_sectorsize;
> +		da.d_mem = target->bt_logical_sectorsize;
> +
> +		/*
> +		 * See xfs_report_dioalign() why report a potential larger than
> +		 * sector sizevalue here for COW inodes.

nit: sizevalue

> +		 */
> +		if (xfs_is_cow_inode(ip))
> +			da.d_miniosz = xfs_inode_alloc_unitsize(ip);
> +		else
> +			da.d_miniosz = target->bt_logical_sectorsize;
>   		da.d_maxiosz = INT_MAX & ~(da.d_miniosz - 1);
>   
>   		if (copy_to_user(arg, &da, sizeof(da)))


  reply	other threads:[~2025-01-08 10:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  8:55 add STATX_DIO_READ_ALIGN v2 Christoph Hellwig
2025-01-08  8:55 ` [PATCH 1/5] fs: reformat the statx definition Christoph Hellwig
2025-01-08 10:08   ` John Garry
2025-01-08  8:55 ` [PATCH 2/5] fs: add STATX_DIO_READ_ALIGN Christoph Hellwig
2025-01-08 10:09   ` John Garry
2025-01-08  8:55 ` [PATCH 3/5] xfs: cleanup xfs_vn_getattr Christoph Hellwig
2025-01-08  8:55 ` [PATCH 4/5] xfs: report the correct read/write dio alignment for reflinked inodes Christoph Hellwig
2025-01-08 10:10   ` John Garry
2025-01-08 10:13   ` John Garry
2025-01-08 15:18     ` Christoph Hellwig
2025-01-08 17:20       ` Darrick J. Wong
2025-01-08 17:53   ` Eric Biggers
2025-01-09  6:25     ` Christoph Hellwig
2025-01-08  8:55 ` [PATCH 5/5] xfs: report larger dio alignment for COW inodes Christoph Hellwig
2025-01-08 10:11   ` John Garry [this message]
2025-01-08 17:25     ` Darrick J. Wong
2025-01-08  8:59 ` [PATCH] statx.2: document STATX_DIO_READ_ALIGN Christoph Hellwig
2025-01-08 17:27   ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2025-01-09  8:31 add STATX_DIO_READ_ALIGN v3 Christoph Hellwig
2025-01-09  8:31 ` [PATCH 5/5] xfs: report larger dio alignment for COW inodes Christoph Hellwig

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=32a8102c-2243-4cc0-b35f-5be2d36ffd98@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=brauner@kernel.org \
    --cc=chandan.babu@oracle.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=konishi.ryusuke@gmail.com \
    --cc=lihongbo22@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).