public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
	tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz,
	ojaswin@linux.ibm.com
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	shikemeng@huaweicloud.com
Subject: Re: [PATCH v2 00/20] Some bugfix and cleanup to mballoc
Date: Tue, 28 Feb 2023 22:04:35 +0530	[thread overview]
Message-ID: <87356pwxyc.fsf@doe.com> (raw)
In-Reply-To: <20230228114306.3328235-1-shikemeng@huaweicloud.com>

Kemeng Shi <shikemeng@huaweicloud.com> writes:

> Hi, this series contain some random cleanup patches and some bugfix
> patches to make EXT4_MB_HINT_GOAL_ONLY work properly, protect pa->pa_free
> from race and so on. More details can be found in git log.
> Thanks!

Hi Kemeng,

Did you run any testing on these patches? Because I was very easily able
to hit ext/009 causing kernel BUG_ON with default mkfs/mount options.
It's always a good and recommended practice to ensure some level of
testing on any of the patches we submit to community for review
and call out in the cover letter on what has been tested and what is not.

<Call stack>

[  208.545365] run fstests ext4/009 at 2023-02-28 21:44:06
[  216.581660] EXT4-fs (loop7): mounted filesystem 33805b33-04c1-48c3-8de3-9c78f99a7598 with ordered data mode..
[  216.709050] EXT4-fs (loop7): unmounting filesystem 33805b33-04c1-48c3-8de3-9c78f99a7598.
[  218.878042] EXT4-fs (loop7): mounted filesystem 8a919af6-f8f4-4ef4-949b-673ccd9ae8c7 with ordered data mode..
[  255.517357] ------------[ cut here ]------------
[  255.520274] kernel BUG at fs/ext4/ext4.h:3331!
[  255.522233] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN PTI
[  255.524740] CPU: 7 PID: 2567 Comm: xfs_io Not tainted 6.2.0-rc8-xfstests-00041-gb1b4634ed055 #21
[  255.527807] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.4
[  255.531645] RIP: 0010:ext4_get_group_info+0x272/0x2f0
[  255.533682] Code: 0f 85 a9 fe ff ff 48 c7 c2 c0 9b 7d 84 be fd 02 00 00 48 c7 c7 c0 95 7d 84 c6 05 9e b4 3b 8
[  255.539798] RSP: 0018:ffff8881fcd6f6b0 EFLAGS: 00010246
[  255.541721] RAX: 0000000000000000 RBX: ffff8881bfc54000 RCX: ffffffff81ec3d1a
[  255.544181] RDX: 1ffff11040b8a208 RSI: 0000000000000050 RDI: ffff888205c51040
[  255.546695] RBP: ffff888205c51000 R08: 0000000000000000 R09: ffff8881bfc54000
[  255.549151] R10: ffffed102af9756b R11: ffff8881fcd6f5b4 R12: ffff8881fcd6f8a8
[  255.551588] R13: ffff8881bfc546e8 R14: ffff888157c189b8 R15: ffff888157c189e0
[  255.554039] FS:  00007ffff7e58840(0000) GS:ffff8883ecc00000(0000) knlGS:0000000000000000
[  255.556788] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  255.558806] CR2: 00007ffff7a7bd58 CR3: 0000000181db4005 CR4: 0000000000170ee0
[  255.561259] Call Trace:
[  255.562248]  <TASK>
[  255.563164]  ? kasan_set_track+0x25/0x30
[  255.564710]  ext4_mb_find_by_goal+0xf1/0xda0
[  255.566317]  ? ext4_alloc_file_blocks.isra.0+0x2a7/0x9a0
[  255.568230]  ? ext4_fallocate+0x28b/0x7d0
[  255.569727]  ? vfs_fallocate+0x2b0/0xb90
[  255.571238]  ? __x64_sys_fallocate+0xb9/0x110
[  255.572852]  ? do_syscall_64+0x3f/0x90
[  255.574372]  ? __pfx_ext4_mb_find_by_goal+0x10/0x10
[  255.576131]  ? set_track_prepare+0x40/0x70
[  255.577677]  ? kmem_cache_alloc+0x388/0x440
[  255.579207]  ext4_mb_regular_allocator+0x1f7/0x1970
[  255.580981]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  255.582874]  ? ___slab_alloc+0xc93/0xd40
[  255.584329]  ? ext4_mb_new_blocks+0xc8f/0x15c0
[  255.585976]  ? __pfx___lock_release+0x10/0x10
[  255.587652]  ? __pfx_ext4_mb_regular_allocator+0x10/0x10
[  255.589554]  ? rcu_read_lock_sched_held+0x47/0x80
[  255.591293]  ? trace_kmem_cache_alloc+0x2d/0xe0
[  255.592997]  ? kmem_cache_alloc+0x25a/0x440
[  255.594552]  ? ext4_mb_new_blocks+0xc8f/0x15c0
[  255.596176]  ext4_mb_new_blocks+0xd3b/0x15c0
[  255.597767]  ? ext4_find_extent+0x742/0xbf0
[  255.599301]  ? __pfx_ext4_mb_new_blocks+0x10/0x10
[  255.601021]  ? lock_is_held_type+0xda/0x130
[  255.602601]  ext4_ext_map_blocks+0x151a/0x2490
[  255.604237]  ? __pfx_ext4_ext_map_blocks+0x10/0x10
[  255.605980]  ? __pfx___lock_acquired+0x10/0x10
[  255.607648]  ? lock_is_held_type+0xda/0x130
[  255.609199]  ? ext4_map_blocks+0x6c9/0x1670
[  255.610757]  ? ext4_map_blocks+0x6c9/0x1670
[  255.612289]  ? lock_acquired+0x10d/0x2b0
[  255.613759]  ? rcu_read_lock_sched_held+0x47/0x80
[  255.615467]  ? ext4_es_lookup_extent+0x43e/0xa20
[  255.617152]  ext4_map_blocks+0x724/0x1670
[  255.618655]  ? lock_is_held_type+0xda/0x130
[  255.620179]  ? __pfx_ext4_map_blocks+0x10/0x10
[  255.621813]  ? rcu_read_lock_sched_held+0x47/0x80
[  255.623512]  ? jbd2__journal_start+0x4ef/0x780
[  255.625191]  ext4_alloc_file_blocks.isra.0+0x2a7/0x9a0
[  255.627019]  ? __pfx_ext4_alloc_file_blocks.isra.0+0x10/0x10
[  255.629034]  ? __pfx_file_modified_flags+0x10/0x10
[  255.630797]  ? lock_is_held_type+0xda/0x130
[  255.632320]  ext4_fallocate+0x28b/0x7d0
[  255.633855]  vfs_fallocate+0x2b0/0xb90
[  255.635252]  __x64_sys_fallocate+0xb9/0x110
[  255.636789]  do_syscall_64+0x3f/0x90
[  255.638135]  entry_SYSCALL_64_after_hwframe+0x72/0xdc


