2020-05-14 09:00:43

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the block tree

Hi all,

After merging the block tree, today's linux-next build (x86_64
allnoconfig) failed like this:

In file included from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/blkdev.h: In function 'blk_io_schedule':
include/linux/blkdev.h:1857:26: error: 'sysctl_hung_task_timeout_secs' undeclared (first use in this function)
1857 | unsigned long timeout = sysctl_hung_task_timeout_secs * HZ / 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

e6249cdd46e4 ("block: add blk_io_schedule() for avoiding task hung in sync dio")

linux/sched/sysctl.h was not included since CONFIG_BLOCK is not defined.
I have applied the following patch for today.

From: Stephen Rothwell <[email protected]>
Date: Thu, 14 May 2020 18:48:32 +1000
Subject: [PATCH] fix for "block: add blk_io_schedule() for avoiding task hung in sync dio"

Signed-off-by: Stephen Rothwell <[email protected]>
---
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.26.2

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-05-14 14:09:18

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 5/14/20 2:57 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the block tree, today's linux-next build (x86_64
> allnoconfig) failed like this:
>
> In file included from include/linux/blk-cgroup.h:23,
> from include/linux/writeback.h:14,
> from include/linux/memcontrol.h:22,
> from include/linux/swap.h:9,
> from include/linux/suspend.h:5,
> from arch/x86/kernel/asm-offsets.c:13:
> include/linux/blkdev.h: In function 'blk_io_schedule':
> include/linux/blkdev.h:1857:26: error: 'sysctl_hung_task_timeout_secs' undeclared (first use in this function)
> 1857 | unsigned long timeout = sysctl_hung_task_timeout_secs * HZ / 2;
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> e6249cdd46e4 ("block: add blk_io_schedule() for avoiding task hung in sync dio")
>
> linux/sched/sysctl.h was not included since CONFIG_BLOCK is not defined.
> I have applied the following patch for today.

Sorry about that, it's fixed in the current tree.

--
Jens Axboe