From patchwork Thu Jul 7 07:54:08 2016 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: 9218085 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 D85FA60B16 for ; Thu, 7 Jul 2016 07:58:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE68628794 for ; Thu, 7 Jul 2016 07:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C363F28795; Thu, 7 Jul 2016 07:58:58 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 52EE328795 for ; Thu, 7 Jul 2016 07:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756741AbcGGH6n (ORCPT ); Thu, 7 Jul 2016 03:58:43 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35051 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756609AbcGGHyi (ORCPT ); Thu, 7 Jul 2016 03:54:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id a66so3512986wme.2 for ; Thu, 07 Jul 2016 00:54:36 -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=LEEsxD/y0Fel/yPNn8fk8NcH86k+Lzyp7awHijg78/I=; b=WOcXjEOMHxFHfcOUR73k91zKXz+oNxN3EsJUGCXJhFEkIZckeBqHMjLVk+Bsgh+0pu AOrgemp36UV4rBqyuQQsDJJ9XT41Jxua5LLik0vTYYZAIXgFjHL0GsDa9gslS/uONxbf TB34McqEjawWjlP6ovG4g27hErWXNEyuDdOFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LEEsxD/y0Fel/yPNn8fk8NcH86k+Lzyp7awHijg78/I=; b=QOXmVUPNZviyKJH0OUSiH9r3qcN/1kcP/ZT/YfuAAi4mtkM/NeHF4Zpw0kTKmvfvPh UrVWyl2GnwdWBgKxTzU2vqSGdgZRSSGH0XwqoT+twUe5n+E3/6wQagdS+lBojawxzbOQ lFC/jhsy2FIcSYMZKn/JpSXHiltX01aPeE+keNfooCtktFxiPwmMleNUoSCrUFm1VWdv 5sgt8Kh1WxNzvUQauLyFMf86b6EkEZUe8a4Y654T+67lkHhr8vSCsvYYMQtZ6HNidZpM 4F0BIcsjlcmsPtWHU9/WALafxOr1tOqOcFPykYQlAygF8F1LnXu1Sufu4VSPdqhfRozA VWGA== X-Gm-Message-State: ALyK8tJe7LLkKXVKgBJL7hMagzN2JB1tw98k1ttLLYlxWJ9ZzfYee5x+F7w9rhn10Sj76A== X-Received: by 10.28.47.207 with SMTP id v198mr1355231wmv.40.1467878075366; Thu, 07 Jul 2016 00:54:35 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id i74sm1654796wmg.21.2016.07.07.00.54.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 00:54:34 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 02/17] lightnvm: add media manager mark_blk helper Date: Thu, 7 Jul 2016 09:54:08 +0200 Message-Id: <1467878063-22919-3-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467878063-22919-1-git-send-email-m@bjorling.me> References: <1467878063-22919-1-git-send-email-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: Javier González Expose media manager mark_blk() to targets, as done for the rest of the media manager callback functions. Signed-off-by: Javier González Updated description Signed-off-by: Matias Bjørling Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 6 ++++++ include/linux/lightnvm.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 160c1a6..13993c9 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -210,6 +210,12 @@ void nvm_put_blk(struct nvm_dev *dev, struct nvm_block *blk) } EXPORT_SYMBOL(nvm_put_blk); +void nvm_mark_blk(struct nvm_dev *dev, struct ppa_addr ppa, int type) +{ + return dev->mt->mark_blk(dev, ppa, type); +} +EXPORT_SYMBOL(nvm_mark_blk); + int nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd) { return dev->mt->submit_io(dev, rqd); diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index ef2c7d2..9c56148 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -532,6 +532,8 @@ extern int nvm_register(struct request_queue *, char *, struct nvm_dev_ops *); extern void nvm_unregister(char *); +void nvm_mark_blk(struct nvm_dev *dev, struct ppa_addr ppa, int type); + extern int nvm_submit_io(struct nvm_dev *, struct nvm_rq *); extern void nvm_generic_to_addr_mode(struct nvm_dev *, struct nvm_rq *); extern void nvm_addr_to_generic_mode(struct nvm_dev *, struct nvm_rq *);