[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] lazy unmount
From:       Rob Landley <rob () landley ! net>
Date:       2005-07-30 0:04:55
Message-ID: 200507291904.56025.rob () landley ! net
[Download RAW message or body]

On Friday 29 July 2005 10:36, Rafael Ávila de Espíndola wrote:
> I really need the lazy unmount feature and it appears to be simple to add
> it to umout.c. But
> 1) There was a discussion about a mount rewrite. Is umount also going to be
> rewritten?

Yes, and that's what's holding up the checkin.  (The mount part was done a 
while ago...)

> 2) busybox umount use -l fop freeloop. What option should I use for lazy?

I'm ripping out -l for freeing loop devices; it should now autodetect this.  
(Okay, when I say "autodetect" I mean that when loop support is enabled it 
calls the loop detach ioctl on the block device unconditionally, which should 
be a NOP for every device that's not a loop device because according to 
linux/Documentation/ioctl-number.txt, loop major 'L' minor 00-1F is not a 
conflicted range.)

And for the case of doubly mounted loop devices (which my code sets up as 
preferable to attaching two loop devices to the same file -- one loop device 
can be mounted in multiple places and they'll share a superblock properly and 
the kernel won't corrupt the underlying filesystem.  Two block devices 
attached to the same file, the kernel does NOT detect that it's already in 
use, and if either mount is writeable things get unpleasant quickly.  Not 
that anybody's ever encountered this, but I'm trying to fix it.  And yes, I 
care about the race conditions of somebody detaching the loop device while 
another mount detects it and wants to re-use it, although in that case I'm 
just trying to fail gracefully rather than retry.  And yes, I care about two 
block devices on the same file at different offsets: I'm catching that one 
andmaking sure the offsets match before ok-ing it for reuse.)

And you wonder why this took so long...

Anyway: yeah, -l is becoming lazy unmount.  I'm working on it...

> Thanks,
> Rafael

Rob


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic