Thread (2 messages) read the whole thread 2 messages, 2 authors, 2017-02-10

Re: [PATCH 1/1] dm-zoned: Zoned block device target

From: Damien Le Moal <hidden>
Date: 2017-02-10 01:24:14
Also in: dm-devel

Christoph,

On 2/9/17 18:36, Christoph Hellwig wrote:
On Thu, Feb 09, 2017 at 01:18:49PM +0900, Damien Le Moal wrote:
quoted
+
+/*
+ * 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.
Thank you for the hint. I will look into this.

Best regards.

-- 
Damien Le Moal, Ph.D.
Sr. Manager, System Software Research Group,
Western Digital Corporation
Damien.LeMoal@wdc.com
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.wdc.com, www.hgst.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help