summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDave Chinner2016-03-06 22:39:36 +0100
committerDave Chinner2016-03-06 22:39:36 +0100
commita798011c8fd4286605b990c1722c16903fc14b7a (patch)
tree224b54a169cebc15d38d39beefd8772ca669b45b /fs/xfs/libxfs
parentxfs: remove XFS_BUF_ZEROFLAGS macro (diff)
downloadkernel-qcow2-linux-a798011c8fd4286605b990c1722c16903fc14b7a.tar.gz
kernel-qcow2-linux-a798011c8fd4286605b990c1722c16903fc14b7a.tar.xz
kernel-qcow2-linux-a798011c8fd4286605b990c1722c16903fc14b7a.zip
xfs: reinitialise per-AG structures if geometry changes during recovery
If a crash occurs immediately after a filesystem grow operation, the updated superblock geometry is found only in the log. After we recover the log, the superblock is reread and re-initialised and so has the new geometry in memory. If the new geometry has more AGs than prior to the grow operation, then the new AGs will not have in-memory xfs_perag structurea associated with them. This will result in an oops when the first metadata buffer from a new AG is looked up in the buffer cache, as the block lies within the new geometry but then fails to find a perag structure on lookup. This is easily fixed by simply re-initialising the perag structure after re-reading the superblock at the conclusion of the first pahse of log recovery. This, however, does not fix the case of log recovery requiring access to metadata in the newly grown space. Fortunately for us, because the in-core superblock has not been updated, this will result in detection of access beyond the end of the filesystem and so recovery will fail at that point. If this proves to be a problem, then we can address it separately to the current reported issue. Reported-by: Alex Lyakas <alex@zadarastorage.com> Tested-by: Alex Lyakas <alex@zadarastorage.com> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
0 files changed, 0 insertions, 0 deletions