From: Jie Liu Date: Thu, 6 Jun 2013 13:24:01 +0000 (-0700) Subject: xfs: return FIEMAP_EXTENT_UNKNOWN for delayed allocation extent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=635c4d0bd94512de3aafa7ae8f45c1dce0fc1ffe;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Reviewed-by: Ben Myers Signed-off-by: Ben Myers --- 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( if (bmv->bmv_oflags & BMV_OF_PREALLOC) fiemap_flags |= FIEMAP_EXTENT_UNWRITTEN; else if (bmv->bmv_oflags & BMV_OF_DELALLOC) { - fiemap_flags |= FIEMAP_EXTENT_DELALLOC; + fiemap_flags |= (FIEMAP_EXTENT_DELALLOC | + FIEMAP_EXTENT_UNKNOWN); physical = 0; /* no block yet */ } if (bmv->bmv_oflags & BMV_OF_LAST)