From: Deepanshu Kartikey <kartikey406@gmail.com>
To: adilger.kernel@dilger.ca
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: fix allocation failure in ext4_mb_load_buddy_gfp
Date: Sat, 27 Sep 2025 05:48:15 +0530 [thread overview]
Message-ID: <20250927001815.16635-1-kartikey406@gmail.com> (raw)
Hi Andreas,
Thank you for the detailed analysis of the tradeoffs.
Looking at the syzbot report (https://syzkaller.appspot.com/bug?extid=fd3f70a4509fca8c265d),
this WARNING appears 4 times, so while not frequent, it's a real issue that occurs
under memory pressure conditions.
Your -EAGAIN suggestion makes sense. The approach would be:
1. During memory reclaim, use GFP_NOFS without __GFP_NOFAIL
2. If allocation fails, return -EAGAIN to let reclaim skip this inode
3. Preallocation cleanup happens later when memory is available
I understand this requires modifying the function signature and updating all call
sites. I'm willing to do this work and properly test each caller's error handling.
Questions on implementation:
- Should callers like ext4_clear_inode() ignore -EAGAIN (leave cleanup for later)?
- Should callers like ext4_truncate() retry or also defer?
- For the unused "int needed" parameter you mentioned - should I remove it in the
same patch or separately?
I'd like to implement this fix properly rather than leaving the WARNING unaddressed.
Could you provide guidance on the preferred error handling for the different caller
contexts?
Best regards,
Deepanshu
next reply other threads:[~2025-09-27 0:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 0:18 Deepanshu Kartikey [this message]
2025-09-27 3:01 ` Theodore Ts'o
-- strict thread matches above, loose matches on Subject: below --
2025-09-27 0:19 Deepanshu Kartikey
2025-09-25 2:06 Deepanshu Kartikey
2025-09-26 19:17 ` Andreas Dilger
2025-09-24 1:16 Deepanshu Kartikey
2025-09-24 23:33 ` Andreas Dilger
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=20250927001815.16635-1-kartikey406@gmail.com \
--to=kartikey406@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®