Received: by 10.192.165.148 with SMTP id m20csp2113319imm; Sat, 28 Apr 2018 12:32:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpdW4FpWVFzsdW+VHR1zo5qwSvuHkIBmjjw+GQtglwcGFixWeAMpAxpaqIa1VpYBCc9G+Mt X-Received: by 2002:a65:4542:: with SMTP id x2-v6mr6076258pgr.24.1524943962773; Sat, 28 Apr 2018 12:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524943962; cv=none; d=google.com; s=arc-20160816; b=RFLb8jy2cXmKSvrPk6Ey6/MEL3Jsl5lPfMycMQ+m4Dsukq4asPyXIZTH1sG+cyQjVf fFjlWWCpiua9izDWn5r6X4A8ieGVatFb75Db+87IOTeLCNDIO/3LgQre5oDj5Mc3yW+5 +EQkjdqHM6T9CWRmvhVNGb0j4iSF0YQaearbMOBH8+SbvR/nXglk/GmHwEfCNsibxK9D ktjWVrXZ5tva0t2BDjJrLsTltNRPclnRusIcTJ97UcI0A/FWUlesU0i93AGARHcErW6S XEoeAJx5HFasrLFHUs2tYlrVOjit6mfE6EhWW4q64g+FHfK4cmd1CPITC8exs15PzWte dteQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=2hs3r+VudIa6gjaYXPrPlp1RqtvpsaSiXjlMmAA33a8=; b=Y59XHcqVT9m8Q4xRjDxaQfL0v3kQL0ylrf7TvTvZAMCkHUDixRHkWfJLPTA0EOCMO+ 6joxndGj0XvcUP0Qcsy/tlHhc6HVh8KyzMM3gcvRMaz5FEJZYk/GrpJiKZr0r20bmRm9 LKVT/sgOgdkPZ0ustwquZC0WfAOclq4xS6Vco0PAUz6z8zSJMGIJrQlhRH6YOP4K7cFG 5/9RCRxqOXK7FZfSR+wLy+MpVUkdAsFkh4prxGfHvWHYFtphmMTRE9PSoH5o8KMY+Df+ n4E0y4NOLZ2gTKXnAIeDvVqo/aybmE9zY6VKrQ1gedllEQfVjrCZVjNRuSOyc56/Nxup kEAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=cRcaGDCw; 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 c129si3372205pfc.367.2018.04.28.12.32.26; Sat, 28 Apr 2018 12:32:42 -0700 (PDT) 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=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=cRcaGDCw; 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 S1751475AbeD1TbO (ORCPT + 99 others); Sat, 28 Apr 2018 15:31:14 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39808 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbeD1TbM (ORCPT ); Sat, 28 Apr 2018 15:31:12 -0400 Received: by mail-pf0-f194.google.com with SMTP id z9so3872725pfe.6 for ; Sat, 28 Apr 2018 12:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2hs3r+VudIa6gjaYXPrPlp1RqtvpsaSiXjlMmAA33a8=; b=cRcaGDCwELcn7MC/eiRU+0pbt1e2crWx5AqUGJ+u+XnxZmLZZGnJl7/lwy0krzqk/E 0HxX1Q0QIbXUa/KDtFrLr1Lb8asw1m21FBDkAXHojS08YJUmqX8lw8fCrLywiAC64L37 zFevCn8vhzPdL8SALZloFOgaVchLgTRwsQyloh23tTXf4Ni/TrBAhjonu+yxKVwtKMEf JSpGQ5VIzBnzJJnKOZDM7wQxiZdETaQem9/AVuVbj4DwrBfQmXEdle6MLRoMs7MJg4A/ f78OzHPzt8dVnsUvfqHQ3oBY03+FG6FSpdQC95T8C//o4DrjqTt9OgPbEO/UDscIjwda 77NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2hs3r+VudIa6gjaYXPrPlp1RqtvpsaSiXjlMmAA33a8=; b=StQg/yYFY4gnBIdZARBQ5yJcN2RiFoyM36iiZrmABHuLmjGq2KESpmUdh7S30ekxtw winUhjHtj5HQPYiJAWd3eFC+QVP05gp3GXbfwBAKAMFNbNkVfypXhsdGo0AQoExlRmyG Nz/MzazsTl69dQ/nJihk/yzTjoaeK9BqtT167//Xs878sWBcD+Iucgr+p/Z1dq7vpyFa 7MKjwtYi/DjxjSLK7fuxmRyyTH6NCjTIhX1yJao3ua8CpHnu5ZdKQnLe8qledeBECY5P /cFxar3d4Uxa1mStVMzGixr0P3LM61u1TWw1V287emUG9wp6av/+8ooZUfJ2I0tw/SQJ 2q8g== X-Gm-Message-State: ALQs6tBd4GnUBwvKJsmUaEArwgmU57Tde8xFwE8h15/uVcl8AON2ElYH CtpONHIDzhdkvSHbJJIp3OTr0A== X-Received: by 10.98.236.220 with SMTP id e89mr6738399pfm.33.1524943871461; Sat, 28 Apr 2018 12:31:11 -0700 (PDT) Received: from C02VV2HXHV2Q.local (c-67-164-7-130.hsd1.ca.comcast.net. [67.164.7.130]) by smtp.gmail.com with ESMTPSA id v85-v6sm7354096pgb.71.2018.04.28.12.31.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Apr 2018 12:31:10 -0700 (PDT) Subject: Re: [PATCH v2 0/3] Rework write error handling in pblk To: Hans Holmberg Cc: linux-block@vger.kernel.org, Javier Gonzales , linux-kernel@vger.kernel.org, Hans Holmberg References: <1524548732-4326-1-git-send-email-hans.ml.holmberg@owltronix.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <7536f5dc-bc11-ae4b-b11e-9c3995142cd0@lightnvm.io> Date: Sat, 28 Apr 2018 12:31:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524548732-4326-1-git-send-email-hans.ml.holmberg@owltronix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/23/18 10:45 PM, Hans Holmberg wrote: > From: Hans Holmberg > > This patch series fixes the(currently incomplete) write error handling > in pblk by: > > * queuing and re-submitting failed writes in the write buffer > * evacuating valid data data in lines with write failures, so the > chunk(s) with write failures can be reset to a known state by the fw > > Lines with failures in smeta are put back on the free list. > Failed chunks will be reset on the next use. > > If a write failes in emeta, the lba list is cached so the line can be > garbage collected without scanning the out-of-band area. > > Changes in V2: > - Added the recov_writes counter increase to the new path > - Moved lba list emeta reading during gc to a separate function > - Allocating the saved lba list with pblk_malloc instead of kmalloc > - Fixed formatting issues > - Removed dead code > > Hans Holmberg (3): > lightnvm: pblk: rework write error recovery path > lightnvm: pblk: garbage collect lines with failed writes > lightnvm: pblk: fix smeta write error path > > drivers/lightnvm/pblk-core.c | 52 +++++++- > drivers/lightnvm/pblk-gc.c | 102 +++++++++------ > drivers/lightnvm/pblk-init.c | 47 ++++--- > drivers/lightnvm/pblk-rb.c | 39 ------ > drivers/lightnvm/pblk-recovery.c | 91 ------------- > drivers/lightnvm/pblk-rl.c | 29 ++++- > drivers/lightnvm/pblk-sysfs.c | 15 ++- > drivers/lightnvm/pblk-write.c | 269 ++++++++++++++++++++++++++------------- > drivers/lightnvm/pblk.h | 36 ++++-- > 9 files changed, 384 insertions(+), 296 deletions(-) > Thanks Hans. I've applied 1 & 3. The second did not apply cleanly to for-4.18/core. Could you please resend a rebased version?