diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 15:22:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 15:22:30 -0500 |
commit | 7bf2fbcdf5300d8b19fa36e37b5bcd8326c95c1d (patch) | |
tree | 8b93ecf5b8eabdd873052d6330cccb011005456e /fs/ext4 | |
parent | adf96e6f514a9e87aa3d26c8c9c03eca5be53df0 (diff) | |
parent | 8e919d13048cd5acaadb2b15b48acbfb8832d3c2 (diff) |
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
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/extents_status.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/ext4/extents_status.h b/fs/ext4/extents_status.h index cf83e77b16cb..f190dfe969da 100644 --- a/fs/ext4/extents_status.h +++ b/fs/ext4/extents_status.h | |||
@@ -20,10 +20,13 @@ | |||
20 | #define es_debug(fmt, ...) no_printk(fmt, ##__VA_ARGS__) | 20 | #define es_debug(fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define EXTENT_STATUS_WRITTEN 0x80000000 /* written extent */ | 23 | /* |
24 | #define EXTENT_STATUS_UNWRITTEN 0x40000000 /* unwritten extent */ | 24 | * These flags live in the high bits of extent_status.es_pblk |
25 | #define EXTENT_STATUS_DELAYED 0x20000000 /* delayed extent */ | 25 | */ |
26 | #define EXTENT_STATUS_HOLE 0x10000000 /* hole */ | 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 | #define EXTENT_STATUS_FLAGS (EXTENT_STATUS_WRITTEN | \ | 31 | #define EXTENT_STATUS_FLAGS (EXTENT_STATUS_WRITTEN | \ |
29 | EXTENT_STATUS_UNWRITTEN | \ | 32 | EXTENT_STATUS_UNWRITTEN | \ |
@@ -58,22 +61,22 @@ extern int ext4_es_lookup_extent(struct inode *inode, ext4_lblk_t lblk, | |||
58 | 61 | ||
59 | static inline int ext4_es_is_written(struct extent_status *es) | 62 | static inline int ext4_es_is_written(struct extent_status *es) |
60 | { | 63 | { |
61 | return (es->es_pblk & EXTENT_STATUS_WRITTEN); | 64 | return (es->es_pblk & EXTENT_STATUS_WRITTEN) != 0; |
62 | } | 65 | } |
63 | 66 | ||
64 | static inline int ext4_es_is_unwritten(struct extent_status *es) | 67 | static inline int ext4_es_is_unwritten(struct extent_status *es) |
65 | { | 68 | { |
66 | return (es->es_pblk & EXTENT_STATUS_UNWRITTEN); | 69 | return (es->es_pblk & EXTENT_STATUS_UNWRITTEN) != 0; |
67 | } | 70 | } |
68 | 71 | ||
69 | static inline int ext4_es_is_delayed(struct extent_status *es) | 72 | static inline int ext4_es_is_delayed(struct extent_status *es) |
70 | { | 73 | { |
71 | return (es->es_pblk & EXTENT_STATUS_DELAYED); | 74 | return (es->es_pblk & EXTENT_STATUS_DELAYED) != 0; |
72 | } | 75 | } |
73 | 76 | ||
74 | static inline int ext4_es_is_hole(struct extent_status *es) | 77 | static inline int ext4_es_is_hole(struct extent_status *es) |
75 | { | 78 | { |
76 | return (es->es_pblk & EXTENT_STATUS_HOLE); | 79 | return (es->es_pblk & EXTENT_STATUS_HOLE) != 0; |
77 | } | 80 | } |
78 | 81 | ||
79 | static inline ext4_fsblk_t ext4_es_status(struct extent_status *es) | 82 | static inline ext4_fsblk_t ext4_es_status(struct extent_status *es) |