All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: fix build failure in case of !CONFIG_BLOCK
@ 2020-05-14  1:43 Ming Lei
  2020-05-14  6:41 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2020-05-14  1:43 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Ming Lei, Satya Tangirala

Commit e6249cdd46e4 ("block: add blk_io_schedule() for avoiding task hung
in sync dio") adds helper blk_io_schedule, however the required header
is added for CONFIG_BLOCK only.

Fixes the issue by moving the added '#include' out of CONFIG_BLOCK
because blk_io_schedule() doesn't need any CONFIG_BLOCK only stuff.

Fixes: e6249cdd46e4 ("block: add blk_io_schedule() for avoiding task hung in sync dio")
Reported-by: Satya Tangirala <satyat@google.com>
Tested-by: Satya Tangirala <satyat@google.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5360696d85ff..bf99a723673b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -4,6 +4,7 @@
 
 #include <linux/sched.h>
 #include <linux/sched/clock.h>
+#include <linux/sched/sysctl.h>
 
 #ifdef CONFIG_BLOCK
 
@@ -27,7 +28,6 @@
 #include <linux/percpu-refcount.h>
 #include <linux/scatterlist.h>
 #include <linux/blkzoned.h>
-#include <linux/sched/sysctl.h>
 
 struct module;
 struct scsi_ioctl_command;
-- 
2.25.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: fix build failure in case of !CONFIG_BLOCK
  2020-05-14  1:43 [PATCH] block: fix build failure in case of !CONFIG_BLOCK Ming Lei
@ 2020-05-14  6:41 ` Christoph Hellwig
  2020-05-14  8:12   ` Ming Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-05-14  6:41 UTC (permalink / raw)
  To: Ming Lei; +Cc: Jens Axboe, linux-block, Satya Tangirala

Can you please just move the function out of line?  If we context
switch it is by definition to performance critical enough to be an
inline function bloating the callers..

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: fix build failure in case of !CONFIG_BLOCK
  2020-05-14  6:41 ` Christoph Hellwig
@ 2020-05-14  8:12   ` Ming Lei
  0 siblings, 0 replies; 3+ messages in thread
From: Ming Lei @ 2020-05-14  8:12 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jens Axboe, linux-block, Satya Tangirala

On Wed, May 13, 2020 at 11:41:33PM -0700, Christoph Hellwig wrote:
> Can you please just move the function out of line?  If we context
> switch it is by definition to performance critical enough to be an
> inline function bloating the callers..
> 

Looks blk_io_schedule() is only called from CONFG_BLOCK code, so it is
better to export it as one symbol.

Thanks,
Ming


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-14  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  1:43 [PATCH] block: fix build failure in case of !CONFIG_BLOCK Ming Lei
2020-05-14  6:41 ` Christoph Hellwig
2020-05-14  8:12   ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.