datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
575 stars 122 forks source link

Remounting NTFS volume hangs file system #7

Open crawfxrd opened 9 years ago

crawfxrd commented 9 years ago

Attempting to unmount and remount an NTFS (ntfs-3g) file system with an active snapshot causes mount to hang.

Enabling debug logging shows it hangs after "reopening cow file" in cow_reopen. Adding debugging lines to file_open shows it never returns from filp_open.

fallocate -l 2G ntfs.img
mkntfs -F -f ntfs.img
losetup /dev/loop0 ntfs.img
ntfs-3g -o rw /dev/loop0 /mnt
dbdctl setup-snapshot /dev/loop0 /mnt/cow.snap 1
dbdctl transition-to-incremental 1
umount /mnt
ntfs-3g -o rw,debug /dev/loop0 /mnt

ntfs-3g does not produce any output, even with the debug option.

tcaputi commented 9 years ago

This appears to be an incompatibility with our persistence through unmounting feature and FUSE filesystem drivers (such as ntfs-3g). We will need to see if the driver can be made to work with FUSE. Until then, the dattobd can still be used without persisting through unmounts by setting the MAY_HOOK_SYSCALLS flag to 0 at insmod.