[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTimxw0e37XbwW8PwXgLEyCEC2zH_wThCjBpbsEhm@mail.gmail.com>
Date: Mon, 14 Feb 2011 20:18:11 +0200
From: "Amir G." <amir73il@...rs.sourceforge.net>
To: Andreas Dilger <adilger@...ger.ca>
Cc: Theodore Tso <tytso@....edu>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH][RFC] ext4: avoid taking down_read(&grp->alloc_sem)
On Mon, Feb 14, 2011 at 6:30 PM, Andreas Dilger <adilger@...ger.ca> wrote:
> On 2011-02-14, at 0:52, "Amir G." <amir73il@...rs.sourceforge.net> wrote:
>>> @@ -1160,7 +1160,15 @@ ext4_mb_load_buddy(struct super_block *sb,
>>>
>>> + /*
>>> + * We only need to take the read lock if other groups share the buddy
>>> + * page with this group or if blocks may be added to this (last) group
>>> + * by ext4_group_extend().
>>> + */
>>> + if (blocks_per_page > 2 || group == sbi->s_groups_count - 1)
>>> + e4b->alloc_semp = &grp->alloc_sem;
>
> No comment on whether this change is safe or not, but shouldn't this check be:
>
> if (blocks_per_page > 1 ||
>
No, it should be groups_per_page > 1, as Aneesh suggested,
which translates to blocks_per_group > 2, but this is obviously not
clear from the code...
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists