From patchwork Tue Sep 18 08:03:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Javier_Gonz=C3=A1lez?= X-Patchwork-Id: 10603825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 854DE15A6 for ; Tue, 18 Sep 2018 08:03:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77E3B2A673 for ; Tue, 18 Sep 2018 08:03:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C6D62A67D; Tue, 18 Sep 2018 08:03:42 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 1ED032A673 for ; Tue, 18 Sep 2018 08:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729200AbeIRNek (ORCPT ); Tue, 18 Sep 2018 09:34:40 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:36535 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbeIRNek (ORCPT ); Tue, 18 Sep 2018 09:34:40 -0400 Received: by mail-ed1-f66.google.com with SMTP id f4-v6so1119584edq.3 for ; Tue, 18 Sep 2018 01:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tkvbk2VYUdLp9dsxGT4L5gPQCojU+B7XTPlqFhhzO/s=; b=J4Fjv9J0bA/eDy7/b7dDCihOTFZUY6QAAyhgQfinEI2LC7hoQF5oRxcwp9n8RGBPaj yhI2niRagf+9x7v21zNBCrpYcTfUejQfCq/l1a9GPz542hTz5oDTxNUQYz68XkJHF5BE z4a+Bof6DQWsbOBMeCvPC3jRfTRA+zIpLHFwVB7xV15wnUbeKls8cNkVqU3wuXWm8aXU PtSE0QZiYROHcfKi4b6hx6f7fyPiSs8TUSHHFB99GveK4FOTgenxOy3VO01SSCaM+al0 rW+SCf4O3zxJROn8NQMd7VP7nOZ5sBn0UejNErIujEUYInw4egDMT5AWbWajpqvWHo24 BC3w== 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:mime-version :content-transfer-encoding; bh=tkvbk2VYUdLp9dsxGT4L5gPQCojU+B7XTPlqFhhzO/s=; b=OVY/dTcigftQA3n5LOKkoJIYKniNZYoORlA6XFI4gx+RH4Ot53xoLoUsU+e0OgjZau lIVW5aqSwRYDb4ipyopLkh90nJBMqPMo6qBuBZatD1WDfnyQTmHSd+4z0X6Mceonym0t HgP0rjOkl5Zg7dX65Hc4vq1jmvmOl0TbVS/1S08gzNvYLZMDgjTrT5peDiPISlxpbwUY d/Kk9fSaequZj8PAkAQndaKUjiplJv1oTlPfliIVdqyjL2NjBoZTeMdXLUWfCuFtYnqk 1xzQ0ZpGyDsNewdW+lZRg5by/iZRHgjKxSi8NuEWUpu96s+vAAav1lKoByx+CWcutLmF w4pA== X-Gm-Message-State: APzg51A3ycVUb8b2QM5pHVhHhJoxLn5lE8uIf3lQcHTggsu0GctymMDD hIo7aY1W/LNW6gnqlbKWdc1zqfyxHH4= X-Google-Smtp-Source: ANB0VdbcKCNZ4gxM7gtU4CRrkzh4HCwK+Ly4Qpu1VE99v/TdLQcelIDTpyNeLsIJvzVbgMkzDIJtaA== X-Received: by 2002:aa7:c5cd:: with SMTP id h13-v6mr48955626eds.27.1537257792640; Tue, 18 Sep 2018 01:03:12 -0700 (PDT) Received: from ch-wrk-javier.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id l48-v6sm7221062eda.94.2018.09.18.01.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Sep 2018 01:03:12 -0700 (PDT) From: " =?utf-8?q?Javier_Gonz=C3=A1lez?= " X-Google-Original-From: =?utf-8?q?Javier_Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jav?= =?utf-8?q?ier_Gonz=C3=A1lez?= Subject: [PATCH 0/4] lightnvm: pblk: fixes for read buffer Date: Tue, 18 Sep 2018 10:03:01 +0200 Message-Id: <1537257785-31630-1-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 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 This patchet's main motivation is to account for a corner case in which the read constrains imposed by the device are not respected by pblk. In the process, it also refactors parts of the read ring buffer to simplify creation/deletion operations and improve readability. Note that the checkpatch warnings on missing comments for memory barriers are false positives. The code is also available in the for-4.20/pblk branch in the OCSSD github project. Thanks, Javier Javier González (4): lightnvm: pblk: remove unused function lightnvm: pblk: encapsulate rb pointer operations lightnvm: pblk: move ring buffer alloc/free rb init lightnvm: pblk: guarantee mw_cunits on read buffer drivers/lightnvm/pblk-init.c | 21 +++------ drivers/lightnvm/pblk-rb.c | 100 +++++++++++++++++++----------------------- drivers/lightnvm/pblk-write.c | 7 +-- drivers/lightnvm/pblk.h | 11 ++--- 4 files changed, 57 insertions(+), 82 deletions(-)