All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 1/3] xfs: introduce XFS_MAX_FILEOFF
Date: Tue, 07 Jan 2020 20:17:38 -0800	[thread overview]
Message-ID: <157845705884.82882.5003824524655587269.stgit@magnolia> (raw)
In-Reply-To: <157845705246.82882.11480625967486872968.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

Introduce a new #define for the maximum supported file block offset.
We'll use this in the next patch to make it more obvious that we're
doing some operation for all possible inode fork mappings after a given
offset.  We can't use ULLONG_MAX here because bunmapi uses that to
detect when it's done.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_format.h |    1 +
 fs/xfs/xfs_reflink.c       |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)


diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 1b7dcbae051c..c2976e441d43 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -1540,6 +1540,7 @@ typedef struct xfs_bmdr_block {
 #define BMBT_BLOCKCOUNT_BITLEN	21
 
 #define BMBT_STARTOFF_MASK	((1ULL << BMBT_STARTOFF_BITLEN) - 1)
+#define XFS_MAX_FILEOFF		(BMBT_STARTOFF_MASK)
 
 typedef struct xfs_bmbt_rec {
 	__be64			l0, l1;
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index de451235c4ee..7a6c94295b8a 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -1457,7 +1457,8 @@ xfs_reflink_clear_inode_flag(
 	 * We didn't find any shared blocks so turn off the reflink flag.
 	 * First, get rid of any leftover CoW mappings.
 	 */
-	error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, true);
+	error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, XFS_MAX_FILEOFF,
+			true);
 	if (error)
 		return error;
 


  reply	other threads:[~2020-01-08  4:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  4:17 [PATCH v2 0/3] xfs: fix maxbytes problems on 32-bit systems Darrick J. Wong
2020-01-08  4:17 ` Darrick J. Wong [this message]
2020-01-08  8:09   ` [PATCH 1/3] xfs: introduce XFS_MAX_FILEOFF Christoph Hellwig
2020-01-08 16:37     ` Darrick J. Wong
2020-01-08 20:40   ` Dave Chinner
2020-01-08 22:32     ` Darrick J. Wong
2020-01-08 22:42       ` Dave Chinner
2020-01-08 23:04         ` Darrick J. Wong
2020-01-08  4:17 ` [PATCH 2/3] xfs: truncate should remove all blocks, not just to the end of the page cache Darrick J. Wong
2020-01-08  8:11   ` Christoph Hellwig
2020-01-08 16:37     ` Darrick J. Wong
2020-01-08  4:17 ` [PATCH 3/3] xfs: fix s_maxbytes computation on 32-bit kernels Darrick J. Wong
2020-01-08  8:12   ` Christoph Hellwig
2020-01-09 18:44 [PATCH v3 0/3] xfs: fix maxbytes problems on 32-bit systems Darrick J. Wong
2020-01-09 18:44 ` [PATCH 1/3] xfs: introduce XFS_MAX_FILEOFF Darrick J. Wong
2020-01-10 11:52   ` 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=157845705884.82882.5003824524655587269.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.