diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 08085af089e2..eb2bee8b7fbf 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -2884,25 +2884,19 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | |||
2884 | disko = 0; | 2884 | disko = 0; |
2885 | flags = 0; | 2885 | flags = 0; |
2886 | 2886 | ||
2887 | switch (em->block_start) { | 2887 | if (em->block_start == EXTENT_MAP_LAST_BYTE) { |
2888 | case EXTENT_MAP_LAST_BYTE: | ||
2889 | end = 1; | 2888 | end = 1; |
2890 | flags |= FIEMAP_EXTENT_LAST; | 2889 | flags |= FIEMAP_EXTENT_LAST; |
2891 | break; | 2890 | } else if (em->block_start == EXTENT_MAP_HOLE) { |
2892 | case EXTENT_MAP_HOLE: | ||
2893 | flags |= FIEMAP_EXTENT_UNWRITTEN; | 2891 | flags |= FIEMAP_EXTENT_UNWRITTEN; |
2894 | break; | 2892 | } else if (em->block_start == EXTENT_MAP_INLINE) { |
2895 | case EXTENT_MAP_INLINE: | ||
2896 | flags |= (FIEMAP_EXTENT_DATA_INLINE | | 2893 | flags |= (FIEMAP_EXTENT_DATA_INLINE | |
2897 | FIEMAP_EXTENT_NOT_ALIGNED); | 2894 | FIEMAP_EXTENT_NOT_ALIGNED); |
2898 | break; | 2895 | } else if (em->block_start == EXTENT_MAP_DELALLOC) { |
2899 | case EXTENT_MAP_DELALLOC: | ||
2900 | flags |= (FIEMAP_EXTENT_DELALLOC | | 2896 | flags |= (FIEMAP_EXTENT_DELALLOC | |
2901 | FIEMAP_EXTENT_UNKNOWN); | 2897 | FIEMAP_EXTENT_UNKNOWN); |
2902 | break; | 2898 | } else { |
2903 | default: | ||
2904 | disko = em->block_start; | 2899 | disko = em->block_start; |
2905 | break; | ||
2906 | } | 2900 | } |
2907 | if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) | 2901 | if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) |
2908 | flags |= FIEMAP_EXTENT_ENCODED; | 2902 | flags |= FIEMAP_EXTENT_ENCODED; |