[OpenIndiana-discuss] NFS hidden files

James Carlson carlsonj at workingcode.com
Wed Jun 6 11:25:36 UTC 2012


Gabriele Bulfon wrote:
> Nice discussion.
> Even though I remember not being able to remove because of a bash waiting there,
> but probably was a zfs destroy.......and IMHO this is a more logic approach

Even there, you can still do it if you want.  The issue isn't the "zfs
destroy" operation itself, but rather the normal semantics of the
umount(2) system call -- it returns an error if the file system is still
busy.

You can forcibly unmount the file system, even if it's busy, and then go
ahead and destroy the zfs file system from underneath bash.  The next
time bash attempts to access the current directory, it'll get an error.

The two operations, though, are fundamentally different.  In the case of
removing a file or a whole directory, you're just removing the directory
entries representing those objects.  The directory entries themselves
are never "in use" in any meaningful way when a file is open.  In the
case of unmounting a file system, though, you're revoking access to a
set of structures that are actively in use, and that requires a choice;
either the one removing loses (EBUSY) or the one using loses (ENOENT or
similar).

-- 
James Carlson         42.703N 71.076W         <carlsonj at workingcode.com>



More information about the OpenIndiana-discuss mailing list