linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 07/13] iomap: move IOMAP_F_BOUNDARY to gfs2
Date: Wed, 30 May 2018 11:58:07 +0200	[thread overview]
Message-ID: <20180530095813.31245-8-hch@lst.de> (raw)
In-Reply-To: <20180530095813.31245-1-hch@lst.de>

Just define a range of fs specific flags and use that in gfs2 instead of
exposing this internal flag flobally.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/gfs2/bmap.c        | 8 +++++---
 include/linux/iomap.h | 9 +++++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index cbeedd3cfb36..8efa6297e19c 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -683,6 +683,8 @@ static void gfs2_stuffed_iomap(struct inode *inode, struct iomap *iomap)
 	iomap->type = IOMAP_INLINE;
 }
 
+#define IOMAP_F_GFS2_BOUNDARY IOMAP_F_PRIVATE
+
 /**
  * gfs2_iomap_begin - Map blocks from an inode to disk blocks
  * @inode: The inode
@@ -774,7 +776,7 @@ int gfs2_iomap_begin(struct inode *inode, loff_t pos, loff_t length,
 	bh = mp.mp_bh[ip->i_height - 1];
 	len = gfs2_extent_length(bh->b_data, bh->b_size, ptr, lend - lblock, &eob);
 	if (eob)
-		iomap->flags |= IOMAP_F_BOUNDARY;
+		iomap->flags |= IOMAP_F_GFS2_BOUNDARY;
 	iomap->length = (u64)len << inode->i_blkbits;
 
 out_release:
@@ -846,12 +848,12 @@ int gfs2_block_map(struct inode *inode, sector_t lblock,
 
 	if (iomap.length > bh_map->b_size) {
 		iomap.length = bh_map->b_size;
-		iomap.flags &= ~IOMAP_F_BOUNDARY;
+		iomap.flags &= ~IOMAP_F_GFS2_BOUNDARY;
 	}
 	if (iomap.addr != IOMAP_NULL_ADDR)
 		map_bh(bh_map, inode->i_sb, iomap.addr >> inode->i_blkbits);
 	bh_map->b_size = iomap.length;
-	if (iomap.flags & IOMAP_F_BOUNDARY)
+	if (iomap.flags & IOMAP_F_GFS2_BOUNDARY)
 		set_buffer_boundary(bh_map);
 	if (iomap.flags & IOMAP_F_NEW)
 		set_buffer_new(bh_map);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 13d19b4c29a9..819e0cd2a950 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -27,8 +27,7 @@ struct vm_fault;
  * written data and requires fdatasync to commit them to persistent storage.
  */
 #define IOMAP_F_NEW		0x01	/* blocks have been newly allocated */
-#define IOMAP_F_BOUNDARY	0x02	/* mapping ends at metadata boundary */
-#define IOMAP_F_DIRTY		0x04	/* uncommitted metadata */
+#define IOMAP_F_DIRTY		0x02	/* uncommitted metadata */
 
 /*
  * Flags that only need to be reported for IOMAP_REPORT requests:
@@ -36,6 +35,12 @@ struct vm_fault;
 #define IOMAP_F_MERGED		0x10	/* contains multiple blocks/extents */
 #define IOMAP_F_SHARED		0x20	/* block shared with another file */
 
+/*
+ * Flags from 0x1000 up are for file system specific usage:
+ */
+#define IOMAP_F_PRIVATE		0x1000
+
+
 /*
  * Magic value for addr:
  */
-- 
2.17.0

  parent reply	other threads:[~2018-05-30  9:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  9:58 iomap based buffered reads & iomap cleanups v4 Christoph Hellwig
2018-05-30  9:58 ` [PATCH 01/13] block: add a lower-level bio_add_page interface Christoph Hellwig
2018-05-30 10:12   ` Ming Lei
2018-05-30  9:58 ` [PATCH 02/13] mm: give the 'ret' variable a better name __do_page_cache_readahead Christoph Hellwig
2018-05-30 23:01   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 03/13] mm: return an unsigned int from __do_page_cache_readahead Christoph Hellwig
2018-05-30 23:02   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 04/13] mm: split ->readpages calls to avoid non-contiguous pages lists Christoph Hellwig
2018-05-30 23:02   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 05/13] iomap: inline data should be an iomap type, not a flag Christoph Hellwig
2018-05-30 23:05   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 06/13] iomap: fix the comment describing IOMAP_NOWAIT Christoph Hellwig
2018-05-30 23:05   ` Dave Chinner
2018-05-30  9:58 ` Christoph Hellwig [this message]
2018-05-30 23:08   ` [PATCH 07/13] iomap: move IOMAP_F_BOUNDARY to gfs2 Dave Chinner
2018-05-30  9:58 ` [PATCH 08/13] iomap: use __bio_add_page in iomap_dio_zero Christoph Hellwig
2018-05-30 23:09   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 09/13] iomap: add a iomap_sector helper Christoph Hellwig
2018-05-30 23:10   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 10/13] iomap: add an iomap-based bmap implementation Christoph Hellwig
2018-05-30 23:11   ` Dave Chinner
2018-05-31  6:07     ` Christoph Hellwig
2018-05-30  9:58 ` [PATCH 11/13] iomap: add an iomap-based readpage and readpages implementation Christoph Hellwig
2018-05-30 16:22   ` Darrick J. Wong
2018-05-30 23:45   ` Dave Chinner
2018-05-31  6:13     ` Christoph Hellwig
2018-05-31 11:59       ` Dave Chinner
2018-05-30  9:58 ` [PATCH 12/13] xfs: use iomap_bmap Christoph Hellwig
2018-05-30 23:46   ` Dave Chinner
2018-05-30  9:58 ` [PATCH 13/13] xfs: use iomap for blocksize == PAGE_SIZE readpage and readpages Christoph Hellwig
2018-05-30 23:47   ` Dave Chinner
2018-05-31 18:06 iomap based buffered reads & iomap cleanups v5 Christoph Hellwig
2018-05-31 18:06 ` [PATCH 07/13] iomap: move IOMAP_F_BOUNDARY to gfs2 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=20180530095813.31245-8-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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).