summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2015-05-19 17:44:04 +0300
committerChris Mason <clm@fb.com>2015-06-03 14:03:03 +0300
commit0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e (patch)
treed431e50e8e41e4fa49dfa7a36e0f08ba474f1415 /fs
parentc8d3fe028f64054d75c72566efb9ecf3c75ee161 (diff)
downloadlinux-0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e.tar.xz
Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap
We should be doing this, it's weird we hadn't been doing this. Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 856c2e8ea6ac..a3ec2c8610cc 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4497,6 +4497,8 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
}
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
flags |= FIEMAP_EXTENT_ENCODED;
+ if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
+ flags |= FIEMAP_EXTENT_UNWRITTEN;
free_extent_map(em);
em = NULL;