linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Lazy block allocation and block_prepare_write?
@ 2005-04-18  0:54 Martin Jambor
  2005-04-19  3:01 ` Badari Pulavarty
  0 siblings, 1 reply; 17+ messages in thread
From: Martin Jambor @ 2005-04-18  0:54 UTC (permalink / raw)
  To: linux-fsdevel

Hi all,

I am a member of a group that implements a filesystem that allocates
disk blocks to in-memory blocks lazily, that means, the decision is
made just before the data are actually sent to disk. Moreover, when
cached pages are modified, the data can be (and almost certainly will
be) written to a different place to from where it was read.

I was wondering, whether we could use the generic function
block_prepare_write at all. The function checks every buffer of the
page and if it is not mapped, it calls a fs supplied function that is
supposed to map the buffer, i.e. assign it a block on the device and
set its mapped flag.

This is where we would like to give an error if there is not enough
free disk space left but we cannot give a specific device block number
yet. Can we make one up, such as -1? What would that do to such dark
functions as unmap_underlying_metadata or any other? Would some other
part of kernel break if there was a bunch of buffers assigned to the
same spot on the disk?

On the other hand, if I understand buffer flags correctly, I need to
be able to emulate mapping of buffers to set them dirty, or em I
wrong?

Thanks for any insight or thoughts,

Martin Jambor

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-04-20 15:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18  0:54 Lazy block allocation and block_prepare_write? Martin Jambor
2005-04-19  3:01 ` Badari Pulavarty
2005-04-19 10:10   ` Alex Tomas
2005-04-19 14:48     ` Badari Pulavarty
2005-04-19 15:04       ` Alex Tomas
2005-04-19 15:00         ` Badari Pulavarty
2005-04-19 15:20           ` Alex Tomas
2005-04-19 11:22   ` Nikita Danilov
2005-04-19 14:46     ` Badari Pulavarty
2005-04-19 15:55       ` Nikita Danilov
2005-04-19 16:06         ` Alex Tomas
2005-04-19 16:59           ` Badari Pulavarty
2005-04-19 17:08         ` Mingming Cao
2005-04-19 18:45           ` Nikita Danilov
2005-04-20  0:00     ` Bryan Henderson
2005-04-19 20:41   ` Martin Jambor
2005-04-20 14:52     ` Badari Pulavarty

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).