From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [PATCH 4/10] fuse: Prepare to handle multiple pages in writeback Date: Wed, 04 Jul 2012 18:26:04 +0400 Message-ID: <4FF4527C.5010001@parallels.com> References: <4FF3156E.8030109@parallels.com> <4FF315DD.1020502@parallels.com> <87d34bptev.fsf@tucsk.pomaz.szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "fuse-devel@lists.sourceforge.net" , Alexander Viro , linux-fsdevel , James Bottomley , Kirill Korotaev To: Miklos Szeredi Return-path: Received: from mailhub.sw.ru ([195.214.232.25]:47443 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905Ab2GDO00 (ORCPT ); Wed, 4 Jul 2012 10:26:26 -0400 In-Reply-To: <87d34bptev.fsf@tucsk.pomaz.szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 07/04/2012 05:06 PM, Miklos Szeredi wrote: > Pavel Emelyanov writes: > >> The .writepages callback will issue writeback requests with more than one >> page aboard. Make existing end/check code be aware of this. >> >> Signed-off-by: Pavel Emelyanov >> --- >> fs/fuse/file.c | 21 ++++++++++++++------- >> 1 files changed, 14 insertions(+), 7 deletions(-) >> >> diff --git a/fs/fuse/file.c b/fs/fuse/file.c >> index 6bf9723..47f0f2e 100644 >> --- a/fs/fuse/file.c >> +++ b/fs/fuse/file.c >> @@ -345,7 +345,7 @@ static bool fuse_page_is_writeback(struct inode *inode, pgoff_t index) >> >> BUG_ON(req->inode != inode); >> curr_index = req->misc.write.in.offset >> PAGE_CACHE_SHIFT; >> - if (curr_index == index) { >> + if (curr_index == index && index < curr_index + req->num_pages) { > > This condition looks bogus. Oops, indeed :( This should be if (curr_index <= index && index < curr_index + req->num_pages) > Thanks, > Miklos > . > Thanks, Pavel