Skip to content

md: use bio_clone_fast()

Ming Lei linux-block linux-raid lkml 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 5 repliesApplied
  2. v15 patches 9 repliesSuperseded

Changes in v2 from the cover letter

1) move 3rd patch into 2nd one
2) kill bio_clone_mddev() and use bio_clone_fast() directly
3) define local variable 'offset' as sector_t in raid1_write_request()

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5block: introduce bio_clone_bioset_partial()block/bio.c include/linux/bio.h+57 -150 replies
2/5md: fail if mddev->bio_set can't be createddrivers/md/md.c+4 -10 replies
3/5md/raid1: use bio_clone_bioset_partial() in case of write behinddrivers/md/raid1.c+15 -50 replies
4/5md: remove unnecessary check on mddevdrivers/md/md.c+0 -30 replies
5/5md: fast clone bio in bio_clone_mddev()drivers/md/faulty.c drivers/md/md.c drivers/md/md.h +3 more+14 -223 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchReviewed-by: Christoph Hellwig
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] md: use bio_clone_fast()

Hi,

This patches replaces bio_clone() with bio_fast_clone() in bio_clone_mddev() because:

1) bio_clone_mddev() is used in raid normal I/O and isn't in resync I/O path, and all the direct access to bvec table in raid happens on resync I/O only except for write behind of raid1. Write behind is treated specially, so the replacement is safe.

2) for write behind, bio_clone() is kept, but this patchset introduces bio_clone_bioset_partial() to just clone one specific bvecs range instead of whole table. Then write behind is improved too.

V2:
1) move 3rd patch into 2nd one
2) kill bio_clone_mddev() and use bio_clone_fast() directly
3) define local variable 'offset' as sector_t in raid1_write_request()

V1:
1) don't introduce bio_clone_slow_mddev_partial()
2) return failure if mddev->bio_set can't be created
3) remove check in bio_clone_mddev() as suggested by Christoph Hellwig.
4) rename bio_clone_mddev() as bio_clone_fast_mddev()

Ming Lei (5):
block: introduce bio_clone_bioset_partial()
md: fail if mddev->bio_set can't be created
md/raid1: use bio_clone_bioset_partial() in case of write behind
md: remove unnecessary check on mddev
md: fast clone bio in bio_clone_mddev()

 block/bio.c         | 61 +++++++++++++++++++++++++++++++++++++++++------------
 drivers/md/faulty.c |  2 +-
 drivers/md/md.c     | 15 ++++---------
 drivers/md/md.h     |  2 --
 drivers/md/raid1.c  | 28 +++++++++++++++++-------
 drivers/md/raid10.c | 11 +++++-----
 drivers/md/raid5.c  |  4 ++--
 include/linux/bio.h | 11 ++++++++--
 8 files changed, 89 insertions(+), 45 deletions(-)
Signature · 1 line
2.7.4