From owner-freebsd-current@freebsd.org Fri Mar 17 19:48:11 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2782ED10CFD for ; Fri, 17 Mar 2017 19:48:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBB9D13E4; Fri, 17 Mar 2017 19:48:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::4430:14cb:bc65:3899] (unknown [IPv6:2001:7b8:3a7:0:4430:14cb:bc65:3899]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 728D32EDAD; Fri, 17 Mar 2017 20:48:02 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_8A484A28-704E-438B-B7AB-1F5F014DD938"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: process killed: text file modification Date: Fri, 17 Mar 2017 20:47:53 +0100 In-Reply-To: <20170317141917.GS16105@kib.kiev.ua> Cc: Rick Macklem , Ian Lepore , Gergely Czuczy , FreeBSD Current To: Konstantin Belousov References: <45436522-77df-f894-0569-737a6a74958f@harmless.hu> <55189643.aaZPuY77s8@ralph.baldwin.cx> <3ed3e4a3-23af-7267-39f1-9090093c9c1e@harmless.hu> <5ac94b9a-7ced-9eff-d746-7dddaaeca516@harmless.hu> <1489340839.40576.82.camel@freebsd.org> <20170317083605.GQ16105@kib.kiev.ua> <20170317141917.GS16105@kib.kiev.ua> X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 19:48:11 -0000 --Apple-Mail=_8A484A28-704E-438B-B7AB-1F5F014DD938 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 17 Mar 2017, at 15:19, Konstantin Belousov = wrote: >=20 > On Fri, Mar 17, 2017 at 01:53:46PM +0000, Rick Macklem wrote: >> Well, I don't mind adding ncl_flush(), but it shouldn't be >> necessary. I actually had it in the first >> rendition of the patch, but took it out because it should happen >> on the VOP_CLOSE() if any writing to the buffer cache happened >> and that code hasn't changed in many years. > Dirty pages are flushed by writes, so if we have a set of dirty pages = and > async vm_object_page_clean() is called on the vnode' vm_object, we get > a bunch of delayed-write AKA dirty buffers. This is possible even = after > VOP_CLOSE() was done, e.g. by syncer performing regular run involving > vfs_msync(). >=20 > I agree that the patch would not create new dirty buffers, but it is = possible > to get them by other means. >=20 >>=20 >> What the patch was missing was updating n_mtime after the dirty >> page flush. >>=20 >> Btw, a flush without OBJPC_SYNC happens when the file is = VOP_CLOSE()'d >> unless the default value of vfs.nfs.clean_[ages_on_close is changed, = which >> I think is why the 1sec resolution always seemed to work, at least = for the >> example where there was an munmap before close. >>=20 >> Attached is an updated version with that in it, rick FWIW, Rick's patch seems to do the trick, both for my test case and lld itself. And even with vfs.timestamp_precision=3D3 on both server and client. -Dimitry --Apple-Mail=_8A484A28-704E-438B-B7AB-1F5F014DD938 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAljMPXEACgkQsF6jCi4glqOi3wCfRpH+RjEYSVN4InJXsFdyUdZc v2wAn3AD55eetKriKKscKDN1g527zobq =LD1C -----END PGP SIGNATURE----- --Apple-Mail=_8A484A28-704E-438B-B7AB-1F5F014DD938--