All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Mike Snitzer <snitzer@redhat.com>,
	linux-block@vger.kernel.org, dm-devel@redhat.com,
	Christoph Hellwig <hch@lst.de>, Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH 1/1] dm-zoned: Zoned block device target
Date: Thu, 9 Feb 2017 10:36:06 +0100	[thread overview]
Message-ID: <20170209093606.GA8189@lst.de> (raw)
In-Reply-To: <20170209041849.30964-1-damien.lemoal@wdc.com>

On Thu, Feb 09, 2017 at 01:18:49PM +0900, Damien Le Moal wrote:
> +
> +/*
> + * Target BIO completion.
> + */
> +static inline void dmz_bio_end(struct bio *bio, int err)
> +{
> +	struct dm_zone_bioctx *bioctx =
> +		dm_per_bio_data(bio, sizeof(struct dm_zone_bioctx));
> +
> +	if (atomic_dec_and_test(&bioctx->ref)) {

It seems like this could be simplified a bit by using bio_chain
to chain the clones to the original bio.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: dm-devel@redhat.com, Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>, Hannes Reinecke <hare@suse.de>,
	Christoph Hellwig <hch@lst.de>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 1/1] dm-zoned: Zoned block device target
Date: Thu, 9 Feb 2017 10:36:06 +0100	[thread overview]
Message-ID: <20170209093606.GA8189@lst.de> (raw)
In-Reply-To: <20170209041849.30964-1-damien.lemoal@wdc.com>

On Thu, Feb 09, 2017 at 01:18:49PM +0900, Damien Le Moal wrote:
> +
> +/*
> + * Target BIO completion.
> + */
> +static inline void dmz_bio_end(struct bio *bio, int err)
> +{
> +	struct dm_zone_bioctx *bioctx =
> +		dm_per_bio_data(bio, sizeof(struct dm_zone_bioctx));
> +
> +	if (atomic_dec_and_test(&bioctx->ref)) {

It seems like this could be simplified a bit by using bio_chain
to chain the clones to the original bio.

  reply	other threads:[~2017-02-09  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09  4:18 [PATCH 1/1] dm-zoned: Zoned block device target Damien Le Moal
2017-02-09  9:36 ` Christoph Hellwig [this message]
2017-02-09  9:36   ` Christoph Hellwig
2017-02-10  0:51   ` Damien Le Moal
2017-02-10  0:51     ` Damien Le Moal
2017-02-09 15:27 ` Mike Snitzer
2017-02-09 15:27   ` Mike Snitzer
2017-02-10  1:09   ` Damien Le Moal
2017-02-10  1:09     ` Damien Le Moal
2017-02-09 16:07 ` Hannes Reinecke
2017-02-09 16:07   ` Hannes Reinecke
2017-02-10  1:24   ` Damien Le Moal
2017-02-10  1:24     ` Damien Le Moal

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=20170209093606.GA8189@lst.de \
    --to=hch@lst.de \
    --cc=agk@redhat.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=snitzer@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.