From patchwork Fri Jan 5 13:16:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 10146517 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 2C549601A1 for ; Fri, 5 Jan 2018 13:20:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13551206AC for ; Fri, 5 Jan 2018 13:20:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0701C23F88; Fri, 5 Jan 2018 13:20:33 +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=unavailable 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 B8630206AC for ; Fri, 5 Jan 2018 13:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbeAENUE (ORCPT ); Fri, 5 Jan 2018 08:20:04 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39443 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751990AbeAENQ5 (ORCPT ); Fri, 5 Jan 2018 08:16:57 -0500 Received: by mail-wm0-f67.google.com with SMTP id i11so2418827wmf.4 for ; Fri, 05 Jan 2018 05:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Iua44TDYTRmq6ke4f6+OCtpDLJm+C7Nibo1y2QwZ5o=; b=glaJpDQgGrLNzGWPvZV1S9g6+EsrBcNAzRE1/RfkRRLRl7BrGvz6c8iWsGCZZaaM+Q REu9nrN8dLuO9gBx3gUxIDo1vIGDZ/0fuDjTH3DbjTn0O7cJfPiFHiwsnAG8PWf1TkvK eMgmrVJDJhypCAiawKFo+NH6ebmrbBh6NguEI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Iua44TDYTRmq6ke4f6+OCtpDLJm+C7Nibo1y2QwZ5o=; b=bPLa4E47E5lBGoHNOjSF6XHw7kjjW/t885cowW+5zKTVrqDRSr3x6RQ2SH9kxcBVL0 SUPDYMWm2vG9STCKoyfDbPlspwqwzE+KaNex6QBP+1pe3euEzDOAG84QA2cUQbgs4m/W xF1kdZzRzyA57hwBRiADQl+YpCVKrFWNsJ/coMHobzjPHywnDrz0HnQdZYr9m+ql98t3 TuMsKKPvhOjaUMxR14A8vfEfGqgRb6ZEnQWZYuuaJTtu2vS2MspHoibtbjIj+cYcLYJD IFFvYgno6LqeCM27/Y6Bbu5vnJasGk1X8Kb5cN5b/U9ZA1p4Adi9D6RvUkGiinVGZeIB FsvQ== X-Gm-Message-State: AKGB3mLivBqX5z5b/Adz96qLACoUyG7+vsuf5vcoShwwtAAfUS7Px9qY MCr21EjCTGDb2Nfwrv5ZTVNF4g== X-Google-Smtp-Source: ACJfBosxNOgUx4ws67frxTBa72akay8URDjIrjIl5V2rdurHMDcMEd6hvIPH21mawWWKSOdrob4YfA== X-Received: by 10.80.170.200 with SMTP id r8mr4066915edc.230.1515158216216; Fri, 05 Jan 2018 05:16:56 -0800 (PST) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id e46sm4228940edb.93.2018.01.05.05.16.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 05:16:55 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 16/25] lightnvm: pblk: remove pblk_gc_stop Date: Fri, 5 Jan 2018 14:16:12 +0100 Message-Id: <20180105131621.20808-17-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180105131621.20808-1-m@bjorling.me> References: <20180105131621.20808-1-m@bjorling.me> MIME-Version: 1.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 From: Hans Holmberg pblk_gc_stop just sets pblk->gc->gc_active to zero, ignoring the flush parameter. This is plain confusing, so remove the function and set the gc active flag at the call points instead. Signed-off-by: Hans Holmberg Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-gc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c index a270337..278bc02 100644 --- a/drivers/lightnvm/pblk-gc.c +++ b/drivers/lightnvm/pblk-gc.c @@ -526,22 +526,12 @@ void pblk_gc_should_start(struct pblk *pblk) } } -/* - * If flush_wq == 1 then no lock should be held by the caller since - * flush_workqueue can sleep - */ -static void pblk_gc_stop(struct pblk *pblk, int flush_wq) -{ - pblk->gc.gc_active = 0; - pr_debug("pblk: gc stop\n"); -} - void pblk_gc_should_stop(struct pblk *pblk) { struct pblk_gc *gc = &pblk->gc; if (gc->gc_active && !gc->gc_forced) - pblk_gc_stop(pblk, 0); + gc->gc_active = 0; } void pblk_gc_should_kick(struct pblk *pblk) @@ -667,7 +657,7 @@ void pblk_gc_exit(struct pblk *pblk) gc->gc_enabled = 0; del_timer_sync(&gc->gc_timer); - pblk_gc_stop(pblk, 1); + gc->gc_active = 0; if (gc->gc_ts) kthread_stop(gc->gc_ts);