mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Javier González" <jg@lightnvm.io>
To: mb@lightnvm.io
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>
Subject: [PATCH 2/7] lightnvm: do not decide on device blocks
Date: Thu, 27 Oct 2016 16:49:38 +0200	[thread overview]
Message-ID: <1477579783-5289-2-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1477579783-5289-1-git-send-email-javier@cnexlabs.com>

Device blocks should be marked by the device and considered as bad
blocks by the media manager. Thus, do not make assumptions on which
blocks are going to be used by the device. In doing so we might lose
valid blocks from the free list.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/gennvm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c
index 730d736..a7e17fa 100644
--- a/drivers/lightnvm/gennvm.c
+++ b/drivers/lightnvm/gennvm.c
@@ -371,12 +371,6 @@ static int gen_blocks_init(struct nvm_dev *dev, struct gen_dev *gn)
 			block->lun = &lun->vlun;
 			block->id = cur_block_id++;
 
-			/* First block is reserved for device */
-			if (unlikely(lun_iter == 0 && blk_iter == 0)) {
-				lun->vlun.nr_free_blocks--;
-				continue;
-			}
-
 			list_add_tail(&block->list, &lun->free_list);
 		}
 
-- 
2.7.4

  reply	other threads:[~2016-10-27 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 14:49 [PATCH 1/7] lightnvm: enable to send hint to erase command Javier González
2016-10-27 14:49 ` Javier González [this message]
2016-10-27 14:49 ` [PATCH 3/7] lightnvm: manage block list on LUN owner Javier González
2016-10-27 14:49 ` [PATCH 4/7] lightnvm: drop reserve and release LUN callbacks Javier González
2016-10-27 14:49 ` [PATCH 5/7] lightnvm: export set bad block table Javier González
2016-10-27 14:49 ` [PATCH 6/7] lightnvm: add ECC error codes Javier González
2016-10-27 14:49 ` [PATCH 7/7] lightnvm: rrpc: split bios of size > 256kb Javier González
2016-10-27 18:01 [PATCH 0/7] LightNVM patchset V2 Javier González
2016-10-27 18:01 ` [PATCH 2/7] lightnvm: do not decide on device blocks Javier González

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477579783-5289-2-git-send-email-javier@cnexlabs.com \
    --to=jg@lightnvm.io \
    --cc=javier@cnexlabs.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®