There are a few with issues with how freeze works in current kernels: - Unmounting: It is possible to umount a frozen filesystem; the freeze code holds an active reference to the superblock so it does not go away. Since it is not possible to thaw by block device, thawing an unmounted filesystem involves mounting it again and using the current vfs freeze API. - There is no check API: There is no easy way to know whether a filesystem is frozen or not. - Foolproofness: Quite often the freeze/thaw process is handled from a daemon. In such cases we have to make really sure that the process does not go away or is killed while the filesystem is frozen; there is no check API so it is not always easy to figure out what is going on. With the advent of virtualization things got even funnier; in some cases not even the root user is aware of the existence of such daemon (usually a guest agent that freezes the guests filesystems before taking a storage snapshot). I cooked some patches that add the long missing check ioctls and a new freeze API, which should (modulo bugs) the current situation: - Check ioctls [1/4] fsfreeze: add vfs ioctl to check freeze state Adds a vfs ioctl to check the freeze state. [2/4] fsfreeze: add block device ioctl to check freeze state Adds a block device ioctl to check the freeze state. This is needed because it possible to umount frozen filesystems. - New freeze API [3/4] fsfreeze: add ioctl to create a fd for freeze control Adds a new ioctl that freezes the indicated filesystem and returns a file descriptor; as long as that file descriptor is held open, the filesystem remains open. [4/4] fsfreeze: add freeze fd ioctls Adds new ioctls that operate on the file descriptor described in the previous patch; these can be used to freeze/thaw the filesystem and check the freeze state of the filesystem, thus avoiding the need to get new file descriptors constantly. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html