| Age | Commit message (Collapse) | Author |
|
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.
|