| Age | Commit message (Collapse) | Author |
|
As suggested by Andreas Dilger, introduce a bgl_lock_ptr() helper in
<linux/blockgroup_lock.h> and add separate sb_bgl_lock() helpers to
filesystem specific header files to break the hidden dependency to
struct ext[234]_sb_info.
Also, while at it, convert the macros to static inlines to try make up
for all the times I broke Andrew Morton's tree.
Acked-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
Insert header guards to allow possible multiple inclusion for
include/linux/percpu_counter.h and include/linux/blockgroup_lock.h
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
ext2 and ext3 per-blockgroup metadata needs locking. An fs-wide lock is
expensive, and a per-blockgroup lock consumes too much storage (up to 32768
blockgroups per filesystem). We need something in-between.
blockgroup_locks are very simple hashed spinlocks which provide this
compromise. The size of the lock is scaled by NR_CPUS to implement an
additional speed/space tradeoff.
These locks are actually fairly generic. However I presented it as something
which is specific to ext2 and ext3 so that people wouldn't go using them all
over the place. They consume a lot of storage.
|