Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d2b2372 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

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: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent c8d3fe02
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;