hi
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)
{
if (sb->s_lock)
__wait_on_super(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
a time?
how can i force a lock which will work on SMP machine?
regards
Gabriel Benhanokh
please CC me for any answer as i'm not register to the mailing list (
slow connection...)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
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