public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: jack@suse.cz, xfs@oss.sgi.com
Subject: Re: [PATCH 4/3] xfs: set superblock buffer type correctly
Date: Wed, 21 Jan 2015 17:06:27 -0500	[thread overview]
Message-ID: <20150121220627.GE7960@laptop.bfoster> (raw)
In-Reply-To: <20150121023444.GI16552@dastard>

On Wed, Jan 21, 2015 at 01:34:44PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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()...
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_trans.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index fa3135b..eb90cd5 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -472,6 +472,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.
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-01-21 22:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  0:39 [PATCH 0/3] xfs: buffer types need to be set Dave Chinner
2015-01-21  0:39 ` [PATCH 1/3] xfs: ensure buffer types are set correctly Dave Chinner
2015-01-21 22:05   ` Brian Foster
2015-01-21  0:39 ` [PATCH 2/3] xfs: inode unlink does not set AGI buffer type Dave Chinner
2015-01-21 22:05   ` Brian Foster
2015-01-21  0:39 ` [PATCH 3/3] xfs: set buf types when converting extent formats Dave Chinner
2015-01-21 22:06   ` Brian Foster
2015-01-21  2:34 ` [PATCH 4/3] xfs: set superblock buffer type correctly Dave Chinner
2015-01-21 22:06   ` Brian Foster [this message]
2015-01-21 16:07 ` [PATCH 0/3] xfs: buffer types need to be set Jan Kara
2015-01-21 17:11   ` Jan Kara
2015-01-21 21:12   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150121220627.GE7960@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox