From: Jeff Liu <jeff.liu@oracle.com>
To: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger@dilger.ca>,
Dave Chinner <david@fromorbit.com>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Jan Kara <jack@suse.cz>, Chris Mason <chris.mason@fusionio.com>,
Christoph Hellwig <hch@infradead.org>,
ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [RFC PATCH 1/3] fiemap: Introduce FIEMAP_FLAG_COW flag to map shared extents
Date: Wed, 20 Feb 2013 11:59:22 +0800 [thread overview]
Message-ID: <51244A1A.7060105@oracle.com> (raw)
Introduce a new flag FIEMAP_FLAG_COW to fiemap ioctl(2) interface.
If this flag is set, the kernel will only return the mapped extents
which are in copy-on-write state.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Dilger <adilger@dilger.ca>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jan Kara <jack@suse.de>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: Christoph Hellwig <hch@infradead.org>
---
include/uapi/linux/fiemap.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fiemap.h b/include/uapi/linux/fiemap.h
index d830747..693dff4 100644
--- a/include/uapi/linux/fiemap.h
+++ b/include/uapi/linux/fiemap.h
@@ -40,8 +40,10 @@ struct fiemap {
#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
+#define FIEMAP_FLAG_COW 0x00000004 /* map copy-on-write extents */
-#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
+#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \
+ FIEMAP_FLAG_COW)
#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
--
1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: Jeff Liu <jeff.liu@oracle.com>
To: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger@dilger.ca>,
Dave Chinner <david@fromorbit.com>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Jan Kara <jack@suse.cz>, Chris Mason <chris.mason@fusionio.com>,
Christoph Hellwig <hch@infradead.org>,
ocfs2-devel@oss.oracle.com
Subject: [RFC PATCH 1/3] fiemap: Introduce FIEMAP_FLAG_COW flag to map shared extents
Date: Wed, 20 Feb 2013 11:59:22 +0800 [thread overview]
Message-ID: <51244A1A.7060105@oracle.com> (raw)
Introduce a new flag FIEMAP_FLAG_COW to fiemap ioctl(2) interface.
If this flag is set, the kernel will only return the mapped extents
which are in copy-on-write state.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Dilger <adilger@dilger.ca>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jan Kara <jack@suse.de>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: Christoph Hellwig <hch@infradead.org>
---
include/uapi/linux/fiemap.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fiemap.h b/include/uapi/linux/fiemap.h
index d830747..693dff4 100644
--- a/include/uapi/linux/fiemap.h
+++ b/include/uapi/linux/fiemap.h
@@ -40,8 +40,10 @@ struct fiemap {
#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
+#define FIEMAP_FLAG_COW 0x00000004 /* map copy-on-write extents */
-#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
+#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \
+ FIEMAP_FLAG_COW)
#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
--
1.7.9.5
next reply other threads:[~2013-02-20 3:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 3:59 Jeff Liu [this message]
2013-02-20 3:59 ` [RFC PATCH 1/3] fiemap: Introduce FIEMAP_FLAG_COW flag to map shared extents Jeff Liu
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=51244A1A.7060105@oracle.com \
--to=jeff.liu@oracle.com \
--cc=adilger@dilger.ca \
--cc=chris.mason@fusionio.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jlbec@evilplan.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=viro@zeniv.linux.org.uk \
/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.