Linux block layer
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@fb.com>
To: <linux-block@vger.kernel.org>
Cc: <osandov@fb.com>, <hch@lst.de>, <bart.vanassche@sandisk.com>,
	Jens Axboe <axboe@fb.com>
Subject: [PATCH 2/3] block: add kblock_mod_delayed_work_on()
Date: Mon, 10 Apr 2017 09:54:55 -0600	[thread overview]
Message-ID: <1491839696-24783-3-git-send-email-axboe@fb.com> (raw)
In-Reply-To: <1491839696-24783-1-git-send-email-axboe@fb.com>

This modifies (or adds, if not currently pending) an existing
delayed work item.

Signed-off-by: Jens Axboe <axboe@fb.com>
---
 block/blk-core.c       | 7 +++++++
 include/linux/blkdev.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/block/blk-core.c b/block/blk-core.c
index d58541e4dc7b..bffb8640346b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -3135,6 +3135,13 @@ int kblockd_schedule_work_on(int cpu, struct work_struct *work)
 }
 EXPORT_SYMBOL(kblockd_schedule_work_on);
 
+int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork,
+				unsigned long delay)
+{
+	return mod_delayed_work_on(cpu, kblockd_workqueue, dwork, delay);
+}
+EXPORT_SYMBOL(kblockd_mod_delayed_work_on);
+
 int kblockd_schedule_delayed_work(struct delayed_work *dwork,
 				  unsigned long delay)
 {
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ec993573e0a8..71b978dedbbc 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1699,6 +1699,7 @@ int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_work_on(int cpu, 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);
+int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
 
 #ifdef CONFIG_BLK_CGROUP
 /*
-- 
2.7.4

  parent reply	other threads:[~2017-04-10 15:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 15:54 [PATCH 0/3] blk-mq: unify hardware queue run handlers Jens Axboe
2017-04-10 15:54 ` [PATCH 1/3] blk-mq: unify hctx delayed_run_work and run_work Jens Axboe
2017-04-10 16:09   ` Christoph Hellwig
2017-04-10 16:17   ` Bart Van Assche
2017-04-11 18:00   ` Bart Van Assche
2017-04-14 20:02     ` Jens Axboe
2017-04-14 20:56       ` Bart Van Assche
2017-04-28  2:12   ` Ming Lei
2017-04-10 15:54 ` Jens Axboe [this message]
2017-04-10 16:10   ` [PATCH 2/3] block: add kblock_mod_delayed_work_on() Christoph Hellwig
2017-04-10 16:17   ` Bart Van Assche
2017-04-10 15:54 ` [PATCH 3/3] blk-mq: unify hctx delay_work and run_work Jens Axboe
2017-04-10 16:21   ` Bart Van Assche
2017-04-10 16:53     ` Jens Axboe
2017-04-10 17:23       ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491839696-24783-3-git-send-email-axboe@fb.com \
    --to=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox