From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: which dentry a page belongs to Date: Fri, 23 Apr 2004 18:01:30 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040423180130.A4255@infradead.org> References: <1082732223.1943.11.camel@zaphod> <20040423151458.GC6300@mail.shareable.org> <1082734938.1943.26.camel@zaphod> <20040423173738.A3812@infradead.org> <1082739174.1943.49.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jamie Lokier , linux-fsdevel@vger.kernel.org Return-path: Received: from phoenix.infradead.org ([213.86.99.234]:40720 "EHLO phoenix.infradead.org") by vger.kernel.org with ESMTP id S264881AbUDWRBb (ORCPT ); Fri, 23 Apr 2004 13:01:31 -0400 To: Shaya Potter Content-Disposition: inline In-Reply-To: <1082739174.1943.49.camel@zaphod>; from spotter@cs.columbia.edu on Fri, Apr 23, 2004 at 12:52:54PM -0400 List-Id: linux-fsdevel.vger.kernel.org On Fri, Apr 23, 2004 at 12:52:54PM -0400, Shaya Potter wrote: > > in 2.4 writepage is always the result of data dirtied by mmap. In 2.6 it's > > also for use for data dirtied by write. Even in 2.4 there's no gurantee > > the mapping that dirtied the page still exists when the page is written out > > by the VM. > > so the mapping off the page struct will be null? No. but i_mmap and i_mmap_shared might be empty. > so is that a yes to my understanding of "multiple dentries" i.e. a > single inode linked into multiple places in the fs. Yes. > > > > It's also possible to find no dentries at all. > > > > > > even if in my fs's writepage() function? > > > > Yes. > > so the vm_file part of vm_area_struct will be null? You won't find a vm_area_struct at all in that case. > > You can't do that. > > Yes, I know it's evil to do and would never be accepted into the kernel > proper, the question I'm trying to figure out if it it's possible (with > a stackable fs) to version files on write. It's not evil is's fucking impossible for gods sake. you can be in writepage with page->mapping->i_mmap{,shared} beeing empty. No way in hell you'll ever get to a dentry. It's not that difficult. And if english language is so difficult to understand ask someone to draw a diagram for you.