From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757354AbdJKM2w (ORCPT ); Wed, 11 Oct 2017 08:28:52 -0400 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:26247 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756829AbdJKM2t (ORCPT ); Wed, 11 Oct 2017 08:28:49 -0400 From: "Levin, Alexander (Sasha Levin)" X-Host: pioneer.tdc.vzwcorp.com To: "ericvh@gmail.com" , "rminnich@sandia.gov" , "lucho@ionkov.net" , "torvalds@linux-foundation.org" CC: "v9fs-developer@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "jack@suse.com" , "viro@zeniv.linux.org.uk" Subject: Re: [PATCH] 9p: set page uptodate when required in write_end() Thread-Topic: [PATCH] 9p: set page uptodate when required in write_end() Thread-Index: AQHSsirRaZAdjOarXE+CQy9Z9zTlZKIRgBKAgM6IE4A= Date: Wed, 11 Oct 2017 12:27:43 +0000 Message-ID: <20171011122741.doojezq3fe4iyg73@sasha-lappy> References: <20170410184657.13430-1-alexander.levin@verizon.com> <20170602023109.4sr6zz4dgh3e6syn@sasha-lappy> In-Reply-To: <20170602023109.4sr6zz4dgh3e6syn@sasha-lappy> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: NeoMutt/20170113 (1.7.2) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="us-ascii" Content-ID: <04A3DFA1B2DA3F43AAC1D1A14E07F1F3@vzwcorp.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v9BCTUBG008796 Linus, Al, Can one of you please pick this one directly? This has been on LKML since April, but the 9p maintainers seem to be MIA? On Thu, Jun 01, 2017 at 10:31:09PM -0400, Sasha Levin wrote: >Ping? > >On Mon, Apr 10, 2017 at 02:46:57PM -0400, Sasha Levin wrote: >> From: Alexander Levin >> >> Commit 77469c3f570 prevented setting the page as uptodate when we wrote the >> right amount of data, fix that. >> >> Fixes: 77469c3f570 ("9p: saner ->write_end() on failing copy into non-uptodate page") >> Reviewed-by: Jan Kara >> Signed-off-by: Alexander Levin >> --- >> fs/9p/vfs_addr.c | 10 +++++++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c >> index adaf6f6..e1cbdfd 100644 >> --- a/fs/9p/vfs_addr.c >> +++ b/fs/9p/vfs_addr.c >> @@ -310,9 +310,13 @@ static int v9fs_write_end(struct file *filp, struct address_space *mapping, >> >> p9_debug(P9_DEBUG_VFS, "filp %p, mapping %p\n", filp, mapping); >> >> - if (unlikely(copied < len && !PageUptodate(page))) { >> - copied = 0; >> - goto out; >> + if (!PageUptodate(page)) { >> + if (unlikely(copied < len)) { >> + copied = 0; >> + goto out; >> + } else if (len == PAGE_SIZE) { >> + SetPageUptodate(page); >> + } >> } >> /* >> * No need to use i_size_read() here, the i_size >> -- >> 2.7.4 > >-- > >Thanks, >Sasha -- Thanks, Sasha