bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tail + inotify over nfs


From: Giuseppe Scrivano
Subject: Re: tail + inotify over nfs
Date: Sun, 13 Dec 2009 14:06:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hello,

Jim Meyering <address@hidden> writes:

> Pádraig Brady wrote:
>> I've just noticed that `tail -f` will not work over NFS
>> as changes on the remote system will not go through
>> the local VFS and so will not be noticed by inotify.
>>
>> So what to do? I suppose we could statfs("filename")
>
> Yes, I think something like that is required.
> For even less impact, call fstatfs on the file descriptor.

When this check should be done?  At initialization before enter the
tail_forever/tail_forever_inotify loop?  In this case, shouldn't we take
into account that the underyling FS can be changed when "tail -F" is
used?  Like:

  (sleep 5s; mount -F nfs server:/foo/bar /mnt/) &
  tail -F /mnt/file

Cheers,
Giuseppe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]