* [PATCH v1] ext3:Fix credits computing for ordered mode.
@ 2011-03-24 0:48 Yongqiang Yang
2011-03-24 4:49 ` Amir Goldstein
2011-03-24 11:33 ` Jan Kara
0 siblings, 2 replies; 4+ messages in thread
From: Yongqiang Yang @ 2011-03-24 0:48 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, Yongqiang Yang
Orginal computing ignores indirects themselves in ordered mode.
Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1] ext3:Fix credits computing for ordered mode.
2011-03-24 0:48 [PATCH v1] ext3:Fix credits computing for ordered mode Yongqiang Yang
@ 2011-03-24 4:49 ` Amir Goldstein
2011-03-24 6:36 ` Yongqiang Yang
2011-03-24 11:33 ` Jan Kara
1 sibling, 1 reply; 4+ messages in thread
From: Amir Goldstein @ 2011-03-24 4:49 UTC (permalink / raw)
To: Yongqiang Yang; +Cc: jack, Ext4 Developers List
On Thu, Mar 24, 2011 at 2:48 AM, Yongqiang Yang <xiaoqiangnk@gmail.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)
Acked-by: Amir Goldstein <amir73il@users.sf.net>
>
> Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] ext3:Fix credits computing for ordered mode.
2011-03-24 4:49 ` Amir Goldstein
@ 2011-03-24 6:36 ` Yongqiang Yang
0 siblings, 0 replies; 4+ messages in thread
From: Yongqiang Yang @ 2011-03-24 6:36 UTC (permalink / raw)
To: Amir Goldstein; +Cc: jack, Ext4 Developers List
On Thu, Mar 24, 2011 at 12:49 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Thu, Mar 24, 2011 at 2:48 AM, Yongqiang Yang <xiaoqiangnk@gmail.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@users.sf.net>
>
>>
>> Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.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@vger.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] ext3:Fix credits computing for ordered mode.
2011-03-24 0:48 [PATCH v1] ext3:Fix credits computing for ordered mode Yongqiang Yang
2011-03-24 4:49 ` Amir Goldstein
@ 2011-03-24 11:33 ` Jan Kara
1 sibling, 0 replies; 4+ messages in thread
From: Jan Kara @ 2011-03-24 11:33 UTC (permalink / raw)
To: Yongqiang Yang; +Cc: jack, linux-ext4
On Thu 24-03-11 08:48:39, Yongqiang Yang wrote:
> Orginal computing ignores indirects themselves in ordered mode.
Thanks. Merged into my tree.
Honza
>
> Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.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
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-24 11:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 0:48 [PATCH v1] ext3:Fix credits computing for ordered mode Yongqiang Yang
2011-03-24 4:49 ` Amir Goldstein
2011-03-24 6:36 ` Yongqiang Yang
2011-03-24 11:33 ` Jan Kara
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).