From owner-cvs-sys Thu Jul 13 10:55:23 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA19393 for cvs-sys-outgoing; Thu, 13 Jul 1995 10:55:23 -0700 Received: (from dfr@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA19379 ; Thu, 13 Jul 1995 10:55:15 -0700 Date: Thu, 13 Jul 1995 10:55:15 -0700 From: Doug Rabson Message-Id: <199507131755.KAA19379@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/nfs nfs_vnops.c Sender: cvs-sys-owner@freebsd.org Precedence: bulk dfr 95/07/13 10:55:14 Modified: sys/nfs nfs_vnops.c Log: I believe that the following fix to nfs_vnops.c should do the trick w.r.t. the problem "when a file is truncated on the server after being written on a client under NFSv3, the client doesn't see the size drop to zero". (As you noted, the problem is that NMODIFIED wasn't being cleared by nfs_close when it flushed the buffers. After checking through the code, the only place where NMODIFIED was used to test for the possibility of dirty blocks was in nfs_setattr(). The two cases are safe to do when there aren't dirty blocks, so I just took out the tests. Unfortunately, testing for v_dirtyblkhd.lh_first being non-null is not sufficient, since there are times when the code moves blocks to the clean list and then back to the dirty list.) Submitted by: rick@snowhite.cis.uoguelph.ca