Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Dec 2007 22:14:33 +0100
From:      Karsten Behrmann <BearPerson@gmx.net>
To:        freebsd-hackers@freebsd.org
Subject:   Re: unionfs & kqueue?
Message-ID:  <20071209221433.216218d7@Karsten.Behrmanns.Kasten>
In-Reply-To: <fjhi8o$trn$1@ger.gmane.org>
References:  <fjhi8o$trn$1@ger.gmane.org>

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

Heya,

> Does unionfs work with kqueue? When I run `tail -f` on a file residing
> on unionfs with cd9660 underneeth and md+ufs over it, it doesn't detect
> changes. The changes are immediately visible, just not with tail -f.

Hmm. When you start the tail -f, does the file reside on the cd9660 or
already on the md?
See if tail -F does a better job.
My guess would be that, since you cannot modify a file on any filesystem
except the top one, unionfs must change semantics of open so that even
opening for writing or appending silently creates a new copy of the file
on the top filesystem (if the file didn't reside there already).
As tail -f still has the lower-layer file open,
it never notices that there's a new file by the name.

(this behavior is the same as

echo foo >foo
tail -f foo
# in another terminal
echo bar >bar
mv bar foo

which also "fails" to notice the new data)

So Far,
  Karsten "BearPerson" Behrmann

p.s.: this is probably why the -F option was added to tail

--=20
Open source is not about suing someone who sells your software. It is
about being able to walk behind him, grinning, and waving free CDs with
the equivalent of what he is trying to sell.

--Sig_qCfLlgaMlXqmI5rVZAy9BR8
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFHXFq8AksKLoO3vywRAktuAJ0a8m5P4GRw+EylQyUQloyMQwe3nwCeK5Ys
qJbIV9IH8DFmKDjzuUCuDO4=
=ZZDb
-----END PGP SIGNATURE-----

--Sig_qCfLlgaMlXqmI5rVZAy9BR8--



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