ocfs2: Use FIEMAP_EXTENT_SHARED
authorSunil Mushran <sunil.mushran@oracle.com>
Thu, 3 Dec 2009 20:46:52 +0000 (12:46 -0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 18 Dec 2009 04:55:59 +0000 (20:55 -0800)
Adds FIEMAP_EXTENT_SHARED flag to refcounted extents.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/extent_map.c

index 843db64e9d4ae9d5b9a353a3e7b3d001c3456297..cdce5f8c1cfa56d9ab344159968743b2e8f537bb 100644 (file)
@@ -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;