diff options
author | dg <dg@FreeBSD.org> | 2003-08-14 11:02:03 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 2003-08-14 11:02:03 +0000 |
commit | 0ed08c885f1ed51fabdb056af02a8e36345fe73f (patch) | |
tree | 47b0427fb7dcc5501798ca4596cac1157ad00c4f | |
parent | 1ecfde513f6ab56bdd2f80ec42ab45fd0bcfaa9c (diff) | |
download | FreeBSD-src-0ed08c885f1ed51fabdb056af02a8e36345fe73f.zip FreeBSD-src-0ed08c885f1ed51fabdb056af02a8e36345fe73f.tar.gz |
Removed check of st_rdev changing in the -F support. st_rdev for regular
files is usually the first direct block pointer. Since FreeBSD does
automatic block reallocation to reduce filesystem fragmentation, the
file being tailed can be relocated to different blocks 'on-the-fly',
making the check for st_rdev unreliable. The result of this bug is
tail -F pseudo-randomnly thinking the file was rotated when it wasn't,
and as a result, spews out the entire file trying to catch up.
MFC after: 3 days
-rw-r--r-- | usr.bin/tail/forward.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index 25facec..883ea9a 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -253,7 +253,6 @@ forward(fp, style, off, sbp) (void)sleep(1); if (sb2.st_ino != sbp->st_ino || sb2.st_dev != sbp->st_dev || - sb2.st_rdev != sbp->st_rdev || sb2.st_nlink == 0) { fp = freopen(fname, "r", fp); if (fp == NULL) { |