public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, edwin@etorok.net
Subject: Re: [PATCH 2/9] xfs: rename xfs_bmap_is_real_extent to is_written_extent
Date: Thu, 25 Jun 2020 08:26:43 -0400	[thread overview]
Message-ID: <20200625122643.GD2863@bfoster> (raw)
In-Reply-To: <159304787204.874036.10765296473918147829.stgit@magnolia>

On Wed, Jun 24, 2020 at 06:17:52PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> The name of this predicate is a little misleading -- it decides if the
> extent mapping is allocated and written.  Change the name to be more
> direct, as we're going to add a new predicate in the next patch.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/libxfs/xfs_bmap.h     |    2 +-
>  fs/xfs/libxfs/xfs_rtbitmap.c |    2 +-
>  fs/xfs/xfs_reflink.c         |    6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
> index 6028a3c825ba..2b18338d0643 100644
> --- a/fs/xfs/libxfs/xfs_bmap.h
> +++ b/fs/xfs/libxfs/xfs_bmap.h
> @@ -163,7 +163,7 @@ static inline int xfs_bmapi_whichfork(int bmapi_flags)
>   * Return true if the extent is a real, allocated extent, or false if it is  a
>   * delayed allocation, and unwritten extent or a hole.
>   */
> -static inline bool xfs_bmap_is_real_extent(struct xfs_bmbt_irec *irec)
> +static inline bool xfs_bmap_is_written_extent(struct xfs_bmbt_irec *irec)
>  {
>  	return irec->br_state != XFS_EXT_UNWRITTEN &&
>  		irec->br_startblock != HOLESTARTBLOCK &&
> diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c
> index 9498ced947be..1d9fa8a300f1 100644
> --- a/fs/xfs/libxfs/xfs_rtbitmap.c
> +++ b/fs/xfs/libxfs/xfs_rtbitmap.c
> @@ -70,7 +70,7 @@ xfs_rtbuf_get(
>  	if (error)
>  		return error;
>  
> -	if (XFS_IS_CORRUPT(mp, nmap == 0 || !xfs_bmap_is_real_extent(&map)))
> +	if (XFS_IS_CORRUPT(mp, nmap == 0 || !xfs_bmap_is_written_extent(&map)))
>  		return -EFSCORRUPTED;
>  
>  	ASSERT(map.br_startblock != NULLFSBLOCK);
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index d89201d40891..22fdea6d69d3 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -179,7 +179,7 @@ xfs_reflink_trim_around_shared(
>  	int			error = 0;
>  
>  	/* Holes, unwritten, and delalloc extents cannot be shared */
> -	if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_real_extent(irec)) {
> +	if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_written_extent(irec)) {
>  		*shared = false;
>  		return 0;
>  	}
> @@ -655,7 +655,7 @@ xfs_reflink_end_cow_extent(
>  	 * preallocations can leak into the range we are called upon, and we
>  	 * need to skip them.
>  	 */
> -	if (!xfs_bmap_is_real_extent(&got)) {
> +	if (!xfs_bmap_is_written_extent(&got)) {
>  		*end_fsb = del.br_startoff;
>  		goto out_cancel;
>  	}
> @@ -996,7 +996,7 @@ xfs_reflink_remap_extent(
>  	xfs_off_t		new_isize)
>  {
>  	struct xfs_mount	*mp = ip->i_mount;
> -	bool			real_extent = xfs_bmap_is_real_extent(irec);
> +	bool			real_extent = xfs_bmap_is_written_extent(irec);
>  	struct xfs_trans	*tp;
>  	unsigned int		resblks;
>  	struct xfs_bmbt_irec	uirec;
> 


  reply	other threads:[~2020-06-25 12:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25  1:17 [PATCH v2 0/9] xfs: reflink cleanups Darrick J. Wong
2020-06-25  1:17 ` [PATCH 1/9] xfs: fix reflink quota reservation accounting error Darrick J. Wong
2020-06-25 12:26   ` Brian Foster
2020-07-01  8:07   ` Christoph Hellwig
2020-06-25  1:17 ` [PATCH 2/9] xfs: rename xfs_bmap_is_real_extent to is_written_extent Darrick J. Wong
2020-06-25 12:26   ` Brian Foster [this message]
2020-07-01  8:08   ` Christoph Hellwig
2020-06-25  1:17 ` [PATCH 3/9] xfs: redesign the reflink remap loop to fix blkres depletion crash Darrick J. Wong
2020-06-25 12:27   ` Brian Foster
2020-06-25 16:57     ` Darrick J. Wong
2020-06-25 17:23   ` [PATCH v4.2 " Darrick J. Wong
2020-06-26 11:57     ` Brian Foster
2020-06-26 16:40       ` Darrick J. Wong
2020-07-01  8:20     ` Christoph Hellwig
2020-06-25  1:18 ` [PATCH 4/9] xfs: only reserve quota blocks for bmbt changes if we're changing the data fork Darrick J. Wong
2020-06-25 12:27   ` Brian Foster
2020-07-01  8:21   ` Christoph Hellwig
2020-06-25  1:18 ` [PATCH 5/9] xfs: only reserve quota blocks if we're mapping into a hole Darrick J. Wong
2020-06-25 12:28   ` Brian Foster
2020-07-01  8:22   ` Christoph Hellwig
2020-06-25  1:18 ` [PATCH 6/9] xfs: reflink can skip remap existing mappings Darrick J. Wong
2020-06-25 12:28   ` Brian Foster
2020-06-25 16:49     ` Darrick J. Wong
2020-06-25  1:18 ` [PATCH 7/9] xfs: fix xfs_reflink_remap_prep calling conventions Darrick J. Wong
2020-07-01  8:23   ` Christoph Hellwig
2020-06-25  1:18 ` [PATCH 8/9] xfs: refactor locking and unlocking two inodes against userspace IO Darrick J. Wong
2020-07-01  8:26   ` Christoph Hellwig
2020-06-25  1:18 ` [PATCH 9/9] xfs: move helpers that lock and unlock " Darrick J. Wong
2020-07-01  8:27   ` Christoph Hellwig
2020-06-28 12:06 ` [PATCH v2 0/9] xfs: reflink cleanups Edwin Török
2020-06-28 22:36   ` Darrick J. Wong

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=20200625122643.GD2863@bfoster \
    --to=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=edwin@etorok.net \
    --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