-
- Downloads
cpiod.so: Unmount file systems mounted over the mkfs phase
The root dataset and ZFS are mounted at the mkfs phase, but they aren't unmounted aftwards. Running mkfs with VERBOSE flag enabled shows the following: Running mkfs... VFS: mounting zfs at /zfs zfs: mounting osv from device osv VFS: mounting zfs at /zfs/zfs zfs: mounting osv/zfs from device osv/zfs The first mount happens when issuing: {"zpool", "create", "-f", "-R", "/zfs", "osv", "/dev/vblk0.1"}, &ret); It creates a pool called osv and mounts the root dataset at /zfs The latter mount happens when issuing: {"zfs", "create", "osv/zfs"} It creates a file system called zfs at the pool OSv and automatically mounts it at the root dataset mountpoint. No data inconsistency problem was seen up to now because both mkfs.so and cpiod.so do an explicit sync() at the end, thus ensuring everything was correctly flushed out to the stable storage. There is an expression in Dutch that says: prevention is better than cure. Thus, this patch changes cpiod.so to unmount both mount points when the /zfs/zfs prefix was passed. It cannot be done at mkfs.so itself because cpiod.so is called afterwards at the same OSv instance. Signed-off-by:Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Loading
Please register or sign in to comment