All of lore.kernel.org
 help / color / mirror / Atom feed
* add a bio_list_merge_init helper
@ 2024-03-28  8:41 Christoph Hellwig
  2024-03-28  8:41 ` [PATCH 1/4] block: " Christoph Hellwig
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Christoph Hellwig @ 2024-03-28  8:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

Hi Jens,

the bio_list API is missing a helper that reinitializes the list
spliced onto another one.  Add one to simplify the code similar
to what the normal list.h can do.

Diffstat:
 block/blk-cgroup.c            |    3 +--
 drivers/md/dm-bio-prison-v2.c |    3 +--
 drivers/md/dm-cache-target.c  |   12 ++++--------
 drivers/md/dm-clone-target.c  |   14 +++++---------
 drivers/md/dm-era-target.c    |    3 +--
 drivers/md/dm-mpath.c         |    3 +--
 drivers/md/dm-thin.c          |   12 +++---------
 drivers/md/dm-vdo/data-vio.c  |    3 +--
 drivers/md/dm-vdo/flush.c     |    3 +--
 fs/btrfs/raid56.c             |    3 +--
 include/linux/bio.h           |    7 +++++++
 11 files changed, 26 insertions(+), 40 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] block: add a bio_list_merge_init helper
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
@ 2024-03-28  8:41 ` Christoph Hellwig
  2024-03-28 18:29   ` Matthew Sakai
  2024-03-28  8:41 ` [PATCH 2/4] blk-cgroup: use bio_list_merge_init Christoph Hellwig
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2024-03-28  8:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

This is a simple combination of bio_list_merge + bio_list_init
similar to list_splice_init.  While it only saves a single
line in a callers, it makes the move all bios from one list to
another and reinitialize the original pattern a lot more obvious
in the callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/bio.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/bio.h b/include/linux/bio.h
index 875d792bffff82..9b8a369f44bc6b 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -615,6 +615,13 @@ static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
 	bl->tail = bl2->tail;
 }
 
