Disk sync at shutdown and fusefs filesystems
Alejandro Pulver
alepulver at FreeBSD.org
Mon Dec 10 19:18:52 PST 2007
Hello.
The port fusefs-ntfs (NTFS-3G is the official name) is a NTFS
read/write driver using FUSE (a user-space kernel independent API for
writing filesystem drivers). The latter uses a (user-space) cache for
improving performance as there isn't a block device cache in the
kernel, and it was originally made in Linux with that assumption.
The problem with NTFS-3G (and all other FUSE based drivers maybe) is
that it doesn't flush the cache data to the disk at shutdown, but it
does when unmounted (and I guess this doesn't happen automatically). I
noticed this when files I write before manually unmounting persist, and
otherwise sometimes they don't.
So I guess with native (here I mean written directly for the system kernel,
using the kernel cache) FreeBSD filesystems the kernel flushes the cache at
shutdown, but they aren't unmounted.
Generally this isn't a problem since most FUSE filesystems are
"virtual" (for example: over SSH, FTP, HTTP, etc.) and don't use cache
nor need flushing. But this isn't the case with NTFS-3G.
Are my assumptions right? Then I have to look for some way to manually
unmount FUSE filesystems at shutdown, because they are already mounted
at startup. I thought about instructing the fusefs-kmod rc.d script to
unmount FUSE filesystems before attempting to unload the kernel module
(currently it only loads/unloads fuse.ko).
Thanks and Best Regards,
Ale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20071211/5e7f75b7/signature.pgp
More information about the freebsd-hackers
mailing list