From 7b51f664767e41a4a57cf80de9669a14af402948 Mon Sep 17 00:00:00 2001
From: David Greenman <dg@FreeBSD.org>
Date: Thu, 14 Aug 2003 11:02:03 +0000
Subject: [PATCH] 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
---
 usr.bin/tail/forward.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c
index 25facec287fe..883ea9a3a145 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) {