From: Jeff Layton Subject: Re: [PATCH] CIFS: Use invalidate_inode_pages2 instead of invalidate_remote_inode (try #4) Date: Tue, 22 Mar 2011 13:03:34 -0400 Message-ID: <20110322130334.0680b9a3@corrin.poochiereds.net> References: <1300229732-4902-1-git-send-email-piastry@etersoft.ru> <20110322074233.546d4553@corrin.poochiereds.net> <20110322080409.23461155@corrin.poochiereds.net> <20110322111711.55365655@corrin.poochiereds.net> <20110322123549.022e590e@corrin.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Pavel Shilovsky , linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Steve French Return-path: In-Reply-To: Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Tue, 22 Mar 2011 11:46:54 -0500 Steve French wrote: > On Tue, Mar 22, 2011 at 11:42 AM, Steve French w= rote: > > Isn't there a lock across lseek? > > > >>> but how could we have PageDirty? =C2=A0We just did filemap_write_= and_wait > >>> (unless some private mmap case where it may be ok?). > >>> > >> > >> Nothing prevents the page from being redirtied after writeback. >=20 > If it is redirtied, we immediately do a filemap_fdatawrite anyway (in > the write/aio_write path) so there isn't a delay in writing data to > the server. >=20 The bottom line is that you're asking to revalidate the file, finding that it has changed and are trying to invalidate the pagecache. Some of those pages are may not be invalidated though, so you won't end up with new data from the server if you go to do a read. The whole point of this patch is to fix data-integrity issues, right? So why only do a half-assed job of that? --=20 Jeff Layton