+static inline void bio_list_merge_init(struct bio_list *bl,
+		struct bio_list *bl2)
+{
+	bio_list_merge(bl, bl2);
+	bio_list_init(bl2);
+}
+
 static inline void bio_list_merge_head(struct bio_list *bl,
 				       struct bio_list *bl2)
 {
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] blk-cgroup: use bio_list_merge_init
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
  2024-03-28  8:41 ` [PATCH 1/4] block: " Christoph Hellwig
@ 2024-03-28  8:41 ` Christoph Hellwig
  2024-03-28  8:41 ` [PATCH 3/4] dm: " Christoph Hellwig
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2024-03-28  8:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

Use bio_list_merge_init instead of open coding bio_list_merge and
bio_list_init.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-cgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index bdbb557feb5a0e..8598e4591e7966 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -218,8 +218,7 @@ static void blkg_async_bio_workfn(struct work_struct *work)
 
 	/* as long as there are pending bios, @blkg can't go away */
 	spin_lock(&blkg->async_bio_lock);
-	bio_list_merge(&bios, &blkg->async_bios);
-	bio_list_init(&blkg->async_bios);
+	bio_list_merge_init(&bios, &blkg->async_bios);
 	spin_unlock(&blkg->async_bio_lock);
 
 	/* start plug only when bio_list contains at least 2 bios */
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] dm: use bio_list_merge_init
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
  2024-03-28  8:41 ` [PATCH 1/4] block: " Christoph Hellwig
  2024-03-28  8:41 ` [PATCH 2/4] blk-cgroup: use bio_list_merge_init Christoph Hellwig
@ 2024-03-28  8:41 ` Christoph Hellwig
  2024-03-29 14:01   ` Mike Snitzer
  2024-03-28  8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2024-03-28  8:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

Use bio_list_merge_init instead of open coding bio_list_merge and
bio_list_init.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/md/dm-bio-prison-v2.c |  3 +--
 drivers/md/dm-cache-target.c  | 12 ++++--------
 drivers/md/dm-clone-target.c  | 14 +++++---------
 drivers/md/dm-era-target.c    |  3 +--
 drivers/md/dm-mpath.c         |  3 +--
 drivers/md/dm-thin.c          | 12 +++---------
 drivers/md/dm-vdo/data-vio.c  |  3 +--
 drivers/md/dm-vdo/flush.c     |  3 +--
 8 files changed, 17 insertions(+), 36 deletions(-)

diff --git a/drivers/md/dm-bio-prison-v2.c b/drivers/md/dm-bio-prison-v2.c
index fd852981ef9ccb..cf433b0cf74275 100644
--- a/drivers/md/dm-bio-prison-v2.c
+++ b/drivers/md/dm-bio-prison-v2.c
@@ -321,8 +321,7 @@ static bool __unlock(struct dm_bio_prison_v2 *prison,
 {
 	BUG_ON(!cell->exclusive_lock);
 
-	bio_list_merge(bios, &cell->bios);
-	bio_list_init(&cell->bios);
+	bio_list_merge_init(bios, &cell->bios);
 
 	if (cell->shared_count) {
 		cell->exclusive_lock = false;
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 911f73f7ebbaa0..0fcbf8603846b5 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -115,8 +115,7 @@ static void __commit(struct work_struct *_ws)
 	 */
 	spin_lock_irq(&b->lock);
 	list_splice_init(&b->work_items, &work_items);
-	bio_list_merge(&bios, &b->bios);
-	bio_list_init(&b->bios);
+	bio_list_merge_init(&bios, &b->bios);
 	b->commit_scheduled = false;
 	spin_unlock_irq(&b->lock);
 
@@ -565,8 +564,7 @@ static void defer_bio(struct cache *cache, struct bio *bio)
 static void defer_bios(struct cache *cache, struct bio_list *bios)
 {
 	spin_lock_irq(&cache->lock);
-	bio_list_merge(&cache->deferred_bios, bios);
-	bio_list_init(bios);
+	bio_list_merge_init(&cache->deferred_bios, bios);
 	spin_unlock_irq(&cache->lock);
 
 	wake_deferred_bio_worker(cache);
@@ -1816,8 +1814,7 @@ static void process_deferred_bios(struct work_struct *ws)
 	bio_list_init(&bios);
 
 	spin_lock_irq(&cache->lock);
-	bio_list_merge(&bios, &cache->deferred_bios);
-	bio_list_init(&cache->deferred_bios);
+	bio_list_merge_init(&bios, &cache->deferred_bios);
 	spin_unlock_irq(&cache->lock);
 
 	while ((bio = bio_list_pop(&bios))) {
@@ -1847,8 +1844,7 @@ static void requeue_deferred_bios(struct cache *cache)
 	struct bio_list bios;
 
 	bio_list_init(&bios);
-	bio_list_merge(&bios, &cache->deferred_bios);
-	bio_list_init(&cache->deferred_bios);
+	bio_list_merge_init(&bios, &cache->deferred_bios);
 
 	while ((bio = bio_list_pop(&bios))) {
 		bio->bi_status = BLK_STS_DM_REQUEUE;
diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c
index 94b2fc33f64be3..3f68672ab7c938 100644
--- a/drivers/md/dm-clone-target.c
+++ b/drivers/md/dm-clone-target.c
@@ -1181,8 +1181,7 @@ static void process_deferred_discards(struct clone *clone)
 	struct bio_list discards = BIO_EMPTY_LIST;
 
 	spin_lock_irq(&clone->lock);
-	bio_list_merge(&discards, &clone->deferred_discard_bios);
-	bio_list_init(&clone->deferred_discard_bios);
+	bio_list_merge_init(&discards, &clone->deferred_discard_bios);
 	spin_unlock_irq(&clone->lock);
 
 	if (bio_list_empty(&discards))
@@ -1215,8 +1214,7 @@ static void process_deferred_bios(struct clone *clone)
 	struct bio_list bios = BIO_EMPTY_LIST;
 
 	spin_lock_irq(&clone->lock);
-	bio_list_merge(&bios, &clone->deferred_bios);
-	bio_list_init(&clone->deferred_bios);
+	bio_list_merge_init(&bios, &clone->deferred_bios);
 	spin_unlock_irq(&clone->lock);
 
 	if (bio_list_empty(&bios))
@@ -1237,11 +1235,9 @@ static void process_deferred_flush_bios(struct clone *clone)
 	 * before issuing them or signaling their completion.
 	 */
 	spin_lock_irq(&clone->lock);
-	bio_list_merge(&bios, &clone->deferred_flush_bios);
-	bio_list_init(&clone->deferred_flush_bios);
-
-	bio_list_merge(&bio_completions, &clone->deferred_flush_completions);
-	bio_list_init(&clone->deferred_flush_completions);
+	bio_list_merge_init(&bios, &clone->deferred_flush_bios);
+	bio_list_merge_init(&bio_completions,
+			    &clone->deferred_flush_completions);
 	spin_unlock_irq(&clone->lock);
 
 	if (bio_list_empty(&bios) && bio_list_empty(&bio_completions) &&
diff --git a/drivers/md/dm-era-target.c b/drivers/md/dm-era-target.c
index 6acfa5bf97a400..8f81e597858d5c 100644
--- a/drivers/md/dm-era-target.c
+++ b/drivers/md/dm-era-target.c
@@ -1272,8 +1272,7 @@ static void process_deferred_bios(struct era *era)
 	bio_list_init(&marked_bios);
 
 	spin_lock(&era->deferred_lock);
-	bio_list_merge(&deferred_bios, &era->deferred_bios);
-	bio_list_init(&era->deferred_bios);
+	bio_list_merge_init(&deferred_bios, &era->deferred_bios);
 	spin_unlock(&era->deferred_lock);
 
 	if (bio_list_empty(&deferred_bios))
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 05d1328d18119c..15b681b901531f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -704,8 +704,7 @@ static void process_queued_bios(struct work_struct *work)
 		return;
 	}
 
-	bio_list_merge(&bios, &m->queued_bios);
-	bio_list_init(&m->queued_bios);
+	bio_list_merge_init(&bios, &m->queued_bios);
 
 	spin_unlock_irqrestore(&m->lock, flags);
 
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 4793ad2aa1f7e8..f359984c8ef27e 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -592,12 +592,6 @@ struct dm_thin_endio_hook {
 	struct dm_bio_prison_cell *cell;
 };
 
-static void __merge_bio_list(struct bio_list *bios, struct bio_list *master)
-{
-	bio_list_merge(bios, master);
-	bio_list_init(master);
-}
-
 static void error_bio_list(struct bio_list *bios, blk_status_t error)
 {
 	struct bio *bio;
@@ -616,7 +610,7 @@ static void error_thin_bio_list(struct thin_c *tc, struct bio_list *master,
 	bio_list_init(&bios);
 
 	spin_lock_irq(&tc->lock);
-	__merge_bio_list(&bios, master);
+	bio_list_merge_init(&bios, master);
 	spin_unlock_irq(&tc->lock);
 
 	error_bio_list(&bios, error);
@@ -645,8 +639,8 @@ static void requeue_io(struct thin_c *tc)
 	bio_list_init(&bios);
 
 	spin_lock_irq(&tc->lock);
-	__merge_bio_list(&bios, &tc->deferred_bio_list);
-	__merge_bio_list(&bios, &tc->retry_on_resume_list);
+	bio_list_merge_init(&bios, &tc->deferred_bio_list);
+	bio_list_merge_init(&bios, &tc->retry_on_resume_list);
 	spin_unlock_irq(&tc->lock);
 
 	error_bio_list(&bios, BLK_STS_DM_REQUEUE);
diff --git a/drivers/md/dm-vdo/data-vio.c b/drivers/md/dm-vdo/data-vio.c
index 94f6f1ccfb7d6d..ab3ea833780946 100644
--- a/drivers/md/dm-vdo/data-vio.c
+++ b/drivers/md/dm-vdo/data-vio.c
@@ -604,8 +604,7 @@ static void assign_discard_permit(struct limiter *limiter)
 
 static void get_waiters(struct limiter *limiter)
 {
-	bio_list_merge(&limiter->waiters, &limiter->new_waiters);
-	bio_list_init(&limiter->new_waiters);
+	bio_list_merge_init(&limiter->waiters, &limiter->new_waiters);
 }
 
 static inline struct data_vio *get_available_data_vio(struct data_vio_pool *pool)
diff --git a/drivers/md/dm-vdo/flush.c b/drivers/md/dm-vdo/flush.c
index 57e87f0d706970..dd4fdee2ca0c5a 100644
--- a/drivers/md/dm-vdo/flush.c
+++ b/drivers/md/dm-vdo/flush.c
@@ -369,8 +369,7 @@ void vdo_dump_flusher(const struct flusher *flusher)
 static void initialize_flush(struct vdo_flush *flush, struct vdo *vdo)
 {
 	bio_list_init(&flush->bios);
-	bio_list_merge(&flush->bios, &vdo->flusher->waiting_flush_bios);
-	bio_list_init(&vdo->flusher->waiting_flush_bios);
+	bio_list_merge_init(&flush->bios, &vdo->flusher->waiting_flush_bios);
 }
 
 static void launch_flush(struct vdo_flush *flush)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] btrfs use bio_list_merge_init
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
                   ` (2 preceding siblings ...)
  2024-03-28  8:41 ` [PATCH 3/4] dm: " Christoph Hellwig
@ 2024-03-28  8:41 ` Christoph Hellwig
  2024-03-28 19:16   ` David Sterba
  2024-03-28  9:00 ` add a bio_list_merge_init helper Damien Le Moal
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2024-03-28  8:41 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

