linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: ignore extent size hints for always COW inodes
Date: Fri, 11 Oct 2019 17:32:26 -0700	[thread overview]
Message-ID: <20191012003226.GN13108@magnolia> (raw)
In-Reply-To: <20191011130316.13373-3-hch@lst.de>

On Fri, Oct 11, 2019 at 06:03:16AM -0700, Christoph Hellwig wrote:
> There is no point in applying extent size hints for always COW inodes,
> as we would just have to COW any extra allocation beyond the data
> actually written.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok, I guess?

By the way, what's the plan for always_cow inodes, seeing as it's still
only a debugging feature?

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/xfs_inode.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 18f4b262e61c..2e94deb4610a 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -55,6 +55,12 @@ xfs_extlen_t
>  xfs_get_extsz_hint(
>  	struct xfs_inode	*ip)
>  {
> +	/*
> +	 * No point in aligning allocations if we need to COW to actually
> +	 * write to them.
> +	 */
> +	if (xfs_is_always_cow_inode(ip))
> +		return 0;
>  	if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize)
>  		return ip->i_d.di_extsize;
>  	if (XFS_IS_REALTIME_INODE(ip))
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-10-12  0:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 13:03 small fixes for the always_cow mode Christoph Hellwig
2019-10-11 13:03 ` [PATCH 1/2] xfs: disable xfs_ioc_space for always COW inodes Christoph Hellwig
2019-10-12  0:29   ` Darrick J. Wong
2019-10-14  7:18     ` Christoph Hellwig
2019-10-11 13:03 ` [PATCH 2/2] xfs: ignore extent size hints " Christoph Hellwig
2019-10-12  0:32   ` Darrick J. Wong [this message]
2019-10-14  7:19     ` 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=20191012003226.GN13108@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /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).