| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs: return FIEMAP_EXTENT_UNKNOWN for delayed allocation extent |
| From: | Jeff Liu <jeff.liu@xxxxxxxxxx> |
| Date: | Thu, 6 Jun 2013 06:24:01 -0700 (PDT) |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 |
From: Jie Liu <jeff.liu@xxxxxxxxxx>
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@xxxxxxxxxx>
---
fs/xfs/xfs_iops.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index d82efaa..53ddbdb 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -970,7 +970,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)
--
1.7.9.5
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: 3.10-rc3 xfs mount/recovery failure & ext fsck hang., Dave Chinner |
|---|---|
| Next by Date: | [PATCH] xfstests btrfs/314: test send / receive, Jan Schmidt |
| Previous by Thread: | Re: 3.10-rc3 xfs mount/recovery failure & ext fsck hang., Dave Chinner |
| Next by Thread: | Re: [PATCH] xfs: return FIEMAP_EXTENT_UNKNOWN for delayed allocation extent, Ben Myers |
| Indexes: | [Date] [Thread] [Top] [All Lists] |