Use bio_list_merge_init instead of open coding bio_list_merge and
bio_list_init.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/btrfs/raid56.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 6f4a9cfeea44a3..831fac45e70f7d 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -331,12 +331,11 @@ static void steal_rbio(struct btrfs_raid_bio *src, struct btrfs_raid_bio *dest)
 static void merge_rbio(struct btrfs_raid_bio *dest,
 		       struct btrfs_raid_bio *victim)
 {
-	bio_list_merge(&dest->bio_list, &victim->bio_list);
+	bio_list_merge_init(&dest->bio_list, &victim->bio_list);
 	dest->bio_list_bytes += victim->bio_list_bytes;
 	/* Also inherit the bitmaps from @victim. */
 	bitmap_or(&dest->dbitmap, &victim->dbitmap, &dest->dbitmap,
 		  dest->stripe_nsectors);
-	bio_list_init(&victim->bio_list);
 }
 
 /*
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: add a bio_list_merge_init helper
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
                   ` (3 preceding siblings ...)
  2024-03-28  8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
@ 2024-03-28  9:00 ` Damien Le Moal
  2024-03-28 12:21 ` Johannes Thumshirn
  2024-03-29 18:32 ` Jens Axboe
  6 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal @ 2024-03-28  9:00 UTC (permalink / raw)
  To: Christoph Hellwig, Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

On 3/28/24 17:41, Christoph Hellwig wrote:
> Hi Jens,
> 
> the bio_list API is missing a helper that reinitializes the list
> spliced onto another one.  Add one to simplify the code similar
> to what the normal list.h can do.

For the series:

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

> 
> Diffstat:
>  block/blk-cgroup.c            |    3 +--
>  drivers/md/dm-bio-prison-v2.c |    3 +--
>  drivers/md/dm-cache-target.c  |   12 ++++--------
>  drivers/md/dm-clone-target.c  |   14 +++++---------
>  drivers/md/dm-era-target.c    |    3 +--
>  drivers/md/dm-mpath.c         |    3 +--
>  drivers/md/dm-thin.c          |   12 +++---------
>  drivers/md/dm-vdo/data-vio.c  |    3 +--
>  drivers/md/dm-vdo/flush.c     |    3 +--
>  fs/btrfs/raid56.c             |    3 +--
>  include/linux/bio.h           |    7 +++++++
>  11 files changed, 26 insertions(+), 40 deletions(-)
> 

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: add a bio_list_merge_init helper
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
                   ` (4 preceding siblings ...)
  2024-03-28  9:00 ` add a bio_list_merge_init helper Damien Le Moal
@ 2024-03-28 12:21 ` Johannes Thumshirn
  2024-03-29 18:32 ` Jens Axboe
  6 siblings, 0 replies; 11+ messages in thread
From: Johannes Thumshirn @ 2024-03-28 12:21 UTC (permalink / raw)
  To: Christoph Hellwig, Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] block: add a bio_list_merge_init helper
  2024-03-28  8:41 ` [PATCH 1/4] block: " Christoph Hellwig
@ 2024-03-28 18:29   ` Matthew Sakai
  0 siblings, 0 replies; 11+ messages in thread
From: Matthew Sakai @ 2024-03-28 18:29 UTC (permalink / raw)
  To: Christoph Hellwig, Jens Axboe
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Chris Mason, David Sterba, dm-devel, cgroups, linux-block,
	linux-btrfs


On 3/28/24 04:41, Christoph Hellwig wrote:
> This is a simple combination of bio_list_merge + bio_list_init
> similar to list_splice_init.  While it only saves a single
> line in a callers, it makes the move all bios from one list to
> another and reinitialize the original pattern a lot more obvious
> in the callers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   include/linux/bio.h | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 875d792bffff82..9b8a369f44bc6b 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -615,6 +615,13 @@ static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
>   	bl->tail = bl2->tail;
>   }
>   
> +static inline void bio_list_merge_init(struct bio_list *bl,
> +		struct bio_list *bl2)

Nit: The indentation in this line looks off to me.
Otherwise, for the series:

Reviewed-by: Matthew Sakai <msakai@redhat.com>

> +{
> +	bio_list_merge(bl, bl2);
> +	bio_list_init(bl2);
> +}
> +
>   static inline void bio_list_merge_head(struct bio_list *bl,
>   				       struct bio_list *bl2)
>   {


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] btrfs use bio_list_merge_init
  2024-03-28  8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
@ 2024-03-28 19:16   ` David Sterba
  0 siblings, 0 replies; 11+ messages in thread
From: David Sterba @ 2024-03-28 19:16 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jens Axboe, Tejun Heo, Josef Bacik, Mike Snitzer,
	Mikulas Patocka, Matthew Sakai, Chris Mason, David Sterba,
	dm-devel, cgroups, linux-block, linux-btrfs

On Thu, Mar 28, 2024 at 09:41:47AM +0100, Christoph Hellwig wrote:
> Use bio_list_merge_init instead of open coding bio_list_merge and
> bio_list_init.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: David Sterba <dsterba@suse.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] dm: use bio_list_merge_init
  2024-03-28  8:41 ` [PATCH 3/4] dm: " Christoph Hellwig
@ 2024-03-29 14:01   ` Mike Snitzer
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Snitzer @ 2024-03-29 14:01 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jens Axboe, Tejun Heo, Josef Bacik, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs

On Thu, Mar 28 2024 at  4:41P -0400,
Christoph Hellwig <hch@lst.de> wrote:

> Use bio_list_merge_init instead of open coding bio_list_merge and
> bio_list_init.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Mike Snitzer <snitzer@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: add a bio_list_merge_init helper
  2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
                   ` (5 preceding siblings ...)
  2024-03-28 12:21 ` Johannes Thumshirn
@ 2024-03-29 18:32 ` Jens Axboe
  6 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2024-03-29 18:32 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Tejun Heo, Josef Bacik, Mike Snitzer, Mikulas Patocka,
	Matthew Sakai, Chris Mason, David Sterba, dm-devel, cgroups,
	linux-block, linux-btrfs


On Thu, 28 Mar 2024 09:41:43 +0100, Christoph Hellwig wrote:
> the bio_list API is missing a helper that reinitializes the list
> spliced onto another one.  Add one to simplify the code similar
> to what the normal list.h can do.
> 
> Diffstat:
>  block/blk-cgroup.c            |    3 +--
>  drivers/md/dm-bio-prison-v2.c |    3 +--
>  drivers/md/dm-cache-target.c  |   12 ++++--------
>  drivers/md/dm-clone-target.c  |   14 +++++---------
>  drivers/md/dm-era-target.c    |    3 +--
>  drivers/md/dm-mpath.c         |    3 +--
>  drivers/md/dm-thin.c          |   12 +++---------
>  drivers/md/dm-vdo/data-vio.c  |    3 +--
>  drivers/md/dm-vdo/flush.c     |    3 +--
>  fs/btrfs/raid56.c             |    3 +--
>  include/linux/bio.h           |    7 +++++++
>  11 files changed, 26 insertions(+), 40 deletions(-)
> 
> [...]

Applied, thanks!

[1/4] block: add a bio_list_merge_init helper
      commit: 872fb30bf89598781d90bd2d6522f230cdf6494d
[2/4] blk-cgroup: use bio_list_merge_init
      commit: e19efc6e5d8ed46f407737033ffc0bdfe0b8dc67
[3/4] dm: use bio_list_merge_init
      commit: d35cd999db51da5706fc4d798b69e189b998ac4f
[4/4] btrfs use bio_list_merge_init
      commit: 5d363e4ee3cf8d4c4bc68956d89dcded30bc7e0c

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-29 18:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28  8:41 add a bio_list_merge_init helper Christoph Hellwig
2024-03-28  8:41 ` [PATCH 1/4] block: " Christoph Hellwig
2024-03-28 18:29   ` Matthew Sakai
2024-03-28  8:41 ` [PATCH 2/4] blk-cgroup: use bio_list_merge_init Christoph Hellwig
2024-03-28  8:41 ` [PATCH 3/4] dm: " Christoph Hellwig
2024-03-29 14:01   ` Mike Snitzer
2024-03-28  8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
2024-03-28 19:16   ` David Sterba
2024-03-28  9:00 ` add a bio_list_merge_init helper Damien Le Moal
2024-03-28 12:21 ` Johannes Thumshirn
2024-03-29 18:32 ` Jens Axboe

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.