Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 regression fix from Theodore Ts'o:
"This fixes a real brown paper bag bug which causes ext4 to choke on
file systems larger than 512GB."

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix extent status tree regression for file systems > 512GB

+11 -8
+11 -8
fs/ext4/extents_status.h
··· 20 20 #define es_debug(fmt, ...) no_printk(fmt, ##__VA_ARGS__) 21 21 #endif 22 22 23 - #define EXTENT_STATUS_WRITTEN 0x80000000 /* written extent */ 24 - #define EXTENT_STATUS_UNWRITTEN 0x40000000 /* unwritten extent */ 25 - #define EXTENT_STATUS_DELAYED 0x20000000 /* delayed extent */ 26 - #define EXTENT_STATUS_HOLE 0x10000000 /* hole */ 23 + /* 24 + * These flags live in the high bits of extent_status.es_pblk 25 + */ 26 + #define EXTENT_STATUS_WRITTEN (1ULL << 63) 27 + #define EXTENT_STATUS_UNWRITTEN (1ULL << 62) 28 + #define EXTENT_STATUS_DELAYED (1ULL << 61) 29 + #define EXTENT_STATUS_HOLE (1ULL << 60) 27 30 28 31 #define EXTENT_STATUS_FLAGS (EXTENT_STATUS_WRITTEN | \ 29 32 EXTENT_STATUS_UNWRITTEN | \ ··· 61 58 62 59 static inline int ext4_es_is_written(struct extent_status *es) 63 60 { 64 - return (es->es_pblk & EXTENT_STATUS_WRITTEN); 61 + return (es->es_pblk & EXTENT_STATUS_WRITTEN) != 0; 65 62 } 66 63 67 64 static inline int ext4_es_is_unwritten(struct extent_status *es) 68 65 { 69 - return (es->es_pblk & EXTENT_STATUS_UNWRITTEN); 66 + return (es->es_pblk & EXTENT_STATUS_UNWRITTEN) != 0; 70 67 } 71 68 72 69 static inline int ext4_es_is_delayed(struct extent_status *es) 73 70 { 74 - return (es->es_pblk & EXTENT_STATUS_DELAYED); 71 + return (es->es_pblk & EXTENT_STATUS_DELAYED) != 0; 75 72 } 76 73 77 74 static inline int ext4_es_is_hole(struct extent_status *es) 78 75 { 79 - return (es->es_pblk & EXTENT_STATUS_HOLE); 76 + return (es->es_pblk & EXTENT_STATUS_HOLE) != 0; 80 77 } 81 78 82 79 static inline ext4_fsblk_t ext4_es_status(struct extent_status *es)