block: Export __blk_flush_plug to modules
Subsystems (2)
PATCH 1/1 block: Export __blk_flush_plug to modules
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use blk_flush_plug();
2. blk_flush_plug is an inline function and it calls __blk_flush_plug.
--- block/blk-core.c | 1 + 1 file changed, 1 insertion(+)
block/blk-core.c +1 -0
@@ -1230,6 +1230,7 @@ void __blk_flush_plug(struct blk_plug *plug, bool from_schedule) plug->cur_ktime =0 ; current->flags &= ~PF_BLOCK_TS ; } +EXPORT_SYMBOL (__blk_flush_plug);/** * blk_finish_plug - mark the end of a batch of submitted I/O
Signature · 1 line
2.34.1
Quoted 4 lines · LongPing Wei
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use
blk_flush_plug();
2.blk_flush_plugis an inline function and it calls__blk_flush_plug.
Then don't call blk_flush_plug from dm-bufio, as drivers should not micro-manage plug flushing.
Note that at least in current upstream and linux-next dm-bufio does not actually call blk_flush_plug, so I'm not sure where your report comes from.
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · LongPing Wei
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use
blk_flush_plug();
2.blk_flush_plugis an inline function and it calls__blk_flush_plug.
Quoted 7 lines
Then don't call
blk_flush_plugfrom dm-bufio, as drivers should not micro-manage plug flushing.Note that at least in current upstream and linux-next dm-bufio does not actually call
blk_flush_plug, so I'm not sure where your report comes from.
Hi, Christoph
Stephen reported that a compile error happened when he tried merging device-mapper tree.
Quoted 5 lines
Hi all,
After merging the device-mapper tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
Quoted 7 lines
ERROR: modpost: "
__blk_flush_plug" [drivers/md/dm-bufio.ko] undefined!Caused by commit
713ff5c782f5("dm-bufio: improve the performance of__dm_bufio_prefetch")I have used the device-mapper tree from next-20250409 for today.
More details are here.
https://lore.kernel.org/dm-devel/[email protected]/T/#t
Thanks
LongPing
Hi,
Quoted 28 lines · LongPing Wei
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · LongPing Wei
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use
blk_flush_plug();
2.blk_flush_plugis an inline function and it calls__blk_flush_plug.Quoted 7 lines
Then don't call
blk_flush_plugfrom dm-bufio, as drivers should not micro-manage plug flushing.Note that at least in current upstream and linux-next dm-bufio does not actually call
blk_flush_plug, so I'm not sure where your report comes from.Hi, Christoph
Stephen reported that a compile error happened when he tried merging device-mapper tree.
Quoted 9 lines
Hi all,
After merging the device-mapper tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:ERROR: modpost: "
__blk_flush_plug" [drivers/md/dm-bufio.ko] undefined!Caused by commit
Quoted 8 lines
Quoted 3 lines
713ff5c782f5("dm-bufio: improve the performance of__dm_bufio_prefetch")I have used the device-mapper tree from next-20250409 for today.
More details are here.
So, this patch has compile problem, I think it should be removed from dm tree.
BTW, I don't get it from commit message, why you need to flush plug when bio is not contiguous. Other than bio merge, plug is also benefit from batch submitting:
__blk_mq_flush_plug_list
q->mq_ops->queue_rqs(&plug->mq_list)
Thanks,
Kuai
Quoted 11 lines
https://lore.kernel.org/dm-devel/[email protected]/T/#t
Thanks
LongPing
.
Quoted 36 lines · Yu Kuai
Hi,
Quoted 33 lines · LongPing Wei
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · LongPing Wei
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use
blk_flush_plug();
2.blk_flush_plugis an inline function and it calls__blk_flush_plug.Quoted 7 lines
Then don't call
blk_flush_plugfrom dm-bufio, as drivers should not micro-manage plug flushing.Note that at least in current upstream and linux-next dm-bufio does not actually call
blk_flush_plug, so I'm not sure where your report comes from.Hi, Christoph
Stephen reported that a compile error happened when he tried merging device-mapper tree.
Quoted 12 lines
Hi all,
After merging the device-mapper tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:ERROR: modpost: "
__blk_flush_plug" [drivers/md/dm-bufio.ko] undefined!Caused by commit
713ff5c782f5("dm-bufio: improve the performance of__dm_bufio_prefetch")I have used the device-mapper tree from next-20250409 for today.
Quoted 7 lines
Quoted 3 lines
More details are here.
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux- dm.git/commit/?h=for-next&id=713ff5c782f5a497bd0e93ca19607daf5bf34005
So, this patch has compile problem, I think it should be removed from dm tree.
If __blk_flush_plug cannot be exported, this commit need to be removed at first.
Quoted 4 lines
BTW, I don't get it from commit message, why you need to flush plug when bio is not contiguous. Other than bio merge, plug is also benefit from batch submitting:
Quoted 17 lines
__blk_mq_flush_plug_list
q->mq_ops->queue_rqs(&plug->mq_list)Thanks,
KuaiQuoted 10 lines
https://lore.kernel.org/dm-devel/66bf8a8e-0a7d-47b8-9676- [email protected]/T/#t
Thanks
LongPing
.
Previous discussion is here.
https://lore.kernel.org/dm-devel/[email protected]/T/#ma327528c69f6fd62e15febb5c94164c8e10c7c0d
Quoted 10 lines
It seems that
verity_prefetch_iodoesn't work efficiently.dm_bufio_prefetch_with_ioprio
__dm_bufio_prefetchblk_start_plug for loop __bufio_new submit_io cond_resched blk_finish_plug
Quoted 5 lines
If more than one hash blocks need to be prefetched,
cond_reschedwill be called in each loop andblk_finish_plugwill be called at the end.The requests for hash blocks may have not been dispatched when the requests for data blocks have been completed.
The change ("dm-bufio: improve the performance of __dm_bufio_prefetch") wants to decrease the probability of waiting hash blocks in verity_end_io.
Thanks
LongPing
Mikulas Patocka
maintainerQuoted 37 lines · Yu Kuai
Hi,
Quoted 34 lines · LongPing Wei
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · LongPing Wei
Fix the compile error when dm-bufio is built as a module.
1. dm-bufio module use
blk_flush_plug();
2.blk_flush_plugis an inline function and it calls__blk_flush_plug.Quoted 7 lines
Then don't call
blk_flush_plugfrom dm-bufio, as drivers should not micro-manage plug flushing.Note that at least in current upstream and linux-next dm-bufio does not actually call
blk_flush_plug, so I'm not sure where your report comes from.Hi, Christoph
Stephen reported that a compile error happened when he tried merging device-mapper tree.
Quoted 13 lines
Hi all,
After merging the device-mapper tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:ERROR: modpost: "
__blk_flush_plug" [drivers/md/dm-bufio.ko] undefined!Caused by commit
713ff5c782f5("dm-bufio: improve the performance of__dm_bufio_prefetch")I have used the device-mapper tree from next-20250409 for today.
Quoted 6 lines
Quoted 3 lines
More details are here.
So, this patch has compile problem, I think it should be removed from dm tree.
OK, I've just removed it.
Mikulas
Quoted 21 lines
BTW, I don't get it from commit message, why you need to flush plug when bio is not contiguous. Other than bio merge, plug is also benefit from batch submitting:
__blk_mq_flush_plug_list
q->mq_ops->queue_rqs(&plug->mq_list)Thanks,
KuaiQuoted 10 lines
https://lore.kernel.org/dm-devel/[email protected]/T/#t
Thanks
LongPing
.