From patchwork Wed Feb 21 08:03:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Holmberg X-Patchwork-Id: 10231425 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 0981860209 for ; Wed, 21 Feb 2018 08:06:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1CAB289A6 for ; Wed, 21 Feb 2018 08:06:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6C1F28A69; Wed, 21 Feb 2018 08:06:37 +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 A8CCD289A6 for ; Wed, 21 Feb 2018 08:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751535AbeBUIGX (ORCPT ); Wed, 21 Feb 2018 03:06:23 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43263 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775AbeBUIDz (ORCPT ); Wed, 21 Feb 2018 03:03:55 -0500 Received: by mail-lf0-f65.google.com with SMTP id q69so1063218lfi.10 for ; Wed, 21 Feb 2018 00:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owltronix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sv6gRompqVrdRAbLsOShManUSk2UNHT4WvHc6YUUaec=; b=vKu/5VqiNA+dLFw2qO8dDZAWDnB6bMYVIOrELs+kMjkJDZ9+b4ceSJcCzF3SHll1PS 9Sg1Y7jjFg40xhIn4xf3P/X35dS3a2Bm8zRp6O+g4sOyIlJ1hjCXCEb1b5mT5Sn/0tbK MFqX5Uunz1G/foexPcwACF4LPXNnoa7KnreGbublalrArknvnp73PUCkbe+GFZNMk9/6 Xl+gSiM2x+K0CprZfQfXtY9Gimpqiza3XQUSW/DmPs2CCTljhIsi/Tsb7cdhNpb+JbIr w0D4U9wTL302DrexS0Tt4bS2+39bgv2aLlIEBBgJMdX9HGyTcQtI5JeAXHZRvMD7Qqve 4boQ== 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; bh=sv6gRompqVrdRAbLsOShManUSk2UNHT4WvHc6YUUaec=; b=fB2trRSJP6zGuBXntsyUAhbmdKz/i6xR3PhQQyfP0JEzzc2EODSeubwwdQH1wifeqr ls+kRiPu9I5XaLSFxE3Pq8oa5lyFW4XqXhaW/Bhi0D9vp5yP3WJXzc8cr3xSVl3q1IRL QAwRys9wh8jBdLvPhbkZ01VNCwkgW9s6QKhm5KuGpGYfWjhiqA5oCd4NIubGu/zK/9AU UuOX87SVPAmqtBLn0f1zPOQ27xTyrpzg9zmtVGLCK7gZJDEujzgeIN9gISTaeyFRPhzx evicHeVeoSEOTy7smj/WeSIhAZHGZxrS/Bxl4AUV4qF3SnLczgHi2yDB5Qju1htLqDzC 0dZw== X-Gm-Message-State: APf1xPCkXiAV19wbAnR8X4UXsMW22i2bMm5WJEqQP4KaLik5RO0mGFtW u744aotxb0N8+G6ceCBZ0tskqg== X-Google-Smtp-Source: AH8x226HVvYEYyB+fVt9ifPZQG4c0sPmNS/Yz3i/aC6i9BDEyHwzEHdS81ujaHHaGiNQh3Udk5Hj2Q== X-Received: by 10.46.2.202 with SMTP id y71mr1585498lje.39.1519200234219; Wed, 21 Feb 2018 00:03:54 -0800 (PST) Received: from titan.bredbandsbolaget.se (c-b9b6e655.03-91-6d6c6d4.cust.bredbandsbolaget.se. [85.230.182.185]) by smtp.gmail.com with ESMTPSA id k8sm13417ljk.63.2018.02.21.00.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 00:03:53 -0800 (PST) From: hans.ml.holmberg@owltronix.com To: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg Subject: [PATCH 2/3] lightnvm: pblk: allow allocation of new lines during shutdown Date: Wed, 21 Feb 2018 09:03:00 +0100 Message-Id: <1519200181-10886-3-git-send-email-hans.ml.holmberg@owltronix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519200181-10886-1-git-send-email-hans.ml.holmberg@owltronix.com> References: <1519200181-10886-1-git-send-email-hans.ml.holmberg@owltronix.com> 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 --- 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 22e61cd..8848443 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);