Dave Chinner
5ae6e6a401
xfs: fix dir3 freespace block corruption
...
When the directory freespace index grows to a second block (2017
4k data blocks in the directory), the initialisation of the second
new block header goes wrong. The write verifier fires a corruption
error indicating that the block number in the header is zero. This
was being tripped by xfs/110.
The problem is that the initialisation of the new block is done just
fine in xfs_dir3_free_get_buf(), but the caller then users a dirv2
structure to zero on-disk header fields that xfs_dir3_free_get_buf()
has already zeroed. These lined up with the block number in the dir
v3 header format.
While looking at this, I noticed that the struct xfs_dir3_free_hdr()
had 4 bytes of padding in it that wasn't defined as padding or being
zeroed by the initialisation. Add a pad field declaration and fully
zero the on disk and in-core headers in xfs_dir3_free_get_buf() so
that this is never an issue in the future. Note that this doesn't
change the on-disk layout, just makes the 32 bits of padding in the
layout explicit.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-05-30 14:32:47 -05:00
..
2013-05-07 18:45:36 -05:00
2012-05-29 23:28:32 -04:00
2012-05-29 23:28:32 -04:00
2013-04-27 12:49:32 -05:00
2013-05-07 18:45:36 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-11-19 20:11:24 -06:00
2012-09-18 01:01:35 -07:00
2011-08-01 02:35:04 -04:00
2013-04-21 14:57:43 -05:00
2013-05-07 18:45:36 -05:00
2013-04-21 14:53:46 -05:00
2013-05-20 13:09:11 -05:00
2012-11-15 21:35:12 -06:00
2013-05-20 14:14:25 -05:00
2012-07-22 11:00:55 -05:00
2013-05-23 18:04:06 -05:00
2013-04-27 12:45:01 -05:00
2013-05-23 18:04:06 -05:00
2013-05-23 18:04:06 -05:00
2010-01-20 10:47:48 +11:00
2013-04-27 12:49:32 -05:00
2013-04-27 12:49:32 -05:00
2009-01-09 15:53:54 +11:00
2013-05-07 18:45:36 -05:00
2013-04-21 14:53:46 -05:00
2013-04-27 13:01:58 -05:00
2012-10-18 17:42:48 -05:00
2013-04-27 13:01:58 -05:00
2013-05-07 18:45:36 -05:00
2013-05-30 12:48:33 -05:00
2013-04-27 13:01:58 -05:00
2013-05-23 18:04:06 -05:00
2013-01-16 16:07:11 -06:00
2012-11-19 20:11:24 -06:00
2013-05-20 16:32:30 -05:00
2013-04-27 13:01:06 -05:00
2013-05-30 12:55:31 -05:00
2010-01-15 15:31:23 -06:00
2013-04-21 15:03:33 -05:00
2013-04-27 13:01:58 -05:00
2013-04-27 13:01:58 -05:00
2013-05-30 14:32:47 -05:00
2013-05-20 16:18:05 -05:00
2013-05-30 14:32:47 -05:00
2013-04-27 13:01:06 -05:00
2013-04-27 12:24:32 -05:00
2012-07-01 14:50:07 -05:00
2011-07-13 13:43:48 +02:00
2012-08-23 14:48:44 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2011-08-12 16:21:35 -05:00
2013-04-21 14:58:22 -05:00
2013-03-22 16:06:30 -05:00
2013-04-21 14:48:41 -05:00
2011-03-07 10:09:35 +11:00
2013-02-26 02:46:10 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:04 -05:00
2012-05-14 16:21:04 -05:00
2013-05-20 14:29:34 -05:00
2013-04-05 13:25:35 -05:00
2013-05-07 20:16:25 -07:00
2011-10-11 21:15:06 -05:00
2010-07-26 13:16:51 -05:00
2013-05-30 12:57:25 -05:00
2013-05-30 12:57:25 -05:00
2011-01-11 20:28:17 -06:00
2012-11-08 15:34:59 -06:00
2013-05-07 18:45:36 -05:00
2013-04-21 14:53:46 -05:00
2013-04-27 13:01:58 -05:00
2012-11-15 21:35:12 -06:00
2012-11-08 15:34:59 -06:00
2012-11-08 15:34:59 -06:00
2013-04-21 15:03:33 -05:00
2012-12-17 16:29:00 -06:00
2013-05-07 18:45:36 -05:00
2013-04-21 15:03:33 -05:00
2012-05-14 16:20:54 -05:00
2013-05-07 19:00:10 -05:00
2011-08-12 16:21:35 -05:00
2013-05-07 18:56:38 -05:00
2011-08-12 16:21:35 -05:00
2013-03-22 16:07:56 -05:00
2010-12-16 16:05:51 -06:00
2013-05-30 13:43:52 -05:00
2011-08-12 16:21:35 -05:00
2012-11-15 21:35:12 -06:00
2010-06-24 11:35:17 +10:00
2013-05-07 18:45:36 -05:00
2013-05-20 16:18:05 -05:00
2013-04-16 13:18:33 -05:00
2013-05-30 12:48:33 -05:00
2010-05-24 10:33:39 -05:00
2013-03-07 12:33:57 -06:00
2012-10-17 13:39:14 -05:00
2013-05-07 18:45:36 -05:00
2013-05-07 18:45:36 -05:00
2013-05-30 12:24:19 -05:00
2013-04-27 13:03:12 -05:00
2011-02-01 11:42:43 +01:00
2010-01-15 15:34:22 -06:00
2013-01-17 17:32:57 -06:00
2013-05-21 13:57:05 -05:00
2013-04-21 14:58:22 -05:00
2013-04-21 14:58:22 -05:00
2012-03-14 11:09:06 -05:00
2013-04-21 14:58:22 -05:00
2012-09-18 01:01:39 -07:00
2012-05-14 16:20:54 -05:00
2012-11-15 21:34:05 -06:00
2011-07-25 15:03:13 -05:00
2013-04-27 13:05:18 -05:00
2012-03-14 11:09:06 -05:00
2012-03-14 11:09:06 -05:00
2013-03-03 19:36:31 -08:00
2012-10-17 12:01:25 -05:00
2013-05-30 12:37:04 -05:00
2013-04-27 11:49:28 -05:00
2012-11-08 15:34:59 -06:00
2012-11-08 15:34:59 -06:00
2013-04-27 12:33:38 -05:00
2013-03-22 16:07:56 -05:00
2012-12-17 16:29:00 -06:00
2013-04-27 13:01:58 -05:00
2013-03-22 16:05:52 -05:00
2012-05-14 16:20:54 -05:00
2012-12-17 16:29:00 -06:00
2012-07-29 16:27:57 -05:00
2009-02-09 08:37:14 +01:00
2013-02-01 14:56:31 -06:00
2013-05-07 18:45:36 -05:00
2013-01-17 17:32:57 -06:00
2012-07-29 16:00:31 -05:00
2012-01-03 22:55:00 -05:00
2012-03-15 13:40:16 -05:00
2013-05-20 14:25:50 -05:00
2012-11-29 14:21:46 -06:00
2011-08-12 16:21:35 -05:00
2013-05-07 18:45:36 -05:00