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

List:       busybox
Subject:    Re: Off-Topic Question: Check if filesystem is in use
From:       Harald Becker <ralda () gmx ! de>
Date:       2013-03-29 15:29:22
Message-ID: 20130329162922.31d2dabc () ralda ! gmx ! de
[Download RAW message or body]

Hi Grant !

>If you want something that's atomic, then I think 'umount' is your
>only option.  If it fails, the fielsystem was busy.  If it succeeds,
>then it wasn't busy and is now unmounted.

Sure, I previously did that umount check on physical patitions, but my
current problem was, that the filesystem is a tmpfs. As soon as I do the
umount to check if it is no longer used, the contents of the filesystem
is lost and can't be processed/stored away for later use. On the other
hand the final processing can't start as long as there are active
processes accessing the filesystem.

I did not consider that mount bind feature to hold a copy of the
filesystem during umount of the original mount point. So Lauren's
solution fit's perfect.

--
Harald
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

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