xfs
[Top] [All Lists]

Re: [PATCH] xfs: handle dquot buffer readahead in log recovery correctly

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfs: handle dquot buffer readahead in log recovery correctly
From: Arkadiusz MiÅkiewicz <arekm@xxxxxxxx>
Date: Wed, 6 Jan 2016 17:16:44 +0100
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maven.pl; s=maven; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; bh=Q4ExeVTUAMQNkzd0K5f0xDOKLa7FX352nJLNQdj53oc=; b=MC00JAmwqFBYw73bO2qAVRdYPr6dzZaHsiQISeMfVurajmshkQ2UiL/2KVYh1aWBWI QQArtWJwJnzn4dsI0oz+Xd8KHqdgapfIKSUEVmxBQHfaxp6hWSQ5g+RAyFFu3DaPHOMv IgfS7FHwUhpvm45Xu5/TrcDlMRVmM2qgcHgWA=
In-reply-to: <1452052834-20605-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1452052834-20605-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: KMail/1.13.7 (Linux/4.4.0-rc7-00004-g8513342; KDE/4.14.14; x86_64; ; )
On Wednesday 06 of January 2016, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> When we do dquot readahead in log recovery, we do not use a verifier
> as the underlying buffer may not have dquots in it. e.g. the
> allocation operation hasn't yet been replayed. Hence we do not want
> to fail recovery because we detect an operation to be replayed has
> not been run yet. This problem was addressed for inodes in commit
> d891400 ("xfs: inode buffers may not be valid during recovery
> readahead") but the problem was not recognised to exist for dquots
> and their buffers as the dquot readahead did not have a verifier.
> 
> The result of not using a verifier is that when the buffer is then
> next read to replay a dquot modification, the dquot buffer verifier
> will only be attached to the buffer if *readahead is not complete*.
> Hence we can read the buffer, replay the dquot changes and then add
> it to the delwri submission list without it having a verifier
> attached to it. This then generates warnings in xfs_buf_ioapply(),
> which catches and warns about this case.
> 
> Fix this and make it handle the same readahead verifier error cases
> as for inode buffers by adding a new readahead verifier that has a
> write operation as well as a read operation that marks the buffer as
> not done if any corruption is detected.  Also make sure we don't run
> readahead if the dquot buffer has been marked as cancelled by
> recovery.
> 
> This will result in readahead either succeeding and the buffer
> having a valid write verifier, or readahead failing and the buffer
> state requiring the subsequent read to resubmit the IO with the new
> verifier.  In either case, this will result in the buffer always
> ending up with a valid write verifier on it.

Checked this patch on 4.1.15.

When the issue occured I started seeing thousands of "_xfs_buf_ioapply: no ops 
on block ..."  entries in logs.

With this patch these are all gone.

-- 
Arkadiusz MiÅkiewicz, arekm / ( maven.pl | pld-linux.org )

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