Re: [RFC PATCH v1 05/17] block: add bio_alloc_atomic() for atomic bio users
"yu kuai" <[email protected]> Thu, 9 Jul 2026 17:49:47 +0800
| Newsgroups | dev.linux.lists.dm-devel,org.infradead.lists.linux-nvme,org.kernel.vger.cgroups,org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
Hi, 在 2026/7/9 14:12, Christoph Hellwig 写道: > On Sun, Jul 05, 2026 at 03:51:12AM +0800, Yu Kuai wrote: >> From: Yu Kuai <[email protected]> >> >> Add bio_alloc_atomic() for callers that need a GFP_ATOMIC bio from the >> default bio set but cannot safely pass a bdev during allocation. The >> helper returns an unattached bio, leaving callers to set bi_bdev and >> attach blkcg state explicitly before submission. >> >> Use the helper for virtio-pmem flush child bios and OCFS2 heartbeat I/O. >> Both allocate bios from atomic paths and must avoid creating missing blkgs >> once blkg creation is protected by q->blkcg_mutex. virtio-pmem clones the >> parent bio's blkg association; OCFS2 binds heartbeat I/O to the root blkg. > Let's kill off the concept of atomic bio allocations instead. > Joseph already has an outstanding patch for nd_virtio that needs a little > bit more work, and ocfs2 should be easy enough as well. Thanks for the notice and good to hear that. This will make this set much simpler. > -- Thanks, Kuai