Re: [PATCH] ext4: fix log printing of ext4_mb_regular_allocator()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxxx>
---
  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;




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux