From: Al Viro <viro@zeniv.linux.org.uk>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Josef Bacik <josef@redhat.com>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] fs: Introduce { freeze, thaw }_active_super functions
Date: Thu, 12 Jan 2023 17:54:21 +0000 [thread overview]
Message-ID: <Y8BJTczjx5yQeTXf@ZenIV> (raw)
In-Reply-To: <20221129230736.3462830-3-agruenba@redhat.com>
On Wed, Nov 30, 2022 at 12:07:34AM +0100, Andreas Gruenbacher wrote:
> -int freeze_super(struct super_block *sb)
> +int freeze_active_super(struct super_block *sb)
> {
> int ret;
>
> - atomic_inc(&sb->s_active);
> down_write(&sb->s_umount);
> if (sb->s_writers.frozen != SB_UNFROZEN) {
> deactivate_locked_super(sb);
Not fond of the calling conventions, to be honest... "On success return 0;
on failure return -E... *and* drop an active reference passed by the caller"?
If you go that way, at least take the deactivate_locked_super() into the
caller and I would argue that ->s_umount handling also belongs in the caller,
both grabbing and dropping it.
next prev parent reply other threads:[~2023-01-12 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 23:07 [RFC 0/3] Shut down frozen filesystems on last unmount Andreas Gruenbacher
2022-11-29 23:07 ` [PATCH 1/3] fs: Add activate_super function Andreas Gruenbacher
2022-11-29 23:07 ` [PATCH 2/3] fs: Introduce { freeze, thaw }_active_super functions Andreas Gruenbacher
2023-01-12 17:54 ` Al Viro [this message]
2022-11-29 23:07 ` [PATCH 3/3] gfs2: Shut down frozen filesystem on last unmount Andreas Gruenbacher
2023-01-12 19:07 ` Al Viro
2023-01-12 12:25 ` [RFC 0/3] Shut down frozen filesystems " Jan Kara
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=Y8BJTczjx5yQeTXf@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=agruenba@redhat.com \
--cc=jack@suse.cz \
--cc=josef@redhat.com \
--cc=linux-fsdevel@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