From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] xfs: toggle readonly state around xfs_log_mount_finish
Date: Fri, 11 Aug 2017 06:03:03 -0700 [thread overview]
Message-ID: <20170811130303.GB24839@infradead.org> (raw)
In-Reply-To: <6c81fb42-4601-dc0f-6ebb-a73c7c40aaa4@sandeen.net>
On Fri, Jul 21, 2017 at 10:25:35AM -0500, Eric Sandeen wrote:
> When we do log recovery on a readonly mount, unlinked inode
> processing does not happen due to the readonly checks in
> xfs_inactive(), which are trying to prevent any I/O on a
> readonly mount.
>
> This is misguided - we do I/O on readonly mounts all the time,
> for consistency; for example, log recovery. So do the same
> RDONLY flag twiddling around xfs_log_mount_finish() as we
> do around xfs_log_mount(), for the same reason.
>
> This all cries out for a big rework but for now this is a
> simple fix to an obvious problem.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Reviewed-by: Brian Foster <bfoster@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>
>
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index 0bd1341..ca56d85 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -743,16 +743,23 @@
> struct xfs_mount *mp)
> {
> int error = 0;
> + int readonly = (mp->m_flags & XFS_MOUNT_RDONLY);
bool?
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2017-08-11 13:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 15:10 [PATCH 0/2 resend] xfs: readonly handling changes Eric Sandeen
2017-07-21 15:24 ` [PATCH 1/2] xfs: write unmount record for ro mounts Eric Sandeen
2017-08-11 13:02 ` Christoph Hellwig
2017-07-21 15:25 ` [PATCH 2/2] xfs: toggle readonly state around xfs_log_mount_finish Eric Sandeen
2017-08-11 13:03 ` Christoph Hellwig [this message]
2017-08-11 19:45 ` [PATCH 2/2 V2] " Eric Sandeen
2017-08-11 19:47 ` Darrick J. Wong
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=20170811130303.GB24839@infradead.org \
--to=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/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).