From: "Darrick J. Wong" <djwong@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Catherine Hoang <catherine.hoang@oracle.com>,
linux-xfs@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH v1 2/4] xfs: implement custom freeze/thaw functions
Date: Wed, 15 Mar 2023 22:16:53 -0700 [thread overview]
Message-ID: <20230316051653.GG11394@frogsfrogsfrogs> (raw)
In-Reply-To: <CAOQ4uxgeHcSOnZxKV4rGXa_gj4-hwicu7=VVvofrQGwcDSdt0w@mail.gmail.com>
On Tue, Mar 14, 2023 at 08:00:21AM +0200, Amir Goldstein wrote:
> On Tue, Mar 14, 2023 at 7:25 AM Darrick J. Wong <djwong@kernel.org> wrote:
> >
> > On Tue, Mar 14, 2023 at 07:11:56AM +0200, Amir Goldstein wrote:
> > > On Tue, Mar 14, 2023 at 6:25 AM Catherine Hoang
> > > <catherine.hoang@oracle.com> wrote:
> > > >
> > > > Implement internal freeze/thaw functions and prevent other threads from changing
> > > > the freeze level by adding a new SB_FREEZE_ECLUSIVE level. This is required to
> > >
> > > This looks troubling in several ways:
> > > - Layering violation
> > > - Duplication of subtle vfs code
> > >
> > > > prevent concurrent transactions while we are updating the uuid.
> > > >
> > >
> > > Wouldn't it be easier to hold s_umount while updating the uuid?
> >
> > Why? Userspace holds an open file descriptor, the fs won't get
> > unmounted.
>
> "Implement internal freeze/thaw functions and prevent other threads
> from changing
> the freeze level..."
>
> holding s_umount prevents changing freeze levels.
>
> The special thing about the frozen state is that userspace is allowed
> to leave the fs frozen without holding any open fd, but because there
> is no such requirement from SET_FSUUID I don't understand the need
> for a new freeze level.
Hm. I think you could be right, since we can certainly run transactions
with s_umount held. I wonder if we're going to run into problems with
the weird xlog things that fsuuid setting will want, but I guess we have
lockdep on our side, right? ;)
--D
> Thanks,
> Amir.
next prev parent reply other threads:[~2023-03-16 5:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 4:21 [PATCH v1 0/4] setting uuid of online filesystems Catherine Hoang
2023-03-14 4:21 ` [PATCH v1 1/4] xfs: refactor xfs_uuid_mount and xfs_uuid_unmount Catherine Hoang
2023-03-14 4:21 ` [PATCH v1 2/4] xfs: implement custom freeze/thaw functions Catherine Hoang
2023-03-14 5:11 ` Amir Goldstein
2023-03-14 5:25 ` Darrick J. Wong
2023-03-14 6:00 ` Amir Goldstein
2023-03-16 5:16 ` Darrick J. Wong [this message]
2023-03-14 4:21 ` [PATCH v1 3/4] xfs: add XFS_IOC_SETFSUUID ioctl Catherine Hoang
2023-03-14 5:50 ` Amir Goldstein
2023-03-15 23:12 ` Catherine Hoang
2023-03-16 8:09 ` Amir Goldstein
2023-03-18 0:39 ` Darrick J. Wong
2023-03-18 9:31 ` Amir Goldstein
2023-03-14 4:21 ` [PATCH v1 4/4] xfs: export meta uuid via xfs_fsop_geom Catherine Hoang
2023-03-14 6:28 ` [PATCH v1 0/4] setting uuid of online filesystems Dave Chinner
2023-03-16 20:41 ` Catherine Hoang
2023-03-19 0:16 ` Dave Chinner
2023-03-28 1:38 ` Darrick J. Wong
2023-03-18 0:11 ` Darrick J. Wong
2023-03-18 9:04 ` Amir Goldstein
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=20230316051653.GG11394@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=amir73il@gmail.com \
--cc=catherine.hoang@oracle.com \
--cc=jack@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).