From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Jambor Subject: Re: File and device pages and buffers Date: Thu, 21 Apr 2005 22:16:08 +0200 Message-ID: <8e70aacf0504211316b57ce71@mail.gmail.com> References: <8e70aacf05041717093deeb825@mail.gmail.com> Reply-To: Martin Jambor Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from zproxy.gmail.com ([64.233.162.194]:16993 "EHLO zproxy.gmail.com") by vger.kernel.org with ESMTP id S261854AbVDUUQJ convert rfc822-to-8bit (ORCPT ); Thu, 21 Apr 2005 16:16:09 -0400 Received: by zproxy.gmail.com with SMTP id 18so150258nzp for ; Thu, 21 Apr 2005 13:16:08 -0700 (PDT) To: linux-fsdevel@vger.kernel.org In-Reply-To: <8e70aacf05041717093deeb825@mail.gmail.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Can I try to bring your attention once more to the following issue: On 4/18/05, Martin Jambor wrote: > There is one thing about cache pages and buffers that puzzles me and > that I have not found in any documenatation and that is not quite > obvious from the source. > > What is the relationship between: > a) pages and their buffers associated with the device (typically > bh->bdev->bd_inode and its mapping) and > > b) pages and their buffers associated with files on that device. > > Can anyone tell me what the relationship exactly is and what one has > to be aware of when manipulating either of these? My conclusion from reading the source is that after mapping a file buffer (buffer belonging to a page that is a part of a file on a device) to a particular block on a device, one should call unmap_underlying_metadata to make sure any writing using a device buffer will not overwrite the file. And that one must not use device buffers to write to places which have been mapped to files. Is that correct? TIA Martin