From patchwork Thu Mar 29 22:04:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10316585 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 5524160383 for ; Thu, 29 Mar 2018 22:15:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CF082A4B9 for ; Thu, 29 Mar 2018 22:15:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 315F22A536; Thu, 29 Mar 2018 22:15:04 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 E21042A4B9 for ; Thu, 29 Mar 2018 22:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbeC2WOr (ORCPT ); Thu, 29 Mar 2018 18:14:47 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:33164 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbeC2WHH (ORCPT ); Thu, 29 Mar 2018 18:07:07 -0400 Received: by mail-lf0-f66.google.com with SMTP id x70-v6so3501381lfa.0 for ; Thu, 29 Mar 2018 15:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0ZLfscLW6WA4q7AGS2GIY9A/PqA9Q0SMeg1oS5VH0GE=; b=BvM5DllIuvMCK6bW3DgeLdYSaHa9TnsxDEpgMYTUURnetxh1Gl0BiWelqbo0AA1Gbu ErQPn/NefFTQE2xs5djHXwdNDUnHX2nd45CRGnya3daY/QXsfy4nOZsJ1LZEk3aJ2STU sr0CXxwoU5bwpdJPvFXEnJsHRvSMmaa8a6JXlPLYQeWsQ2NKLTfxGBSK9PLV81Hb3ZhY Oh9vBode8QyV4MHNRnJzGnxwgHhWI2vgCHlpFsvpvnmYmGR8QU8yOgy4M6U3GPa4iM7F d2V5/BUhnCCULLYnvs2N8y23OhEW7wdgGxM6CK+IhrYRi7NhoxbdBEMpxT/VFTP85NGb IFVQ== 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=0ZLfscLW6WA4q7AGS2GIY9A/PqA9Q0SMeg1oS5VH0GE=; b=ZMObj7hXhMoKBmTQG0hlYNysOlxFUd6aTGh2RoJ46QXUWyTMe/fiXHoY2wumW6KbUZ 2kGaw6WxUxXC7SgLR75TJkD4Xz70/Z1rVI/NZMQJmMdR38gFiRVzQtzpM+oQkRgml7Xo TYbDXM0lUgzn2PzOumVBUjJPNZtFrRWa14LrZyF4Y2xvfW9zei8A9eFI2UgO8zHy/07h SCx4N24RnFT2/MRHsAjQ0VQBJGf2PqCNKdRHcQp+KI+4XuLXDu8LlxrJNW6nuYkurj/B RFN7zeQd9O1V04R+6KNnJ4KwFg/FcT6luogyCRo+1ymOBiTLVsCghoq04zwzkT7FS9kk RxrA== X-Gm-Message-State: AElRT7FoXgzi2aKgFVc1ImyuJhSM5Z3MRiC4XXuIKkbc9H93GA5XoTBk nUhu/O3RmFLNiHqD1gPXnkJOXQ== X-Google-Smtp-Source: AIpwx4/I6ZVL3+OboOdnBvwCET99c5n6oyik+f1epyqu9jvC0e3ntd904v9+yvLa24ZbH465Qd2WNw== X-Received: by 10.46.136.77 with SMTP id z13mr6304201ljj.126.1522361226601; Thu, 29 Mar 2018 15:07:06 -0700 (PDT) Received: from Macroninja.cnexlabs.com (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.gmail.com with ESMTPSA id i89-v6sm1365508lfk.12.2018.03.29.15.07.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 15:07:05 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, keith.busch@intel.com, javier@cnexlabs.com, Hans Holmberg , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 10/37] lightnvm: pblk: allow allocation of new lines during shutdown Date: Fri, 30 Mar 2018 00:04:57 +0200 Message-Id: <20180329220524.30363-11-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180329220524.30363-1-mb@lightnvm.io> References: <20180329220524.30363-1-mb@lightnvm.io> 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 When shutting down pblk the write buffer is flushed and if the current line can't fit the data in the write buffer we need to allocate a new line, so remove the check that prevents this. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 22e61cd4f801..8848443a0721 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -1407,13 +1407,6 @@ struct pblk_line *pblk_line_replace_data(struct pblk *pblk) l_mg->data_line = new; spin_lock(&l_mg->free_lock); - if (pblk->state != PBLK_STATE_RUNNING) { - l_mg->data_line = NULL; - l_mg->data_next = NULL; - spin_unlock(&l_mg->free_lock); - goto out; - } - pblk_line_setup_metadata(new, l_mg, &pblk->lm); spin_unlock(&l_mg->free_lock);