[Tux3] Refactor filemap.c

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Tue Dec 16 02:08:25 PST 2008


Daniel Phillips <phillips at phunq.net> writes:

> Questions:
>
>   * Is i_blocks required to be in sectors?  I thought that was just
>     a traditional limitation of Ext2/3.

inode->i_blocks is the number of 512bytes always, even if the hard
sector size is bigger than 512bytes.

It is also used for stat->st_blocks.

>   * If we mark a buffer new, can b_size be more than one block?

Current write is 1 blocksize always, and buffer_new also depends on it.

> Instead of the loop over segs in tux3_get_block, we can just call with
> max_segs = 1.  I don't think there is a case where ->get_block can
> handle more than one extent.

Yes. However, we have 64 blocks limitation for one extent. So, caller
may want to merge those to one extent. If get_segs merged those,
get_block() will use max_segs=1 until it supports delayed write. 

Thanks.
-- 
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list