Eric Sandeen
395a87bfef
ext4: fix header check in ext4_ext_search_right() for deep extent trees.
...
The ext4_ext_search_right() function is confusing; it uses a
"depth" variable which is 0 at the root and maximum at the leaves,
but the on-disk metadata uses a "depth" (actually eh_depth) which
is opposite: maximum at the root, and 0 at the leaves.
The ext4_ext_check_header() function is given a depth and checks
the header agaisnt that depth; it expects the on-disk semantics,
but we are giving it the opposite in the while loop in this
function. We should be giving it the on-disk notion of "depth"
which we can get from (p_depth - depth) - and if you look, the last
(more commonly hit) call to ext4_ext_check_header() does just this.
Sending in the wrong depth results in (incorrect) messages
about corruption:
EXT4-fs error (device sdb1): ext4_ext_search_right: bad header
in inode #2621457 : unexpected eh_depth - magic f30a, entries 340,
max 340(0), depth 1(2)
http://bugzilla.kernel.org/show_bug.cgi?id=12821
Reported-by: David Dindorp <ddi@dubex.dk>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-03-10 18:18:47 -04:00
..
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:56 +03:00
2009-01-22 13:15:56 +03:00
2009-01-22 13:16:01 +03:00
2009-01-22 13:15:54 +03:00
2009-01-22 13:15:54 +03:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:57 +03:00
2009-03-09 11:45:38 -04:00
2009-02-21 03:37:10 +00:00
2009-01-22 13:16:01 +03:00
2009-02-04 09:46:25 -08:00
2009-01-22 13:15:58 +03:00
2009-01-07 10:00:16 -08:00
2009-03-10 15:55:11 -07:00
2009-01-21 15:28:45 -06:00
2009-02-06 18:36:40 -08:00
2009-01-22 13:15:57 +03:00
2008-12-25 11:40:09 +11:00
2009-02-11 14:25:36 -08:00
2009-02-11 14:25:35 -08:00
2009-03-10 18:18:47 -04:00
2009-03-11 12:04:18 -07:00
2009-01-22 13:15:58 +03:00
2009-01-26 10:08:50 -08:00
2009-01-09 16:54:42 -08:00
2009-01-22 13:15:57 +03:00
2009-01-22 13:15:57 +03:00
2009-01-04 13:33:20 -08:00
2009-01-22 13:15:59 +03:00
2008-11-14 10:39:25 +11:00
2009-02-10 10:48:42 -08:00
2009-01-22 13:15:55 +03:00
2009-02-11 14:25:35 -08:00
2009-02-10 11:15:34 -05:00
2009-02-21 11:09:29 +01:00
2009-01-22 13:15:54 +03:00
2009-02-09 13:19:46 -05:00
2009-01-22 13:15:58 +03:00
2009-01-22 13:16:01 +03:00
2009-01-22 13:16:00 +03:00
2008-12-23 15:21:32 -05:00
2009-01-27 17:26:59 -05:00
2008-10-17 02:38:36 +11:00
2009-02-18 15:37:56 -08:00
2009-01-22 13:15:55 +03:00
2009-02-26 11:51:12 -08:00
2009-01-22 13:15:58 +03:00
2009-01-05 11:54:28 -05:00
2009-01-09 21:46:13 +01:00
2009-03-11 07:43:33 -07:00
2009-01-22 13:15:59 +03:00
2009-01-08 12:04:46 +00:00
2009-01-22 13:15:53 +03:00
2009-01-22 13:15:59 +03:00
2009-01-22 13:16:01 +03:00
2009-03-12 03:23:48 +00:00
2009-01-26 10:40:28 -08:00
2009-01-22 13:15:59 +03:00
2009-01-29 16:34:30 +02:00
2009-01-22 13:15:55 +03:00
2009-01-22 13:16:00 +03:00
2009-03-06 17:35:12 -06:00
2009-01-14 14:15:25 +01:00
2008-12-31 16:55:44 +02:00
2008-11-14 10:39:05 +11:00
2008-12-31 18:07:43 -05:00
2009-01-03 11:45:54 -08:00
2009-01-08 12:04:47 +00:00
2009-02-06 17:34:07 -08:00
2008-10-16 11:21:38 -07:00
2009-01-08 12:04:47 +00:00
2009-01-06 15:59:19 -08:00
2008-10-16 11:21:38 -07:00
2008-11-14 10:39:24 +11:00
2009-01-30 12:34:36 +01:00
2009-02-26 10:45:48 +01:00
2009-01-09 16:54:42 -08:00
2009-02-18 18:33:04 -08:00
2009-01-06 15:59:13 -08:00
2009-02-27 16:27:45 -08:00
2009-02-07 08:46:18 +11:00
2009-02-27 16:26:20 -08:00
2009-01-14 14:15:18 +01:00
2009-01-06 15:59:06 -08:00
2009-01-16 18:02:10 +01:00
2009-01-14 14:15:31 +01:00
2009-01-29 18:04:45 -08:00
2009-02-07 08:46:18 +11:00
2009-01-14 14:15:24 +01:00
2008-10-21 07:47:06 -04:00
2008-12-31 18:07:42 -05:00
2009-01-14 14:15:29 +01:00
2009-03-12 16:20:24 -07:00
2009-03-12 16:20:24 -07:00
2009-02-07 08:46:18 +11:00
2009-01-14 14:15:24 +01:00
2009-01-14 14:15:30 +01:00
2009-01-22 13:16:01 +03:00
2009-01-09 16:54:41 -08:00
2009-01-05 18:32:06 -08:00
2009-01-14 14:15:25 +01:00
2009-02-28 09:50:01 -05:00
2009-01-06 15:59:01 -08:00
2009-01-14 14:15:30 +01:00
2009-02-17 14:02:08 -08:00
2009-01-14 14:15:29 +01:00
2009-01-14 14:15:30 +01:00
2009-03-12 16:20:23 -07:00
2008-11-14 10:39:05 +11:00
2009-01-05 08:40:21 -08:00
2009-01-05 08:40:21 -08:00
2009-01-05 08:36:58 -08:00
2009-01-05 08:40:21 -08:00
2009-01-14 14:15:26 +01:00
2009-01-05 08:36:58 -08:00
2009-01-05 08:40:21 -08:00
2009-01-14 14:15:26 +01:00
2009-01-14 14:15:31 +01:00
2009-01-14 14:15:31 +01:00
2009-02-18 15:37:53 -08:00
2009-01-14 14:15:31 +01:00
2009-01-14 14:15:31 +01:00
2009-01-14 14:15:30 +01:00
2009-03-12 16:20:23 -07:00
2009-01-14 14:15:21 +01:00
2009-02-18 15:37:53 -08:00
2009-01-14 14:15:30 +01:00
2009-01-14 14:15:23 +01:00