Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2007 00:18:28 -0300
From:      Alejandro Pulver <alepulver@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   Disk sync at shutdown and fusefs filesystems
Message-ID:  <20071211001828.54e1da6b@deimos.mars.bsd>

next in thread | raw e-mail | index | archive | help
--Sig_/K03ZYGnj2m=1mJj1y458J5r
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

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

--Sig_/K03ZYGnj2m=1mJj1y458J5r
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHXgGEiV05EpRcP2ERAhskAJ0Yny548w/aZocDSDs7hbp3zxkMnACginqC
p+HxdhxpRCoeoGtzV+ScZb8=
=31sz
-----END PGP SIGNATURE-----

--Sig_/K03ZYGnj2m=1mJj1y458J5r--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071211001828.54e1da6b>