[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <492A5453.9030801@sun.com>
Date: Mon, 24 Nov 2008 10:14:27 +0300
From: Alex Zhuravlev <Alex.Zhuravlev@....COM>
To: Theodore Tso <tytso@....EDU>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
cmm@...ibm.com, sandeen@...hat.com, linux-ext4@...r.kernel.org
Subject: Re: [PATCH -V2 3/5] ext4: Fix the race between read_block_bitmap and
mark_diskspace_used
Theodore Tso wrote:
> My bigger concern is given that we are playing games like *this*:
>
> if ((cur & 31) == 0 && (len - cur) >= 32) {
> /* fast path: set whole word at once */
> addr = bm + (cur >> 3);
> *addr = 0xffffffff;
> cur += 32;
> continue;
> }
this is to avoid expensive LOCK prefix in some cases.
> without taking a lock, I'm a little surprised we haven't been
> seriously burned by other race conditions. What's the point of
> calling mb_set_bit_atomic() and passing in a spinlock if we are doing
> this kind of check without the protection of the same spinlock?!?
why would we need a lock for a whole word bitop ?
thanks, Alex
--
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