On Jun 14, 2002 12:55 +0900, OHKUBO Katsuhiko wrote:
> There ars
> void write_super_lockfs(super_block *)
> void unlockfs(super_block *)
> in struct super_operations.
>
> Ext3 and reiserfs have implementations of it.
> But I cannot find callers of it and system calls for it.
>
> There are some pathches such as
> http://www.lifix.fi/listarchive/lkml/2001-08/msg00464.html
> but it's not included in Linux 2.4.18/2.5.21.
> drivers/md/lvm.c has only callers of functions in this patch
> if defined LVM_VFS_ENHANCEMENT, but there aren't function bodys.
>
> Q1: Who does use s_op->write_super_lockfs/unlockfs now?
LVM and EVMS use this interface, but it has not been accepted into the
kernel yet. I think Chris Mason wants to submit the patch to implement
this, but has not yet. I believe the 2.4.18 patch needs changing for
both 2.4.20 and 2.5.x.
> Q3: Is it enable to implement of system calls for lockfs/unlockfs
> without deadlocks?
No, because there is no guarantee that the user process will ever
call unlockfs (it could die or something). I _suppose_ it would
be possible to call an ioctl to do the lockfs, and if the process dies
before calling unlockfs the close() will also do the unlockfs. It
could still deadlock on I/O to the locked device and never terminate,
and it would be unkillable from user-space (stuck in "D" state).
Cheers, Andreas
-- Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ http://sourceforge.net/projects/ext2resize/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:30 EST