linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fragmentation && blocks "realloc"
@ 2006-01-20 11:47 Jan Koss
  2006-01-20 13:34 ` Anton Altaparmakov
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Koss @ 2006-01-20 11:47 UTC (permalink / raw)
  To: kernelnewbies; +Cc: linux-fsdevel

Hello.

Let's suppose that we have file which consist of two blocks
and user resizing file and now we need 4 blocks.

Near this two blocks there are no 2 free blocks,
and instead of allocating 2 additional blocks somewhere,
I want allocate chunk of 4 blocks.

The main problem is choose way of invalidate "old" blocks and copy
data to new buffers,

how it possible on linux?

something like
struct buffer_head *oldbh, *newbh;
memcpy(newbh->b_data, oldbh->b_data);
block_invalidatepage(oldbh->b_this_page,...)

[ block_invalidatepage right choise ? ]

or it is possible just change b_blocknr?

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

end of thread, other threads:[~2006-02-23 21:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-20 11:47 fragmentation && blocks "realloc" Jan Koss
2006-01-20 13:34 ` Anton Altaparmakov
2006-01-20 15:46   ` Jan Koss
2006-01-20 19:22     ` Jan Koss
2006-01-20 20:11       ` Anton Altaparmakov
2006-01-21  9:42         ` Jan Koss
2006-01-21 20:28           ` Anton Altaparmakov
2006-01-22 20:58             ` Jan Koss
2006-01-22 21:32               ` Anton Altaparmakov
2006-01-22 22:05                 ` Jan Koss
2006-01-24 10:37                   ` Anton Altaparmakov
2006-02-23 21:47                     ` Nate Diller
2006-01-20 20:04     ` Anton Altaparmakov

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