From patchwork Fri Oct 13 12:46:28 2017 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: 10004539 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 5AB9460216 for ; Fri, 13 Oct 2017 12:53:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D00D29002 for ; Fri, 13 Oct 2017 12:53:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41DDF2905C; Fri, 13 Oct 2017 12:53: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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM 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 02E0229002 for ; Fri, 13 Oct 2017 12:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932175AbdJMMrt (ORCPT ); Fri, 13 Oct 2017 08:47:49 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:49013 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932069AbdJMMrp (ORCPT ); Fri, 13 Oct 2017 08:47:45 -0400 Received: by mail-wm0-f65.google.com with SMTP id i124so21105798wmf.3 for ; Fri, 13 Oct 2017 05:47:44 -0700 (PDT) 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=/SgKrOeTjgvVArPn0V90WOR3Kh1eJzwPnsQK6/RXDl0=; b=xyY29ZeBBSBqhZ90W+St+KF++uUn1c2IdkojFbVHoiDFQaprOKN2SXcetwZoZ4Z7IH s4ja1Falyr/uLzqD/uY/M2KvQByNv9A8oYvk5A2/YmGoyvXIfQ7TvahDQ8OEK7jxQgEt jajILVK2atYrJev5QFgtPSgnW333Y2QC+Vn+w= 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=/SgKrOeTjgvVArPn0V90WOR3Kh1eJzwPnsQK6/RXDl0=; b=Vrmjs0hAfWEKv4D2ERuDpjV2kjZo61cpoBS7sVw1/K20mdl8qCiAYe7oltXSYV4YYs e+wLEpdcoAR0TgE7hjcf7cNFszAEmsyrxesLWYdioeStni/ChmjlnsHwLVn342AoqSHn y8bj7fEIvhGclAnBtaMeWqmDlwsdy6245BFZ4ydoVXD+YJH6rosyULPyo8fOjH+VtXqz +aDLPFgPB60qEPjn+RQpZ3ZBQuy4IcKaa8g3bhDf+MmNMM6gUZgMs27Iu1N18eHz4RBy dOIbukBKRVadxQDt4zzJ6wZSVDvcdp2AGCqhUHCSy59Lhd5nHop/ZXpGO14nNGrLnAnc GN/Q== X-Gm-Message-State: AMCzsaU3pMmM2384Ecf51cwD8YzIj3bm4DOgKdvNgMMQdbacUfI0n6Ke vBGgH/7eJh98xgX1DxVgzB0H5Uef X-Google-Smtp-Source: AOwi7QDgWZ1kA8FcfAIeZyQHreYxTUE+PPleIpx/cV/ugMXBba2d/FZMT76Scw7ldk6t1XJlnZzdVg== X-Received: by 10.80.201.12 with SMTP id o12mr1983846edh.98.1507898864274; Fri, 13 Oct 2017 05:47:44 -0700 (PDT) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id p91sm735012edp.69.2017.10.13.05.47.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 05:47:43 -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, Rakesh Pandit , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 39/58] lightnvm: pblk: fix changing GC group list for a line Date: Fri, 13 Oct 2017 14:46:28 +0200 Message-Id: <20171013124647.32668-40-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171013124647.32668-1-m@bjorling.me> References: <20171013124647.32668-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: Rakesh Pandit pblk_line_gc_list seems to had a bug since the introduction of pblk in getting GC list for a line. In b20ba1bc7 while redesigning the GC algorithm, the naming for the GC thresholds was altered, but the values for high_thrs and mid_thrs were not. The result is that when moving to the GC lists, the mid threshold is never evaluated. Fixes: a4bd217b4("lightnvm: physical block device (pblk) target") Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index c7239c4..56ece7d 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -678,8 +678,8 @@ static int pblk_lines_init(struct pblk *pblk) lm->blk_bitmap_len = BITS_TO_LONGS(geo->nr_luns) * sizeof(long); lm->sec_bitmap_len = BITS_TO_LONGS(lm->sec_per_line) * sizeof(long); lm->lun_bitmap_len = BITS_TO_LONGS(geo->nr_luns) * sizeof(long); - lm->high_thrs = lm->sec_per_line / 2; - lm->mid_thrs = lm->sec_per_line / 4; + lm->mid_thrs = lm->sec_per_line / 2; + lm->high_thrs = lm->sec_per_line / 4; lm->meta_distance = (geo->nr_luns / 2) * pblk->min_write_pgs; /* Calculate necessary pages for smeta. See comment over struct