Re: tail -f over NFS in -stable
Doug Barton wrote: Blast from the past. This patch seemed reasonable to me at the time, but I notice you didn't commit it. Any reason why? The issue has just come up again on -questions. I seem to recall finding it had been fixed elsewhere, though unfortunately I can't remember the details. If it's still needed perhaps you could commit it, I have no time at the moment for FreeBSD stuff unfortunately, I might after June 2nd when my exams have finished and I've got nothing much else to do for 4 whole months. :-) -- Ben Smithurst / [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: tail -f over NFS in -stable
In article local.mail.freebsd-current/[EMAIL PROTECTED] you write: Blast from the past. This patch seemed reasonable to me at the time, but I notice you didn't commit it. Any reason why? The issue has just come up again on -questions. It shouldn't be needed. Instead, the following logic is used: if (kevent(kq, ev, n, NULL, 0, ts) 0) { close(kq); kq = -1; action = USE_SLEEP; Registration of a VNODE filter on a filesystem that doesn't understand it (NFS) should fail. Hardcoding ufs in the binary is the wrong thing to do; it precludes kernel enhancements later where other filesystems are taught about kqueue. -- Jonathan To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: tail -f over NFS in -stable
Jonathan Lemon wrote: In article local.mail.freebsd-current/[EMAIL PROTECTED] you write: Blast from the past. This patch seemed reasonable to me at the time, but I notice you didn't commit it. Any reason why? The issue has just come up again on -questions. It shouldn't be needed. Ok, your explanation makes perfect sense. I followed up to the user with a little patch that'll tell him for sure if tail is trying to use kqueue or not. I was just concerned that the problem seemed to have cropped back up, but now I think that the user's problem is not in this area. Thanks, Doug -- I need someone really bad. Are you really bad? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: tail -f over NFS in -stable
Blast from the past. This patch seemed reasonable to me at the time, but I notice you didn't commit it. Any reason why? The issue has just come up again on -questions. Doug Ben Smithurst wrote: Fred Gilham wrote: In 4.1-stable tail -f over NFS polls rather than blocking. Yes, this is acknowledged in the kqueue() manual page. Try this patch, it seems to work for me so I might commit it if no-one objects. Index: forward.c === RCS file: /usr/cvs/src/usr.bin/tail/forward.c,v retrieving revision 1.15 diff -u -r1.15 forward.c --- forward.c 2000/07/18 19:38:38 1.15 +++ forward.c 2000/09/02 16:16:40 @@ -40,7 +40,8 @@ static char sccsid[] = @(#)forward.c 8.1 (Berkeley) 6/6/93; #endif /* not lint */ -#include sys/types.h +#include sys/param.h +#include sys/mount.h #include sys/stat.h #include sys/time.h #include sys/mman.h @@ -96,6 +97,7 @@ int action = USE_SLEEP; struct kevent ev[2]; struct stat sb2; + struct statfs statfsbuf; switch(style) { case FBYTES: @@ -170,7 +172,10 @@ break; } - if (fflag) { + if (statfs(fname, statfsbuf) != 0) + err(1, statfs %s, fname); + + if (fflag strcmp(statfsbuf.f_fstypename, ufs) == 0) { kq = kqueue(); if (kq 0) err(1, kqueue); -- Ben Smithurst / [EMAIL PROTECTED] / PGP: 0x99392F7D FreeBSD Documentation Project / To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-stable in the body of the message -- I need someone really bad. Are you really bad? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message