mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: "Matias Bjørling" <m@bjorling.me>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-block-owner@vger.kernel.org
Subject: Re: [PATCH 1/5] lightnvm: handle submit_io failure
Date: Tue, 05 Apr 2016 17:04:05 +0200	[thread overview]
Message-ID: <1718345855a28710c601781ed0e2f4eb@suse.de> (raw)
In-Reply-To: <1459868131-15133-2-git-send-email-m@bjorling.me>

On 2016-04-05 16:55, Matias Bjørling wrote:
> The device ->submit_io() callback might fail to submit I/O to device.
> In that case, the nvm_submit_ppa function should not wait for
> completion. Instead return the ->submit_io() error.
> 
> Signed-off-by: Matias Bjørling <m@bjorling.me>
> ---
>  drivers/lightnvm/core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
> index 0dc9a80..c2ef53a 100644
> --- a/drivers/lightnvm/core.c
> +++ b/drivers/lightnvm/core.c
> @@ -351,6 +351,11 @@ int nvm_submit_ppa(struct nvm_dev *dev, struct
> ppa_addr *ppa, int nr_ppas,
>  	nvm_generic_to_addr_mode(dev, &rqd);
> 
>  	ret = dev->ops->submit_io(dev, &rqd);
> +	if (ret) {
> +		nvm_free_rqd_ppalist(dev, &rqd);
> +		bio_put(bio);
> +		return ret;
> +	}
> 
>  	/* Prevent hang_check timer from firing at us during very long I/O */
>  	hang_check = sysctl_hung_task_timeout_secs;

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

  reply	other threads:[~2016-04-05 15:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 14:55 [PATCH 0/5] Fixes to LightNVM Matias Bjørling
2016-04-05 14:55 ` [PATCH 1/5] lightnvm: handle submit_io failure Matias Bjørling
2016-04-05 15:04   ` Johannes Thumshirn [this message]
2016-04-05 14:55 ` [PATCH 2/5] lightnvm: implement nvm_submit_ppa_list Matias Bjørling
2016-04-05 15:07   ` Johannes Thumshirn
2016-04-05 14:55 ` [PATCH 3/5] lightnvm: add fpg_size and pfpg_size to struct nvm_dev Matias Bjørling
2016-04-05 15:09   ` Johannes Thumshirn
2016-04-05 14:55 ` [PATCH 4/5] lightnvm: move block fold outside of get_bb_tbl() Matias Bjørling
2016-04-05 15:12   ` Johannes Thumshirn
2016-04-05 14:55 ` [PATCH 5/5] lightnvm: avoid memory leak when lun_map kcalloc fails Matias Bjørling
2016-04-05 15:14   ` Johannes Thumshirn

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=1718345855a28710c601781ed0e2f4eb@suse.de \
    --to=jthumshirn@suse.de \
    --cc=linux-block-owner@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m@bjorling.me \
    /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

Powered by JetHome