iomap: add IOMAP_F_NEW flag
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Sep 2016 01:24:37 +0000 (11:24 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 01:24:37 +0000 (11:24 +1000)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iomap.c
include/linux/iomap.h

index f96c8ffce5f4a6b91beec091a8979ec897b6b5e8..ac677d032e3a95be827cda69d2694fe5e39637f8 100644 (file)
@@ -1000,6 +1000,7 @@ xfs_file_iomap_begin(
                if (error)
                        return error;
 
+               iomap->flags = IOMAP_F_NEW;
                trace_xfs_iomap_alloc(ip, offset, length, 0, &imap);
        } else {
                ASSERT(nimaps);
index 3d70ece1031377c41933712782268eaabaee7fe5..14d7067f8b0628cc8c05d73d44637cf3c5a1f881 100644 (file)
@@ -22,6 +22,7 @@ struct vm_fault;
  * Flags for iomap mappings:
  */
 #define IOMAP_F_MERGED 0x01    /* contains multiple blocks/extents */
+#define IOMAP_F_NEW    0x02    /* blocks have been newly allocated */
 
 /*
  * Magic value for blkno: