public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Hou Tao <houtao1@huawei.com>, Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: during log recovery, destroy the unlinked inodes even for read-only mount
Date: Tue, 7 Feb 2017 20:31:41 -0600	[thread overview]
Message-ID: <f4577e5e-e775-673b-c2a9-d36cb245377e@sandeen.net> (raw)
In-Reply-To: <504078b4-68ea-eb3c-231f-9d840f1e8687@huawei.com>



On 12/15/16 5:36 AM, Hou Tao wrote:
>>> I was talking to Eric about this larger "recovery on read-only
>>> mount" problem last week on IRC - I can't find it my logs right now,
>>> but IIRC I'd suggested that we should always run xfs_mountfs()
>>> in read-write mount if the underlying device can be written to,
>>> and then once that is complete do a rw->ro transition exactly as we
>>> do for a remount,ro operation.
>>
>> Yeah, I have a larger patchset to try to handle this and other
>> related processing that wasn't happening on ro mounts.  I got
>> derailed because my regression test for it ran into all kinds
>> of unexpected new & unrelated bugs.  So I haven't sent it yet...
>>
>> There were lots of little bits here and there stemming, I think,
>> from old Irix code that didn't do /any/ device IO on a ro mount.
>>
>> -Eric
> It's glad to hear that you have nearly completed the ro mount patchset,
> so I will stop reworking on this problem.
> 
> During the rework, I found two puzzling XFS_MOUNT_RDONLY checkings
> at xfs_release(...) and xfs_inactive(...). In my opinion these check
> should be done at VFS instead of the specific filesystem, so why
> these XFS_MOUNT_RDONLY checkings there are ? Could we move the
> needed check to VFS just like the things sb_prepare_remount_readonly()
> have done ?

Getting back to this - the reason for your original patch, I think,
was that things like log recovery can get into this code without going
through the vfs at all, so I think vfs checks are not always sufficient.

That said, there probably are some XFS_MOUNT_RDONLY checks which are
redundant.

-Eric

> Tao
> 

      reply	other threads:[~2017-02-08  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06  9:00 [PATCH] xfs: during log recovery, destroy the unlinked inodes even for read-only mount Hou Tao
2016-12-07  6:30 ` Dave Chinner
2016-12-15  4:07   ` Eric Sandeen
2016-12-15 11:36     ` Hou Tao
2017-02-08  2:31       ` Eric Sandeen [this message]

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=f4577e5e-e775-673b-c2a9-d36cb245377e@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=houtao1@huawei.com \
    --cc=linux-xfs@vger.kernel.org \
    /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