linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Vincent Fazio <vfazio@xes-inc.com>, Brian Foster <bfoster@redhat.com>
Cc: Aaron Sierra <asierra@xes-inc.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/1] xfs: fallback to readonly during recovery
Date: Tue, 11 Feb 2020 08:29:59 -0600	[thread overview]
Message-ID: <4f55ae5e-c5cc-6c13-6ed4-ac6c770cd55f@sandeen.net> (raw)
In-Reply-To: <e8169b53-252b-b133-7bc5-ee5dc206c402@xes-inc.com>

On 2/11/20 8:04 AM, Vincent Fazio wrote:
> All,

...

> As mentioned in the commit message, the SSDs we work with are ATA devices and there is no such mechanism in the ATA spec to report to the block layer that the device is RO. What we run into is this:
> 
> xfs_log_mount
>     xfs_log_recover
>         xfs_find_tail
>             xfs_clear_stale_blocks
>                 xlog_write_log_records
>                     xlog_bwrite
> 
> the xlog_bwrite fails and triggers the call to xfs_force_shutdown. In this specific scenario, we know the log is clean as XFS_MOUNT_WAS_CLEAN is set in the log flags, however the stale blocks cannot be removed due to the device being write-protected. the call to xfs_clear_stale_blocks cannot be obviated because, as mentioned before, ATA devices do not have a mechanism to report that they're read-only.

Ok, at least now we see where the writes are coming from.  A device that
is /marked/ readonly won't get into xfs_clear_stale_blocks.  I'm not sure
if we could just skip the xfs_clear_stale_blocks call if XFS_MOUNT_WAS_CLEAN
is set, or if head == tail and no recovery is needed.  If so, then maybe
rearranging the call to xfs_clear_stale_blocks could help.  I'll let people
who know more log details than I do chime in on that though.

-Eric

  reply	other threads:[~2020-02-11 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 21:10 [PATCH 1/1] xfs: fallback to readonly during recovery Vincent Fazio
2020-02-10 21:43 ` Eric Sandeen
2020-02-10 22:31   ` Aaron Sierra
2020-02-10 23:40     ` Eric Sandeen
2020-02-11 12:55       ` Brian Foster
2020-02-11 14:04         ` Vincent Fazio
2020-02-11 14:29           ` Eric Sandeen [this message]
2020-02-11 15:10             ` Darrick J. Wong
2020-02-11 20:04           ` 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=4f55ae5e-c5cc-6c13-6ed4-ac6c770cd55f@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=asierra@xes-inc.com \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=vfazio@xes-inc.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;
as well as URLs for NNTP newsgroup(s).