* [PATCH] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
@ 2009-10-15 22:41 Sunil Mushran
2009-10-15 22:41 ` [PATCH] ocfs2: Use FIEMAP_EXTENT_SHARED Sunil Mushran
0 siblings, 1 reply; 2+ messages in thread
From: Sunil Mushran @ 2009-10-15 22:41 UTC (permalink / raw)
To: ocfs2-devel, linux-fsdevel, linux-kernel
Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are
shared with other inodes.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
include/linux/fiemap.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
index 934e22d..d830747 100644
--- a/include/linux/fiemap.h
+++ b/include/linux/fiemap.h
@@ -62,5 +62,7 @@ struct fiemap {
#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
* support extents. Result
* merged for efficiency. */
+#define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other
+ * files. */
#endif /* _LINUX_FIEMAP_H */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ocfs2: Use FIEMAP_EXTENT_SHARED
2009-10-15 22:41 [PATCH] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
@ 2009-10-15 22:41 ` Sunil Mushran
0 siblings, 0 replies; 2+ messages in thread
From: Sunil Mushran @ 2009-10-15 22:41 UTC (permalink / raw)
To: ocfs2-devel, linux-fsdevel, linux-kernel
Adds FIEMAP_EXTENT_SHARED flag to refcounted extents.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
fs/ocfs2/extent_map.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index 843db64..cdce5f8 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -786,6 +786,8 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
fe_flags = 0;
if (rec.e_flags & OCFS2_EXT_UNWRITTEN)
fe_flags |= FIEMAP_EXTENT_UNWRITTEN;
+ if (rec.e_flags & OCFS2_EXT_REFCOUNTED)
+ fe_flags |= FIEMAP_EXTENT_SHARED;
if (is_last)
fe_flags |= FIEMAP_EXTENT_LAST;
len_bytes = (u64)le16_to_cpu(rec.e_leaf_clusters) << osb->s_clustersize_bits;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-15 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-15 22:41 [PATCH] fiemap: Add new extent flag FIEMAP_EXTENT_SHARED Sunil Mushran
2009-10-15 22:41 ` [PATCH] ocfs2: Use FIEMAP_EXTENT_SHARED Sunil Mushran
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).