Skip to content

Commit

Permalink
Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Jun 3, 2015
1 parent c8d3fe0 commit 0d2b237
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0d2b237

Please sign in to comment.