From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: which dentry a page belongs to Date: Fri, 23 Apr 2004 23:49:47 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040423224947.GC8915@mail.shareable.org> References: <20040423151458.GC6300@mail.shareable.org> <1082734938.1943.26.camel@zaphod> <20040423173738.A3812@infradead.org> <1082739174.1943.49.camel@zaphod> <20040423180130.A4255@infradead.org> <1082740707.1943.61.camel@zaphod> <20040423173719.GB7335@mail.shareable.org> <1082743539.1943.84.camel@zaphod> <20040423213747.GA8915@mail.shareable.org> <1082759212.1854.6.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org Return-path: Received: from mail.shareable.org ([81.29.64.88]:45222 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S261654AbUDWWtz (ORCPT ); Fri, 23 Apr 2004 18:49:55 -0400 To: Shaya Potter Content-Disposition: inline In-Reply-To: <1082759212.1854.6.camel@zaphod> List-Id: linux-fsdevel.vger.kernel.org Shaya Potter wrote: > OK, great example, now I see the problem which can't be easily solved. > > update-data > ioctl > update-data > writepage() > > writepage can't differentiate b/w data b4 and data after, so only way to > do it would be to force a sync b4 ioctl is called, which I would think > (perhaps wrong) should write out all the data to disk. But unsure if > prorgramatically able to really test to see if it worked or not. "sync" doesn't do anything to help. Read up on msync() until you understand what is intended here. In general, first "update-data" in your example doesn't count as a "write" and it wouldn't be logical for a program to expect it to be snapshotted. It counts as the program queuing up data which it does not expect to be visible in the file until the next msync, munmap or exit (although it is visible to other concurrent mmaps, and it _might_ be visible in the file, of parts of it might). -- Jamie