From: Matthew Wilcox <matthew@wil.cx>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [Final call for testers][PATCH] superblock handling changes (2.4.6-pre3)
Date: Fri, 15 Jun 2001 17:16:32 +0100 [thread overview]
Message-ID: <20010615171632.C9522@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.GSO.4.21.0106130044390.942-100000@weyl.math.psu.edu> <Pine.GSO.4.21.0106150100210.7244-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0106150100210.7244-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Fri, Jun 15, 2001 at 01:10:00AM -0400
On Fri, Jun 15, 2001 at 01:10:00AM -0400, Alexander Viro wrote:
> +static inline void write_super(struct super_block *sb)
> +{
> + lock_super(sb);
> + if (sb->s_root && sb->s_dirt)
^^^^
When I first looked at this, I thought it was a typo. I don't think we
should have s_dirty and s_dirt as fields of the superblock. how about
s_dirty_inodes and s_isdirty, respectively?
> +restart:
> + spin_lock(&sb_lock);
> + sb = sb_entry(super_blocks.next);
> + while (sb != sb_entry(&super_blocks))
> + if (sb->s_dirt) {
> + sb->s_count++;
> + spin_unlock(&sb_lock);
> + down_read(&sb->s_umount);
> + write_super(sb);
> + drop_super(sb);
> + goto restart;
> + } else
> + sb = sb_entry(sb->s_list.next);
> + spin_unlock(&sb_lock);
I think this could be clearer.
struct list_head *tmp;
restart:
spin_lock(&sb_lock);
list_for_each(tmp, super_blocks) {
struct super_block *sb = sb_entry(tmp);
if (!sb->s_dirt)
continue;
spin_unlock(&sb_lock);
down_read(&sb->s_umount);
write_super(sb);
drop_super(sb);
goto restart;
}
spin_unlock(&sb_lock);
> @@ -773,16 +810,16 @@
> void *data, int silent)
> {
> struct super_block * s;
> - s = get_empty_super();
> + s = alloc_super();
> if (!s)
> goto out;
> s->s_dev = dev;
> s->s_bdev = bdev;
> s->s_flags = flags;
> - s->s_dirt = 0;
> s->s_type = type;
> - s->s_dquot.flags = 0;
> - s->s_maxbytes = MAX_NON_LFS;
> + spin_lock(&sb_lock);
> + list_add (&s->s_list, super_blocks.prev);
I'd use list_add_tail(&s->s_list, super_blocks);
> - if (mnt->mnt_instances.next != mnt->mnt_instances.prev) {
> + if (atomic_read(&sb->s_active) > 1) {
I'm happy to see that line disappear. It was mightily confusing.
--
Revolutions do not require corporate support.
next prev parent reply other threads:[~2001-06-15 16:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-12 4:29 [CFT][PATCH] superblock handling changes Alexander Viro
2001-06-12 3:22 ` Marcelo Tosatti
2001-06-12 5:17 ` Alexander Viro
2001-06-12 6:38 ` George Bonser
2001-06-13 4:50 ` [CFT][PATCH] superblock handling changes (2.4.6-pre3) Alexander Viro
2001-06-15 5:10 ` [Final call for testers][PATCH] " Alexander Viro
2001-06-15 16:16 ` Matthew Wilcox [this message]
2001-06-15 16:34 ` Alexander Viro
2001-06-15 16:41 ` Alexander Viro
2001-06-15 16:49 ` Matthew Wilcox
2001-06-15 19:12 ` Linus Torvalds
2001-06-15 19:18 ` Alexander Viro
2001-06-15 17:02 ` Jonathan Lundell
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=20010615171632.C9522@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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).