block: add kblockd_schedule_delayed_work_on()
authorJens Axboe <axboe@fb.com>
Tue, 8 Apr 2014 15:17:40 +0000 (09:17 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 9 Apr 2014 16:17:03 +0000 (10:17 -0600)
Same function as kblockd_schedule_delayed_work(), but allow the
caller to pass in a CPU that the work should be executed on. This
just directly extends and maps into the workqueue API, and will
be used to make the blk-mq mappings more strict.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
include/linux/blkdev.h

index f7d2c3335dfab4aa6975371372aacbaf110a4f17..7af4a4898dcb31c38b16ed8c8ceec1ff28166cbd 100644 (file)
@@ -2917,6 +2917,13 @@ int kblockd_schedule_delayed_work(struct delayed_work *dwork,
 }
 EXPORT_SYMBOL(kblockd_schedule_delayed_work);
 
+int kblockd_schedule_delayed_work_on(int cpu, struct delayed_work *dwork,
+                                    unsigned long delay)
+{
+       return queue_delayed_work_on(cpu, kblockd_workqueue, dwork, delay);
+}
+EXPORT_SYMBOL(kblockd_schedule_delayed_work_on);
+
 #define PLUG_MAGIC     0x91827364
 
 /**
index 2425945d36abbec5350346640a8a6870cb7ccaa2..5a31307c5ded7d6f5d878b75a917226dc0f287d9 100644 (file)
@@ -1361,6 +1361,7 @@ static inline void put_dev_sector(Sector p)
 struct work_struct;
 int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
+int kblockd_schedule_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
 
 #ifdef CONFIG_BLK_CGROUP
 /*