summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik2015-05-19 16:44:04 +0200
committerChris Mason2015-06-03 13:03:03 +0200
commit0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e (patch)
treed431e50e8e41e4fa49dfa7a36e0f08ba474f1415 /fs/btrfs
parentBtrfs: show subvol= and subvolid= in /proc/mounts (diff)
downloadkernel-qcow2-linux-0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e.tar.gz
kernel-qcow2-linux-0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e.tar.xz
kernel-qcow2-linux-0d2b2372e097cd3b4150d3ec91e79ac3c5cc750e.zip
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/btrfs')
-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;