From patchwork Thu Jan 7 12:03:24 2016 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: 7976161 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A25A09F38D for ; Thu, 7 Jan 2016 12:03:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB9B12014A for ; Thu, 7 Jan 2016 12:03:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FF372012E for ; Thu, 7 Jan 2016 12:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbcAGMDh (ORCPT ); Thu, 7 Jan 2016 07:03:37 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33142 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289AbcAGMDg (ORCPT ); Thu, 7 Jan 2016 07:03:36 -0500 Received: by mail-wm0-f54.google.com with SMTP id f206so94967413wmf.0 for ; Thu, 07 Jan 2016 04:03:35 -0800 (PST) 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-type :content-transfer-encoding; bh=oCn8WzcikCSB1rmZ4TnWYAkR8BtakkqSU7puFB6ri2I=; b=nZM1WJjkolOI6uTr8PzyvPgQU8d4tXTl10+mMBaWxwNWSYyM7BzUjnFgmgF7h1w0FC gbEP5nil6XuW1g/fikyjAmwWrLnErtCshKRNbKqssOOT+iqSt3VQp4ipLV5iaP0BdPRF aY7CICyzvgR3oPbd+PzCJT5ia3u/RLgjpquRA5p1c37PX0X19sCyjf54cY3L8ynCLFzW +X/djP0vzmVpErUqplk2CsKFQJaSNt7VunuMKol09ZLH4lvPwPR0gr5UNr/muZBMNxBP qXPhWv7PxPwp2w1yvDVaLgRVro1Qiyvj+1sxIgD92e1ZShmd4mSWrfJcQMoLbXsKYSH/ l81w== 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:mime-version :content-type:content-transfer-encoding; bh=oCn8WzcikCSB1rmZ4TnWYAkR8BtakkqSU7puFB6ri2I=; b=ZedE1fABCV3mXsGqCKD9DSu7yNilPRK59h7UqADQ6Thbjzj7Ojzuyraf6TMeQySh8e AeNDfi+ChxDPpLnpZX7oYN+7cMHr7MDPUdSx166hdD7p7k+BqCpfozZTupXvDPtWRDFJ 3MiEnIXcU8mX6/zZiF9jfWg3n0pvQBJLCKyiVfk01f/WdzCykJDjNL1drp1hnc61qdHs yZFalCpqAM+NXR3MSLBOWUejGcq4vu2kUozMV/7Rc9S+CgJvF4e7qxUvNU2KSxwDoaFs N50071a1g6W+vVIPLY6+vADI5vc8AGH9uMGv7CyRlXRvNJ9fqBBNXQ7XyyMKFLKTGU+K PJCg== X-Gm-Message-State: ALoCoQnyl3gLrDsHn2L1vN58upfAP/fZJ64/IctHNPjyRjt4h+rGhn5nEHLmmpn0BIyVn5c0CbeXN1gF1E1QIu8bjth3sulkwQ== X-Received: by 10.28.13.213 with SMTP id 204mr13722191wmn.16.1452168215178; Thu, 07 Jan 2016 04:03:35 -0800 (PST) Received: from localhost.localdomain (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.gmail.com with ESMTPSA id gb9sm73305923wjb.26.2016.01.07.04.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 04:03:34 -0800 (PST) From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: jg@lightnvm.io, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH 1/2] lightnvm: let rrpc block know its rrpc lun Date: Thu, 7 Jan 2016 13:03:24 +0100 Message-Id: <1452168205-5559-1-git-send-email-javier@javigon.com> X-Mailer: git-send-email 2.1.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-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently a rrpc block only points to the nvm_lun it belongs to. Maintaining a reference to the rrpc lun allows to manage rrpc specific behavior between an rrpc block and rrpc lun. Signed-off-by: Javier González --- drivers/lightnvm/rrpc.c | 1 + drivers/lightnvm/rrpc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index ec7aacf..1bea346 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -1150,6 +1150,7 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end) struct nvm_block *blk = &lun->blocks[j]; rblk->parent = blk; + rblk->rlun = rlun; INIT_LIST_HEAD(&rblk->prio); spin_lock_init(&rblk->lock); } diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index a9696a0..7c5fa4d 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -54,6 +54,7 @@ struct rrpc_rq { struct rrpc_block { struct nvm_block *parent; + struct rrpc_lun *rlun; struct list_head prio; #define MAX_INVALID_PAGES_STORAGE 8