i'm trying to write a pure block allocator(i.e. it only allocates
blocks, and doesn't read any of them) for the ext2fs.
to do this i need to lock the blocks-bitmap of the blocks-group i'm
working on before alloacting.
the problem is that i failed to find a way to lock ONLY the
blocks-bitmap, in the ext2fs code i saw that the only lock they use is
lock_super which locks the whole super-block( is it ?).
this seems like an over-kill for this stuff.
one more thing
the lock_super code is as follows ( extracted from locks.h )
extern inline void lock_super(struct super_block * sb)
sb->s_lock = 1;
this code doesn't seem to implement a real lock, so does this code
assumes atomicy of this call ?
is it depends on the fact that only one process can be at the kernel at
how can i force a lock which will work on SMP machine?
please CC me for any answer as i'm not register to the mailing list (
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:11 EST