1
0
Fork 0

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>
hifive-unleashed-5.1
Josef Bacik 2015-05-19 10:44:04 -04:00 committed by Chris Mason
parent c8d3fe028f
commit 0d2b2372e0
1 changed files with 2 additions and 0 deletions

View File

@ -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;