-ritesh

  parent reply	other threads:[~2023-02-28 16:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 11:42 [PATCH v2 00/20] Some bugfix and cleanup to mballoc Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 01/20] ext4: set goal start correctly in ext4_mb_normalize_request Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 02/20] ext4: allow to find by goal if EXT4_MB_HINT_GOAL_ONLY is set Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 03/20] ext4: get correct ext4_group_info in ext4_mb_prefetch_fini Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 04/20] ext4: correct calculation of s_mb_preallocated Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 05/20] ext4: correct start of used group pa for debug in ext4_mb_use_group_pa Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 06/20] ext4: protect pa->pa_free in ext4_discard_allocated_blocks Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 07/20] ext4: add missed brelse in ext4_free_blocks_simple Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 08/20] ext4: remove unused return value of ext4_mb_try_best_found and ext4_mb_free_metadata Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 09/20] ext4: Remove unnecessary release when memory allocation failed in ext4_mb_init_cache Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 10/20] ext4: remove unnecessary e4b->bd_buddy_page check in ext4_mb_load_buddy_gfp Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 11/20] ext4: remove unnecessary check in ext4_mb_new_blocks Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 12/20] ext4: remove dead check in mb_buddy_mark_free Kemeng Shi
2023-02-28 11:42 ` [PATCH v2 13/20] ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 14/20] ext4: use best found when complex scan of group finishs Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 15/20] ext4: remove unnecessary exit_meta_group_info tag Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 16/20] ext4: remove unnecessary count2 in ext4_free_data_in_buddy Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 17/20] ext4: remove unnecessary goto in ext4_mb_mark_diskspace_used Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 18/20] ext4: remove repeat assignment to ac_f_ex Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 19/20] ext4: remove comment code ext4_discard_preallocations Kemeng Shi
2023-02-28 11:43 ` [PATCH v2 20/20] ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple Kemeng Shi
2023-02-28 16:34 ` Ritesh Harjani [this message]
2023-02-28 22:30   ` [PATCH v2 00/20] Some bugfix and cleanup to mballoc Theodore Ts'o
2023-03-01  1:28     ` Kemeng Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87356pwxyc.fsf@doe.com \
    --to=ritesh.list@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox