Received: by 10.223.185.116 with SMTP id b49csp607735wrg; Wed, 21 Feb 2018 04:04:24 -0800 (PST) X-Google-Smtp-Source: AH8x227HQjRW/f3FzrfRpCQ/7aWrf4FpSVFfH/D6YCDNZ5g9625Eko1qjdnG2F9Uc1JTPBjyCvaA X-Received: by 2002:a17:902:365:: with SMTP id 92-v6mr2963236pld.127.1519214664442; Wed, 21 Feb 2018 04:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519214664; cv=none; d=google.com; s=arc-20160816; b=VPidOLy2WgY2lzeLC0rBDRK96HkR0rCgo/PyOwR/FICrauAQlMlz8TzUI77pJtKbxq bNhF83ZBoJ46Lhg/et0R4B1OJJOaUKnZJLOlq56e2qvxnxwBzRW7pvhrRagnevpJXquK QFBAO3P3+vU294gUrDc3diyLI/tnyVEOWxY+EqDG434vn/K11nq9bs/uxQRJdO/8ME26 SiLyG59Ze3MFNtI1DgC2whgneSRsOv8AoYiTHSL/sRBErfe+/WSFIkTUQ/UY70grPAd0 2sjgNkNppuymsakc1jCKveO7Az/RWn6XSBlQ3ShH8RROdJJhqrEZtKaBc64UR0RCwOoF nYkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sv6gRompqVrdRAbLsOShManUSk2UNHT4WvHc6YUUaec=; b=XUwgiwojlKVS92QiJYgOPUCOimPy5tm4MKXhBO6Dp7ajF7g+jLEPHLxWxQwraIU/bZ AXcPPnd0YcpGQXfk4qrYVu3fH+E3THUdMeDfHkpcbzamZrjwbZgjhspPLGV/+YBES6Zb Tw4Sti7QfFD2mepBH+0vxoBaRqDE1i9LT6VQYFBpCfm26mVPAa8YrxANSq1gJBaBaWA9 BMk9Qxc4gaJXIfmBtxMucPi1bTBV5bQ5H2mbrjRpU3rXBmkHdURZeTbJM4MOmyKDcp00 K9q2zFR+YJu0wkPrSLJe2H5gu9XJzaA3r8Ta7L7S4/o/nXzntfBzJ2fO7TWj5I6mjf1b cASQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=vKu/5Vqi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18si1141393pgu.633.2018.02.21.04.04.09; Wed, 21 Feb 2018 04:04:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=vKu/5Vqi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbeBUIGY (ORCPT + 99 others); Wed, 21 Feb 2018 03:06:24 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39099 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751786AbeBUIDz (ORCPT ); Wed, 21 Feb 2018 03:03:55 -0500 Received: by mail-lf0-f65.google.com with SMTP id h78so1073317lfg.6 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=he0Oc2AGJpG539jJutRQ3JvuswmJh3P3vUqwx4HS6Ug+pLjFkLTI+DHHw0L4KOkgQS +ZQYdJXgoNTxLY0+yTSRYzIz3WhedmNaes3eq6QscRcUkz00Pb3rybbrI1RnnvzbFOj9 mWZNLosDGUEH1rut7eRr0gWdJoo31IHZi9Kg+wvxmKmaxCdMGTn48/BZ3XdLRjpC/uST vQmPreVc6PQPJ8h2F0ubbv5VMLzwT0s2NXCGZGXOe6HlFlzgDJgK9jNpbd7Npy9j6JFj 0F8hz6dS9oXUGmBEjpqlIyNW2sTT6IaULOOzr6sN28I1VF+YyH/A31zbpCRXcj0J/2nf 0Vdg== X-Gm-Message-State: APf1xPDxoK+YuGKu+Uu36MWYvEj/ez3YjxvvnMLTVXPSPRv3QWmQ+8A1 Hqc16VU+g4A/lXbPwUIDBdZi6ZNjieg= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.7.4