Commit 3c0e918b authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba

btrfs: remove no longer used EXTENT_MAP_DELALLOC block start value

After commit ac3c0d36 ("btrfs: make fiemap more efficient and accurate
reporting extent sharedness") we no longer need to create special extent
maps during fiemap that have a block start with the EXTENT_MAP_DELALLOC
value. So this block start value for extent maps is no longer used since
then, therefore remove it.
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 397239ed
...@@ -996,9 +996,8 @@ static int defrag_collect_targets(struct btrfs_inode *inode, ...@@ -996,9 +996,8 @@ static int defrag_collect_targets(struct btrfs_inode *inode,
em->len <= inode->root->fs_info->max_inline) em->len <= inode->root->fs_info->max_inline)
goto next; goto next;
/* Skip hole/delalloc/preallocated extents */ /* Skip holes and preallocated extents. */
if (em->block_start == EXTENT_MAP_HOLE || if (em->block_start == EXTENT_MAP_HOLE ||
em->block_start == EXTENT_MAP_DELALLOC ||
test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
goto next; goto next;
......
...@@ -212,9 +212,6 @@ static int mergable_maps(struct extent_map *prev, struct extent_map *next) ...@@ -212,9 +212,6 @@ static int mergable_maps(struct extent_map *prev, struct extent_map *next)
if (!list_empty(&prev->list) || !list_empty(&next->list)) if (!list_empty(&prev->list) || !list_empty(&next->list))
return 0; return 0;
ASSERT(next->block_start != EXTENT_MAP_DELALLOC &&
prev->block_start != EXTENT_MAP_DELALLOC);
if (extent_map_end(prev) == next->start && if (extent_map_end(prev) == next->start &&
prev->flags == next->flags && prev->flags == next->flags &&
((next->block_start == EXTENT_MAP_HOLE && ((next->block_start == EXTENT_MAP_HOLE &&
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#define EXTENT_MAP_LAST_BYTE ((u64)-4) #define EXTENT_MAP_LAST_BYTE ((u64)-4)
#define EXTENT_MAP_HOLE ((u64)-3) #define EXTENT_MAP_HOLE ((u64)-3)
#define EXTENT_MAP_INLINE ((u64)-2) #define EXTENT_MAP_INLINE ((u64)-2)
/* used only during fiemap calls */
#define EXTENT_MAP_DELALLOC ((u64)-1)
/* bits for the extent_map::flags field */ /* bits for the extent_map::flags field */
enum { enum {
......
...@@ -265,8 +265,7 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, ...@@ -265,8 +265,7 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict,
__print_symbolic_u64(type, \ __print_symbolic_u64(type, \
{ EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \ { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \
{ EXTENT_MAP_HOLE, "HOLE" }, \ { EXTENT_MAP_HOLE, "HOLE" }, \
{ EXTENT_MAP_INLINE, "INLINE" }, \ { EXTENT_MAP_INLINE, "INLINE" })
{ EXTENT_MAP_DELALLOC, "DELALLOC" })
#define show_map_type(type) \ #define show_map_type(type) \
type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type) type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment