Skip to contentSkip to conversation

fiemap: Add new extent flag FIEMAP_EXTENT_SHARED

PATCH New Sunil Mushran 1 participant 2 messages Oct 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fiemap: Add new extent flag FIEMAP_EXTENT_SHARED

Patch adds flag FIEMAP_EXTENT_SHARED to denote extents that are shared with other inodes.

---
 include/linux/fiemap.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/linux/fiemap.h +2 -0
index 934e22d..d830747 100644
@@ -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 */
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 ocfs2: Use FIEMAP_EXTENT_SHARED

Adds FIEMAP_EXTENT_SHARED flag to refcounted extents.

---
 fs/ocfs2/extent_map.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/extent_map.c +2 -0
index 843db64..cdce5f8 100644
@@ -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;
Signature · 1 line
1.6.0.4