lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Mar 2011 14:36:50 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	Amir Goldstein <amir73il@...il.com>
Cc:	jack@...e.cz, Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH v1] ext3:Fix credits computing for ordered mode.

On Thu, Mar 24, 2011 at 12:49 PM, Amir Goldstein <amir73il@...il.com> wrote:
> On Thu, Mar 24, 2011 at 2:48 AM, Yongqiang Yang <xiaoqiangnk@...il.com> wrote:
>> Orginal computing ignores indirects themselves in ordered mode.
>
> On the worst case, data,ind,dind,tind all allocated from different bg
> and different gdb
> credits should be 2*4+4+2 for journaled and 2*4+3+2 for ordered (with
> 4K block: bpp = 1, indirects = 3)
yes, on worst case, it should be
2*(bpp + indirects)[metadata:bitmap and gdb] +
indirects[metadata:themselves] + bpp[data] +  2[metadata:inode +
super] for journal mode
= 3 * (bpp + indirects) + 2

while it should be
2*(bpp + indirects)[metadata:bitmap and gdb] +
indirects[metadata:themselves] + 2[metadata:inode + super] for ordered
mode.
=2 * (bpp + indirects) + indirects + 2

>
> Acked-by: Amir Goldstein <amir73il@...rs.sf.net>
>
>>
>> Signed-off-by:Yongqiang Yang <xiaoqiangnk@...il.com>
>> ---
>>  fs/ext3/inode.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
>> index ae94f6d..7f5db46 100644
>> --- a/fs/ext3/inode.c
>> +++ b/fs/ext3/inode.c
>> @@ -3294,7 +3294,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode)
>>        if (ext3_should_journal_data(inode))
>>                ret = 3 * (bpp + indirects) + 2;
>>        else
>> -               ret = 2 * (bpp + indirects) + 2;
>> +               ret = 2 * (bpp + indirects) + indirects + 2;
>>
>>  #ifdef CONFIG_QUOTA
>>        /* We know that structure was already allocated during dquot_initialize so
>> --
>> 1.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>



-- 
Best Wishes
Yongqiang Yang
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