* [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()
@ 2020-08-07 14:01 brookxu
2020-08-12 19:36 ` Andreas Dilger
2020-08-13 14:04 ` Ritesh Harjani
0 siblings, 2 replies; 5+ messages in thread
From: brookxu @ 2020-08-07 14:01 UTC (permalink / raw)
To: adilger.kernel, tytso, linux-ext4
Fix log printing of ext4_mb_regular_allocator(),it may be an
unintentional behavior.
Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
fs/ext4/mballoc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 5d4a1be..b0da525 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2324,15 +2324,14 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
* We've been searching too long. Let's try to allocate
* the best chunk we've found so far
*/
-
ext4_mb_try_best_found(ac, &e4b);
if (ac->ac_status != AC_STATUS_FOUND) {
/*
* Someone more lucky has already allocated it.
* The only thing we can do is just take first
* found block(s)
- printk(KERN_DEBUG "EXT4-fs: someone won our chunk\n");
*/
+ mb_debug(sb, "EXT4-fs: someone won our chunk\n");
ac->ac_b_ex.fe_group = 0;
ac->ac_b_ex.fe_start = 0;
ac->ac_b_ex.fe_len = 0;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()
2020-08-07 14:01 [PATCH] ext4: fix log printing of ext4_mb_regular_allocator() brookxu
@ 2020-08-12 19:36 ` Andreas Dilger
2020-08-14 1:14 ` brookxu
2020-08-13 14:04 ` Ritesh Harjani
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2020-08-12 19:36 UTC (permalink / raw)
To: brookxu; +Cc: Theodore Ts'o, Ext4 Developers List
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
On Aug 7, 2020, at 8:01 AM, brookxu <brookxu.cn@gmail.com> wrote:
>
> Fix log printing of ext4_mb_regular_allocator(),it may be an
> unintentional behavior.
>
> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
The debug message would probably be more useful if it included some
actual information (PID, status, fe_group, fe_start, fe_len), but
that isn't necessarily a problem with this patch itself.
Reviewed-by: Andreas Dilger <adilger@diger.ca>
> ---
> fs/ext4/mballoc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 5d4a1be..b0da525 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2324,15 +2324,14 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
> * We've been searching too long. Let's try to allocate
> * the best chunk we've found so far
> */
> -
> ext4_mb_try_best_found(ac, &e4b);
> if (ac->ac_status != AC_STATUS_FOUND) {
> /*
> * Someone more lucky has already allocated it.
> * The only thing we can do is just take first
> * found block(s)
> - printk(KERN_DEBUG "EXT4-fs: someone won our chunk\n");
> */
> + mb_debug(sb, "EXT4-fs: someone won our chunk\n");
> ac->ac_b_ex.fe_group = 0;
> ac->ac_b_ex.fe_start = 0;
> ac->ac_b_ex.fe_len = 0;
> --
> 1.8.3.1
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()
2020-08-07 14:01 [PATCH] ext4: fix log printing of ext4_mb_regular_allocator() brookxu
2020-08-12 19:36 ` Andreas Dilger
@ 2020-08-13 14:04 ` Ritesh Harjani
2020-08-14 1:16 ` brookxu
1 sibling, 1 reply; 5+ messages in thread
From: Ritesh Harjani @ 2020-08-13 14:04 UTC (permalink / raw)
To: brookxu, adilger.kernel, tytso, linux-ext4
On 8/7/20 7:31 PM, brookxu wrote:
> Fix log printing of ext4_mb_regular_allocator(),it may be an
> unintentional behavior.
>
> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
> ---
> fs/ext4/mballoc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 5d4a1be..b0da525 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2324,15 +2324,14 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
> * We've been searching too long. Let's try to allocate
> * the best chunk we've found so far
> */
> -
> ext4_mb_try_best_found(ac, &e4b);
> if (ac->ac_status != AC_STATUS_FOUND) {
> /*
> * Someone more lucky has already allocated it.
> * The only thing we can do is just take first
> * found block(s)
> - printk(KERN_DEBUG "EXT4-fs: someone won our chunk\n");
> */
> + mb_debug(sb, "EXT4-fs: someone won our chunk\n");
mb_debug() already adds "EXT4-fs" string. So we need not add that here.
but maybe we can add "sbi->s_mb_lost_chunks" in this msg, which may be
helpful debug msg if too many lost chunks.
> ac->ac_b_ex.fe_group = 0;
> ac->ac_b_ex.fe_start = 0;
> ac->ac_b_ex.fe_len = 0;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()
2020-08-12 19:36 ` Andreas Dilger
@ 2020-08-14 1:14 ` brookxu
0 siblings, 0 replies; 5+ messages in thread
From: brookxu @ 2020-08-14 1:14 UTC (permalink / raw)
To: Andreas Dilger; +Cc: Theodore Ts'o, Ext4 Developers List
This suggestion is good, I try to update it in the next version.
thanks.
Andreas Dilger wrote on 2020/8/13 3:36:
> On Aug 7, 2020, at 8:01 AM, brookxu <brookxu.cn@gmail.com> wrote:
>>
>> Fix log printing of ext4_mb_regular_allocator(),it may be an
>> unintentional behavior.
>>
>> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
>
> The debug message would probably be more useful if it included some
> actual information (PID, status, fe_group, fe_start, fe_len), but
> that isn't necessarily a problem with this patch itself.
>
> Reviewed-by: Andreas Dilger <adilger@diger.ca>
>
>
>> ---
>> fs/ext4/mballoc.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 5d4a1be..b0da525 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -2324,15 +2324,14 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
>> * We've been searching too long. Let's try to allocate
>> * the best chunk we've found so far
>> */
>> -
>> ext4_mb_try_best_found(ac, &e4b);
>> if (ac->ac_status != AC_STATUS_FOUND) {
>> /*
>> * Someone more lucky has already allocated it.
>> * The only thing we can do is just take first
>> * found block(s)
>> - printk(KERN_DEBUG "EXT4-fs: someone won our chunk\n");
>> */
>> + mb_debug(sb, "EXT4-fs: someone won our chunk\n");
>> ac->ac_b_ex.fe_group = 0;
>> ac->ac_b_ex.fe_start = 0;
>> ac->ac_b_ex.fe_len = 0;
>> --
>> 1.8.3.1
>
>
> Cheers, Andreas
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()
2020-08-13 14:04 ` Ritesh Harjani
@ 2020-08-14 1:16 ` brookxu
0 siblings, 0 replies; 5+ messages in thread
From: brookxu @ 2020-08-14 1:16 UTC (permalink / raw)
To: Ritesh Harjani, adilger.kernel, tytso, linux-ext4
This maybe a problem, I try to update it in the next version, thank you.
Ritesh Harjani wrote on 2020/8/13 22:04:
>
>
> On 8/7/20 7:31 PM, brookxu wrote:
>> Fix log printing of ext4_mb_regular_allocator(),it may be an
>> unintentional behavior.
>>
>> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
>> ---
>> fs/ext4/mballoc.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 5d4a1be..b0da525 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -2324,15 +2324,14 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
>> * We've been searching too long. Let's try to allocate
>> * the best chunk we've found so far
>> */
>> -
>> ext4_mb_try_best_found(ac, &e4b);
>> if (ac->ac_status != AC_STATUS_FOUND) {
>> /*
>> * Someone more lucky has already allocated it.
>> * The only thing we can do is just take first
>> * found block(s)
>> - printk(KERN_DEBUG "EXT4-fs: someone won our chunk\n");
>> */
>> + mb_debug(sb, "EXT4-fs: someone won our chunk\n");
>
> mb_debug() already adds "EXT4-fs" string. So we need not add that here.
> but maybe we can add "sbi->s_mb_lost_chunks" in this msg, which may be
> helpful debug msg if too many lost chunks.
>
>
>> ac->ac_b_ex.fe_group = 0;
>> ac->ac_b_ex.fe_start = 0;
>> ac->ac_b_ex.fe_len = 0;
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-14 1:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 14:01 [PATCH] ext4: fix log printing of ext4_mb_regular_allocator() brookxu
2020-08-12 19:36 ` Andreas Dilger
2020-08-14 1:14 ` brookxu
2020-08-13 14:04 ` Ritesh Harjani
2020-08-14 1:16 ` brookxu
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).