From patchwork Mon Apr 10 15:54:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9673041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F004600CB for ; Mon, 10 Apr 2017 15:56:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E13028179 for ; Mon, 10 Apr 2017 15:56:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42C072845C; Mon, 10 Apr 2017 15:56:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21E6928179 for ; Mon, 10 Apr 2017 15:56:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754399AbdDJP4R (ORCPT ); Mon, 10 Apr 2017 11:56:17 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:51948 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753358AbdDJP4P (ORCPT ); Mon, 10 Apr 2017 11:56:15 -0400 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.20/8.16.0.20) with SMTP id v3AFpQ6k013800; Mon, 10 Apr 2017 08:56:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=0akh/RQkaFl6o7d0lZ+56v/+2Hc5ZR2B1MTgyYLXnT8=; b=YToV//oB4WW55lIcn0PlzAkLss9UMfKlcI9k76psIZhaj8EIM8rdYU1DtormU1C/Bp13 Wp6gjU9zT1E7NC+V+Ag464mhVUUlKkDyHNXTYZo+L4+/uiLo+BEWyaZ7jJbjzAFVH8A2 w2irNdaoHCi51wDqfc+JSGQn1tjCllUmFnA= Received: from mail.thefacebook.com ([199.201.64.23]) by m0001303.ppops.net with ESMTP id 29puhgp8ye-2 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 10 Apr 2017 08:56:12 -0700 Received: from localhost.localdomain (192.168.54.13) by mail.thefacebook.com (192.168.16.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 10 Apr 2017 08:54:59 -0700 From: Jens Axboe To: CC: , , , Jens Axboe Subject: [PATCH 2/3] block: add kblock_mod_delayed_work_on() Date: Mon, 10 Apr 2017 09:54:55 -0600 Message-ID: <1491839696-24783-3-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491839696-24783-1-git-send-email-axboe@fb.com> References: <1491839696-24783-1-git-send-email-axboe@fb.com> MIME-Version: 1.0 X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-10_12:, , signatures=0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This modifies (or adds, if not currently pending) an existing delayed work item. Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- 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 /*