All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] cleanup bio_kmalloc v3
@ 2022-04-06  6:12 ` Christoph Hellwig
  0 siblings, 0 replies; 32+ messages in thread
From: Christoph Hellwig @ 2022-04-06  6:12 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-bcache, linux-raid, Mike Snitzer, Martin K. Petersen,
	linux-kernel, Josef Bacik, Coly Li, linux-block, Song Liu,
	dm-devel, target-devel, David Sterba, Phillip Lougher,
	linux-btrfs

Hi Jens,

this series finishes off the bio allocation interface cleanups by dealing
with the weirdest member of the famility.  bio_kmalloc combines a kmalloc
for the bio and bio_vecs with a hidden bio_init call and magic cleanup
semantics.

This series moves a few callers away from bio_kmalloc and then turns
bio_kmalloc into a simple wrapper for a slab allocation of a bio and the
inline biovecs.  The callers need to manually call bio_init instead with
all that entails and the magic that turns bio_put into a kfree goes away
as well, allowing for a proper debug check in bio_put that catches
accidental use on a bio_init()ed bio.

Changes since v2:
 - rebased to 5.18-rc1
 - fix bio freeing in squashfs

Changes since v1:
 - update a pre-existing comment per maintainer suggestion

Diffstat:
 block/bio.c                        |   47 ++++++++++++++-----------------------
 block/blk-crypto-fallback.c        |   14 ++++++-----
 block/blk-map.c                    |   42 +++++++++++++++++++++------------
 drivers/block/pktcdvd.c            |   34 +++++++++++---------------
 drivers/md/bcache/debug.c          |   10 ++++---
 drivers/md/dm-bufio.c              |    9 +++----
 drivers/md/raid1.c                 |   12 ++++++---
 drivers/md/raid10.c                |   21 +++++++++++-----
 drivers/target/target_core_pscsi.c |   36 ++++------------------------
 fs/btrfs/disk-io.c                 |    8 +++---
 fs/btrfs/volumes.c                 |   11 --------
 fs/btrfs/volumes.h                 |    2 -
 fs/squashfs/block.c                |   14 +++--------
 include/linux/bio.h                |    2 -
 14 files changed, 116 insertions(+), 146 deletions(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 32+ messages in thread
* [dm-devel] cleanup bio_kmalloc v2
@ 2022-03-08  6:15 Christoph Hellwig
  2022-03-08  6:15 ` [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper Christoph Hellwig
  0 siblings, 1 reply; 32+ messages in thread
From: Christoph Hellwig @ 2022-03-08  6:15 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-bcache, linux-raid, Mike Snitzer, Martin K. Petersen,
	linux-kernel, Josef Bacik, Coly Li, linux-block, Song Liu,
	dm-devel, target-devel, David Sterba, Phillip Lougher,
	linux-btrfs

Hi Jens,

this series finishes off the bio allocation interface cleanups by dealing
with the weirdest member of the famility.  bio_kmalloc combines a kmalloc
for the bio and bio_vecs with a hidden bio_init call and magic cleanup
semantics.

This series moves a few callers away from bio_kmalloc and then turns
bio_kmalloc into a simple wrapper for a slab allocation of a bio and the
inline biovecs.  The callers need to manually call bio_init instead with
all that entails and the magic that turns bio_put into a kfree goes away
as well, allowing for a proper debug check in bio_put that catches
accidental use on a bio_init()ed bio.

Changes since v1:
 - update a pre-existing comment per maintainer suggestion

Diffstat:
 block/bio.c                        |   47 ++++++++++++++-----------------------
 block/blk-crypto-fallback.c        |   14 ++++++-----
 block/blk-map.c                    |   42 +++++++++++++++++++++------------
 drivers/block/pktcdvd.c            |   34 +++++++++++---------------
 drivers/md/bcache/debug.c          |   10 ++++---
 drivers/md/dm-bufio.c              |    9 +++----
 drivers/md/raid1.c                 |   12 ++++++---
 drivers/md/raid10.c                |   21 +++++++++++-----
 drivers/target/target_core_pscsi.c |   36 ++++------------------------
 fs/btrfs/disk-io.c                 |    8 +++---
 fs/btrfs/volumes.c                 |   11 --------
 fs/btrfs/volumes.h                 |    2 -
 fs/squashfs/block.c                |   14 +++--------
 include/linux/bio.h                |    2 -
 14 files changed, 116 insertions(+), 146 deletions(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 32+ messages in thread
* [dm-devel] cleanup bio_kmalloc
@ 2022-03-01  8:45 Christoph Hellwig
  2022-03-01  8:45 ` [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper Christoph Hellwig
  0 siblings, 1 reply; 32+ messages in thread
From: Christoph Hellwig @ 2022-03-01  8:45 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-bcache, linux-raid, Mike Snitzer, Martin K. Petersen,
	linux-kernel, Josef Bacik, Coly Li, linux-block, Song Liu,
	dm-devel, target-devel, David Sterba, Phillip Lougher,
	linux-btrfs

Hi Jens,

this series finishes off the bio allocation interface cleanups by dealing
with the weirdest member of the famility.  bio_kmalloc combines a kmalloc
for the bio and bio_vecs with a hidden bio_init call and magic cleanup
semantics.

This series moves a few callers away from bio_kmalloc and then turns
bio_kmalloc into a simple wrapper for a slab allocation of a bio and the
inline biovecs.  The callers need to manually call bio_init instead with
all that entails and the magic that turns bio_put into a kfree goes away
as well, allowing for a proper debug check in bio_put that catches
accidental use on a bio_init()ed bio.

Diffstat:
 block/bio.c                        |   47 ++++++++++++++-----------------------
 block/blk-crypto-fallback.c        |   14 ++++++-----
 block/blk-map.c                    |   42 +++++++++++++++++++++------------
 drivers/block/pktcdvd.c            |   34 +++++++++++---------------
 drivers/md/bcache/debug.c          |   10 ++++---
 drivers/md/dm-bufio.c              |    9 +++----
 drivers/md/raid1.c                 |   12 ++++++---
 drivers/md/raid10.c                |   21 +++++++++++-----
 drivers/target/target_core_pscsi.c |   36 ++++------------------------
 fs/btrfs/disk-io.c                 |    8 +++---
 fs/btrfs/volumes.c                 |   11 --------
 fs/btrfs/volumes.h                 |    2 -
 fs/squashfs/block.c                |   14 +++--------
 include/linux/bio.h                |    2 -
 14 files changed, 116 insertions(+), 146 deletions(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


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

end of thread, other threads:[~2022-04-18  1:33 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06  6:12 [dm-devel] cleanup bio_kmalloc v3 Christoph Hellwig
2022-04-06  6:12 ` Christoph Hellwig
2022-04-06  6:12 ` [dm-devel] [PATCH 1/5] btrfs: simplify ->flush_bio handling Christoph Hellwig
2022-04-06  6:12   ` Christoph Hellwig
2022-04-06 16:23   ` [dm-devel] " Chaitanya Kulkarni
2022-04-06 16:23     ` Chaitanya Kulkarni
2022-04-06  6:12 ` [dm-devel] [PATCH 2/5] squashfs: always use bio_kmalloc in squashfs_bio_read Christoph Hellwig
2022-04-06  6:12   ` Christoph Hellwig
2022-04-06 16:24   ` [dm-devel] " Chaitanya Kulkarni
2022-04-06 16:24     ` Chaitanya Kulkarni
2022-04-06  6:12 ` [dm-devel] [PATCH 3/5] target/pscsi: remove pscsi_get_bio Christoph Hellwig
2022-04-06  6:12   ` Christoph Hellwig
2022-04-06 16:25   ` [dm-devel] " Chaitanya Kulkarni
2022-04-06 16:25     ` Chaitanya Kulkarni
2022-04-06  6:12 ` [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper Christoph Hellwig
2022-04-06  6:12   ` Christoph Hellwig
2022-04-07  8:16   ` [dm-devel] " Coly Li
2022-04-07  8:16     ` Coly Li
2022-04-13 17:04   ` [dm-devel] " Mike Snitzer
2022-04-13 17:04     ` Mike Snitzer
2022-04-06  6:12 ` [dm-devel] [PATCH 5/5] pktcdvd: stop using bio_reset Christoph Hellwig
2022-04-06  6:12   ` Christoph Hellwig
2022-04-15  4:57 ` [dm-devel] cleanup bio_kmalloc v3 Christoph Hellwig
2022-04-15  4:57   ` Christoph Hellwig
2022-04-18  1:32 ` [dm-devel] " Jens Axboe
2022-04-18  1:32   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2022-03-08  6:15 [dm-devel] cleanup bio_kmalloc v2 Christoph Hellwig
2022-03-08  6:15 ` [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper Christoph Hellwig
2022-03-09  3:06   ` Martin K. Petersen
2022-03-31 21:18   ` Marek Szyprowski
2022-03-31 21:22     ` Jens Axboe
2022-04-01  4:57     ` Christoph Hellwig
2022-03-01  8:45 [dm-devel] cleanup bio_kmalloc Christoph Hellwig
2022-03-01  8:45 ` [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper Christoph Hellwig

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.