aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-06-06 09:24:01 -0400
committerBen Myers <bpm@sgi.com>2013-06-19 15:18:32 -0400
commit635c4d0bd94512de3aafa7ae8f45c1dce0fc1ffe (patch)
tree0bdf3ba8e7739bc8859f6e4b68711dc2cebe6d9c /fs/xfs
parent725eb1eb2ae88c200466fec34bcf1fbce4b8eca3 (diff)
xfs: return FIEMAP_EXTENT_UNKNOWN for delayed allocation extent
For FIEMAP ioctl(2), if an extent is in delayed allocation state, we need to return the FIEMAP_EXTENT_UNKNOWN flag except the FIEMAP_EXTENT_DELALLOC because its data location is unknown. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_iops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index ca9ecaa81112..c69bbc493cb0 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -987,7 +987,8 @@ xfs_fiemap_format(
987 if (bmv->bmv_oflags & BMV_OF_PREALLOC) 987 if (bmv->bmv_oflags & BMV_OF_PREALLOC)
988 fiemap_flags |= FIEMAP_EXTENT_UNWRITTEN; 988 fiemap_flags |= FIEMAP_EXTENT_UNWRITTEN;
989 else if (bmv->bmv_oflags & BMV_OF_DELALLOC) { 989 else if (bmv->bmv_oflags & BMV_OF_DELALLOC) {
990 fiemap_flags |= FIEMAP_EXTENT_DELALLOC; 990 fiemap_flags |= (FIEMAP_EXTENT_DELALLOC |
991 FIEMAP_EXTENT_UNKNOWN);
991 physical = 0; /* no block yet */ 992 physical = 0; /* no block yet */
992 } 993 }
993 if (bmv->bmv_oflags & BMV_OF_LAST) 994 if (bmv->bmv_oflags & BMV_OF_LAST)