path: root/fs
diff options
authorDave Chinner <dchinner@redhat.com>2015-01-22 09:30:23 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 14:40:47 -0800
commit66c4da6566ec1cf89349911fd83b9540e985e058 (patch)
tree16e6fdcf9b2c9aae327aa4a4d1cb1ff46e374d9d /fs
parent70c0c8b3d5844839658fd0c1127a9641127d5098 (diff)
xfs: set superblock buffer type correctly
commit 3443a3bca54588f43286b725d8648d33a38c86f1 upstream. When the superblock is modified in a transaction, the commonly modified fields are not actually copied to the superblock buffer to avoid the buffer lock becoming a serialisation point. However, there are some other operations that modify the superblock fields within the transaction that don't directly log to the superblock but rely on the changes to be applied during the transaction commit (to minimise the buffer lock hold time). When we do this, we fail to mark the buffer log item as being a superblock buffer and that can lead to the buffer not being marked with the corect type in the log and hence causing recovery issues. Fix it by setting the type correctly, similar to xfs_mod_sb()... Tested-by: Jan Kara <jack@suse.cz> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 2fd7c1ff1d21..b5d5beb7df3a 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1100,6 +1100,7 @@ xfs_trans_apply_sb_deltas(
whole = 1;
+ xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF);
if (whole)
* Log the whole thing, the fields are noncontiguous.