Re: a question about quota credits ...

Jan Kara <[email protected]>
Newsgroups gmane.comp.file-systems.ext2.devel
Message-ID <[email protected]>
> Good day,
> 
> in include/linux/ext3_jbd.h:
> 
> /* Define the number of blocks we need to account to a transaction to
>  * modify one block of data.
>  * 
>  * We may have to touch one inode, one bitmap buffer, up to three
>  * indirection blocks, the group and superblock summaries, and the data
>  * block to complete the transaction.  */
> 
> #define EXT3_SINGLEDATA_TRANS_BLOCKS	8U
> 
> 
> who does take a care about allocation those indirect blocks?
> 
> shouldn't it be like this:
> 
>    inode                 - 1
> +  3 indirect blocks     - 3 * 4 (bitmap + group + sb + block itself)
> +  data block            - 4 (bitmap + group + sb + block itself)
> = 17
  Umm, you are right we may end up using more blocks as far as I can see.
You can reduce your estimate by counting 'sb' just once so you get to
14 blocks but it's still more than 8. I guess we originally assumed that
indirect blocks are allocated in the same group as the data block. That
is mostly the case but not necessarily...

								Honza
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.