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-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>
Subject: [PATCH] lightnvm: invalidate addresses on multipage fail
Date: Mon,  1 Feb 2016 14:10:02 +0100	[thread overview]
Message-ID: <1454332202-13368-1-git-send-email-javier@javigon.com> (raw)

If a page mapping fails when mapping several pages in a single write bio
request, make sure that already mapped pages are invalidated. Since
other legit mappings coming from a different bio request might have
occurred, rolling back the failed bio is a difficult, unnecessary
overhead; in part because when a mapping fails something bad has
happened already. Still, invalidating pages in the failed bio will help
GC.

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

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c4d0b04..29befe9 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -730,6 +730,7 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
 		} else {
 			BUG_ON(is_gc);
 			rrpc_unlock_laddr(rrpc, r);
+			rrpc_invalidate_range(rrpc, laddr, i + 1);
 			nvm_dev_dma_free(rrpc->dev, rqd->ppa_list,
 							rqd->dma_ppa_list);
 			return NVM_IO_DONE;
-- 
2.1.4

             reply	other threads:[~2016-02-01 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 13:10 Javier González [this message]
2016-02-03  8:10 ` Matias Bjørling
2016-02-03  8:15   ` 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=1454332202-13368-1-git-send-email-javier@javigon.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®