From: Chao Yu <chao@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: chao@kernel.org, jaegeuk@kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] f2fs: fix to check bio after __blkdev_issue_discard()
Date: Fri, 28 Nov 2025 11:34:26 +0800 [thread overview]
Message-ID: <25a50204-73c0-4426-8680-f7f87599ac05@kernel.org> (raw)
In-Reply-To: <aSahEs04brIrBcue@infradead.org>
On 11/26/25 14:41, Christoph Hellwig wrote:
> It can only return blk_alloc_discard_bio if the the gfp_mask doesn't
> allow sleeping (which isn't the case here), or nr_sect is zero,
> which I hope is also not the case as __submit_discard_cmd would
> run into various other problems. So no, I don't think this is
> patch makes any sense.
Oh, I checked details in bio_alloc_bioset() again, it seems I missed
something for mempool_alloc(), as you mentioned, it may only fail due
to caller is in non-sleep context passing gfp w/ GFP_ATOMIC or
GFP_NOWAIT, which is not the case for f2fs discard.
Thanks,
prev parent reply other threads:[~2025-11-28 3:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 6:14 Chao Yu
2025-11-26 6:41 ` Christoph Hellwig
2025-11-28 3:34 ` Chao Yu [this message]
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=25a50204-73c0-4426-8680-f7f87599ac05@kernel.org \
--to=chao@kernel.org \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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®