From owner-dev-commits-src-all@freebsd.org Sat Jan 23 23:42:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52C8C4E289F; Sat, 23 Jan 2021 23:42:49 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-qb1can01on0629.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5c::629]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DNXk113Tkz3NVp; Sat, 23 Jan 2021 23:42:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eu09zPCNnGKxyrGNkXm7tmScV+zFtIz9uhL2EVIv9Zl/tpw+V1LGH6qdlix9OlhQDuZ9f9Y4LiUD1yQz3UJkWJakDxJN4IzTUo0dxCdLZ03jubd3TUiOAt/0bf2W8ViefRAw6nA9u6ezpgd2cVi5InKRxL3yJdMLiWOaoGkXP9YMYb9xuUgIBOXF79WvPphM2noICKRUn0Rx2nF0yQu+PGSKeI7bUFry6HCjGc07FC9p39qVgIg5c3ZezTm43Ae+s3KwdGx6NfkMecXsqPWy/gfuapo6VxkvEhuhav2GS9i11XRzRJhrt6AMdlCgL8EAme0+LstDhxlzHYXzlu6UJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=950NHLEE34FNVvZ34CqSVZ5eH/p5PiwIH2LDwvqVaK4=; b=AnuJ5cbiw7wP1E09m6MN5KTf8J/4m/7VmlDoea8dUBuLLNDtl9kydt7JzGbTCw5/BElD8MIeKdLu7/EjiCYO3EwRnKJCEDcsILzECHZvhsAlYH+7Ns47CvW+zOyYvs74JOiYjMV4rx8qyiBfQVy3Qna6EWJUfZ65jwcGU2gA7enyrbcFXtVTaRcfbpm/LYskYoyWhQJ0WArs14bZTlDup0K0UJz8S2QjN6TbslzX+k1OauHgOOdO8UtRipx4Q6XUt1+HdHj9vjoRITF430MYKfTfLmVow8RsxRYrGusQQd9/5BVE5huzo9nbwcqjfNvggefd/imJV9vFMY837d8wRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=950NHLEE34FNVvZ34CqSVZ5eH/p5PiwIH2LDwvqVaK4=; b=Hg9iW5M65p2xbPabu8sRMiVEXE0U/brpHnMSckX6r8H7ASMrSHdYN7HLDllpH595xyk0/cZwqQQOnvSeSOT9ya6ij0Zox19QXkXAIl5w7mSbOGzoQ/wrGPhnONU7eyhyzUgEVNMadyAr6IspIHqjqhgQX21VGxZhpunq1FLnnX38WhckeNoAL0TOY5BQYskWJ4Y5xUYywgoWsW0zC1R1T94jsBiWewZ1U6u3Qc71+yGsOSAoNZGAPAEUkI23oAK0T5+m4Vom0NtHw7F8hf4SfqFNDWUkO4DIFuUPAMorHuLMxe4dTSRHPyuP/LafkRtosEIt17M+oWJt5bEuynjikg== Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQXPR01MB4216.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Sat, 23 Jan 2021 23:42:46 +0000 Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d86:c7f9:bc4c:40c0]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d86:c7f9:bc4c:40c0%6]) with mapi id 15.20.3763.018; Sat, 23 Jan 2021 23:42:46 +0000 From: Rick Macklem To: Yasuhiro Kimura , "kib@FreeBSD.org" CC: "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: Re: git: aa8c1f8d84d2 - main - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write Thread-Topic: git: aa8c1f8d84d2 - main - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write Thread-Index: AQHW8cPeOsgYE2Xs40qbZA3x4cusm6o13IYQ Date: Sat, 23 Jan 2021 23:42:46 +0000 Message-ID: References: <202101231525.10NFPa3V002367@gitrepo.freebsd.org>, <20210124.050852.1053381322070533315.yasu@utahime.org> In-Reply-To: <20210124.050852.1053381322070533315.yasu@utahime.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76ff098a-56e4-4900-4134-08d8bff89634 x-ms-traffictypediagnostic: YQXPR01MB4216: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SNaRM3zJwrGSK0r+QoEqw3lz8nETdzmTpMkQQCfMbQgdu6URWxEpcpcBvBsnqdOoYCloeHg8rPS5z8YLQ14wee5sGM0ibhDr30HsLzm8r7iAX/49Yc5ULsAph+bCSQK77qwjAAvsv8knGTQPtf8BC74QeN6s+a4gll6WfW2v3wGC73zZt3fYw5jVrRODADhKyCNRLnvXji3UBjo/YVkQwacfCMmLdUkqYP3SAqP5j+mRmuVUAO7L9jzPW5W2N/4h53w4G2Rri3Kh/dRDhzNkT4VGvKGtCkWtEljDNOFwBVCnzDyRqtSgpQUYTugiZXU5UCX+5zNy1GmXfgz3wcdrWvqpvIm70ur5QevbDtthzZe2KFcS1ZNsFZDjJ+7Y19cYkKdWdHOSCW2X4VYdMMplKYcqWvx/pIfieTf93wiuZEs9+eFDnSnbMnYFP7EsCGJOlABn9ufk//Dw1h4EZHwQuQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(346002)(366004)(396003)(376002)(39850400004)(8676002)(86362001)(786003)(316002)(478600001)(186003)(5660300002)(2906002)(71200400001)(4326008)(64756008)(76116006)(66476007)(110136005)(66556008)(66446008)(52536014)(83380400001)(54906003)(33656002)(966005)(9686003)(55016002)(7696005)(66946007)(91956017)(6506007)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?CtSwaZuCgIScYjRDMSy1S/ML+iKTbAMK5l99imfzpQ70GhSeZvt6m7Jesb?= =?iso-8859-1?Q?N2L4yKgBipB3g4CxJc9+wfMLibsJzN1mW+0B7ZTTVBcAprVFfnjLmr/Qrf?= =?iso-8859-1?Q?OK8NLEvfOYcl4E612qzhz7kDS3FqcGLRfrnxbuJS6BulXxFpQGficm6CZQ?= =?iso-8859-1?Q?pVWr3fCZdi+RgkVV52RwHjd6KYcw2wEH6p4xrpckRelA3iuZjMfv08olJS?= =?iso-8859-1?Q?pqar77bm0PxDRzlf3/qpWNLyTki7fzMGgJJKTJ2QWJWZOKGiotwyngyuxu?= =?iso-8859-1?Q?uh9ISek8M2CyjnNu8GgcyfPZKOV3igJ4yLpbnUZ8+Z8zGeHvm7NWSz0fik?= =?iso-8859-1?Q?tRB+WrlA4MlEvPlogpC9xNV4TVdBIdacSiNv9C+MLh/bSqRhKeuOAz7bNp?= =?iso-8859-1?Q?Ad0X7o5IOVk+ABD4B9r7JHzUWcWc/zXMQkX/4W4IDdCdBU207zfhPfxVzG?= =?iso-8859-1?Q?FOU14nxN+/dG9506lYKR58W8Hb/ne5NkfPkce3wZQwpL9oxYz0KdX18yo4?= =?iso-8859-1?Q?kqFNjSI5A/DgAl7Cgl/go8+QbjgTA2t5ezeiKZ1JskhSo34NLtEscjBUdB?= =?iso-8859-1?Q?RGBXotJVQhEmWoF0CxSlGecWg9adGqAjB+K1iNtioFKPsw1eLAGabgnLvx?= =?iso-8859-1?Q?8PAQmg3ygkeQHBwRmlhJpMKdz7INJGp8oeQcYvUQ9RJrPZzQ36BDtscVzQ?= =?iso-8859-1?Q?kUSluCVkQApn2uv3UtgTFeFOSEuLOeP4wY1Kj9nmY9yFTzyfILeJVwuHb1?= =?iso-8859-1?Q?KtaFRCjZAHYMNeV22DePIG6R74YYXyBRAUpJig0VHirhHKMYRqf9sKdGj1?= =?iso-8859-1?Q?eBn3DjnXE0P6hK9SpaWzcwMnnidu9kXKdEtn2SPzk+jRp28nQxKPKqBVMa?= =?iso-8859-1?Q?qShYMmN64iWtPeHfCs71oF/FHsCRx3Moy5fanHLNj/zom1UY8Da8qwhqmx?= =?iso-8859-1?Q?DrtJLY0X7waFgrz0hA7ioa+Ryb+ILYUrLKGsRAYyvo1e6aY1jC8zEn+hB4?= =?iso-8859-1?Q?Ane6EjGTWFzc8l45U6zu6oXsrVxksiHC0InG8sEljoveTIlQt+QGXtR3z5?= =?iso-8859-1?Q?Pxd0aVkjYEbmS2sgefuD7s+CA3t8FsD2st0/mqAa5fsfe5CDWC4+51NJB4?= =?iso-8859-1?Q?R5eHoQR2Vnlo3ey5iU7Y77LGofVe0jkAiKxwBXuzz78fkxeseF?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 76ff098a-56e4-4900-4134-08d8bff89634 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2021 23:42:46.4557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hBCrudkbwwGlPhGIx/vmT1bvrmfY0GT0MwxL0OiVXILSnAKDCwDsFMpNg02GlOcgWdPSPxk7Vj77lI+2XJBibQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR01MB4216 X-Rspamd-Queue-Id: 4DNXk113Tkz3NVp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 23:42:49 -0000 Yasuhiro Kimura wrote:=0A= >> The branch main has been updated by kib:=0A= >>=0A= >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Daa8c1f8d84d2638a354e71f95= 93e978d00878243=0A= >>=0A= >> commit aa8c1f8d84d2638a354e71f9593e978d00878243=0A= >> Author: Konstantin Belousov =0A= >> AuthorDate: 2021-01-22 21:47:06 +0000=0A= >> Commit: Konstantin Belousov =0A= >> CommitDate: 2021-01-23 15:24:32 +0000=0A= >>=0A= >> nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcac= he in nfs_write=0A= >>=0A= >> Otherwise writing thread might wait on sbusy state of the pages whic= h were=0A= >> busied by itself, similarly to nfs_read(). But also we need to clea= r=0A= >> NVNSETSZKSIP flag possibly set by ncl_pager_setsize(), to not undo= =0A= >> extension done by write.=0A= >>=0A= >> Reported by: bdrewery=0A= >> Reviewed by: rmacklem=0A= >> Tested by: pho=0A= >> MFC after: 1 week=0A= >> Sponsored by: The FreeBSD Foundation=0A= >> Differential Revision: https://reviews.freebsd.org/D28306=0A= >=0A= >On my 14-CURRENT amd64 environment this commit causes the problem that=0A= >garbage date are written to file mounted with NFS.=0A= >=0A= >I use NFSv4 and autofs to mount home directory on my 12.2-RELEASE=0A= >amd64 server. And I use zsh as login shell and configure it so command=0A= >history is written to history file each time any command is executed.=0A= >=0A= >After update to 519b64e27fddf10c0b7f6a615edbad730b8c6c45, I see=0A= >following error message if I try to execute any command.=0A= >=0A= >----------------------------------------------------------------------=0A= >yasu@rolling-vm-freebsd1[1009]% ls=0A= >zsh: corrupt history file /home/yasu/.zhistory=0A= >yasu@rolling-vm-freebsd1[1010]%=0A= >----------------------------------------------------------------------=0A= >=0A= >I logged in the server and check the content of history file. Then=0A= >some garbase data are written to history file.=0A= >=0A= >I confirmed the problem disappears by reverting this commit.=0A= I was also able to reproduce a problem (a truncated file) during=0A= testing.=0A= For my case, setting the size to n_size instead of va_size fixed=0A= the problem I reproduced, but I do not know if this achieves=0A= what Kostik intended.=0A= =0A= My variant of the patch is in D28318.=0A= Maybe you could test this, although you might want to wait=0A= until Kostik comments on this variant of the patch.=0A= =0A= rick=0A= =0A= ---=0A= Yasuhiro Kimura=0A= =0A=