xfs
[Top] [All Lists]

Re: [PATCH 2/3] xfs: inode unlink does not set AGI buffer type

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/3] xfs: inode unlink does not set AGI buffer type
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Wed, 21 Jan 2015 17:05:52 -0500
Cc: xfs@xxxxxxxxxxx, jack@xxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1421800780-26008-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1421800780-26008-1-git-send-email-david@xxxxxxxxxxxxx> <1421800780-26008-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Wed, Jan 21, 2015 at 11:39:39AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> This leads to log recovery throwing errors like:
> 
> XFS (md0): Mounting V5 Filesystem
> XFS (md0): Starting recovery (logdev: internal)
> XFS (md0): Unknown buffer type 0!
> XFS (md0): _xfs_buf_ioapply: no ops on block 0xaea8802/0x1
> ffff8800ffc53800: 58 41 47 49 .....
> 
> Which is the AGI buffer magic number.
> 
> Ensure that we set the type appropriately in both unlink list
> addition and removal.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  fs/xfs/xfs_inode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 573b49c..f616c8f 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -2051,6 +2051,7 @@ xfs_iunlink(
>       agi->agi_unlinked[bucket_index] = cpu_to_be32(agino);
>       offset = offsetof(xfs_agi_t, agi_unlinked) +
>               (sizeof(xfs_agino_t) * bucket_index);
> +     xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
>       xfs_trans_log_buf(tp, agibp, offset,
>                         (offset + sizeof(xfs_agino_t) - 1));
>       return 0;
> @@ -2142,6 +2143,7 @@ xfs_iunlink_remove(
>               agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino);
>               offset = offsetof(xfs_agi_t, agi_unlinked) +
>                       (sizeof(xfs_agino_t) * bucket_index);
> +             xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
>               xfs_trans_log_buf(tp, agibp, offset,
>                                 (offset + sizeof(xfs_agino_t) - 1));
>       } else {
> -- 
> 2.0.0
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>