Hi, On Tue, 17 Mar 2009 19:19:24 +0500, Roman Mamedov <[email protected]> wrote: > What is really strange, is that it looks like I can unmount the main > NILFS, but the bind mount will continue to be accessible and writable. > And when I remount the main mount point back, cleanerd grabs the bind > mount. See below: > > # mount -t nilfs2 /dev/mapper/hi320data /mnt/hi320data > mount.nilfs2: WARNING! - The NILFS on-disk format may change at any > time. > mount.nilfs2: WARNING! - Do not place critical data on a NILFS > filesystem. > > # mount --bind /mnt/hi320data/test/ /mnt/bind-test/ > > # ls /mnt/bind-test/ > > # touch /mnt/bind-test/abc > > # umount /mnt/hi320data > > # umount /mnt/hi320data > umount: /mnt/hi320data: not mounted > > # touch /mnt/bind-test/def > > # ls /mnt/bind-test/ > abc def > > # mount -t nilfs2 /dev/mapper/hi320data /mnt/hi320data > mount.nilfs2: WARNING! - The NILFS on-disk format may change at any > time. > mount.nilfs2: WARNING! - Do not place critical data on a NILFS > filesystem. > > # ls /mnt/hi320data/test/ > abc def > > # umount /mnt/bind-test > umount: /mnt/bind-test: device is busy > umount: /mnt/bind-test: device is busy > > # fuser -c /mnt/bind-test/ > /mnt/bind-test/: 23203 > > # ps -Af | grep 23203 > root 23203 1 1 19:06 ? 00:00:00 /sbin/nilfs_cleanerd > -n /dev/mapper/hi320data /mnt/hi320data > > ----------------------- > Maybe it misdetects the bind mount as another mount of the same > filesystem (e.g. like when mounting a snapshot)?
Now, I'm considering not to invoke cleanerd for bind-mounts. It is too complex to switch over the base directory of cleanerd along with mount/umount events as above. (It is possible but I'd rather avoid complicating life management of cleanerd any further.) In addition, the bind mount can attach only part of a single filesystem, and therefore the .nilfs file, which is required for proper cleaner operation, is not assured to exist on the top of mount point for bind mounts. Do you have any inconvenience if I disable GC for bind mounts? Usually bind mount has an original rw-mount though Linux can detach original mount prior to the bind-mount. Regards, Ryusuke Konishi _______________________________________________ users mailing list [email protected] https://www.nilfs.org/mailman/listinfo/users
