* File and device pages and buffers
@ 2005-04-18 0:09 Martin Jambor
2005-04-21 20:16 ` Martin Jambor
0 siblings, 1 reply; 2+ messages in thread
From: Martin Jambor @ 2005-04-18 0:09 UTC (permalink / raw)
To: linux-fsdevel
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 (tybically
bh->bdev->bd_inode and its mapping) and
b) pages and their buffers associated with files on that device.
I am almost certain they are not the same but at the same time the
relationship seems to be quite important, otherwise we wouldn't have
such dark functions as unmap_underlying_metadata (why on earth is it
called this way? - Does metadata mean, in true kernel naming confusion
spirit, device pages/blocks?).
Can anyone tell me what the relationship exactly is and what one has
to be aware of when manipulating either of these?
Thank you very much in advance,
Martin Jambor
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: File and device pages and buffers
2005-04-18 0:09 File and device pages and buffers Martin Jambor
@ 2005-04-21 20:16 ` Martin Jambor
0 siblings, 0 replies; 2+ messages in thread
From: Martin Jambor @ 2005-04-21 20:16 UTC (permalink / raw)
To: linux-fsdevel
Can I try to bring your attention once more to the following issue:
On 4/18/05, Martin Jambor <jamborm@gmail.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-21 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 0:09 File and device pages and buffers Martin Jambor
2005-04-21 20:16 ` Martin Jambor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).