Skip to content

md: use bio_clone_fast()

Ming Lei linux-block linux-raid lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4block: introduce bio_clone_bioset_partial()block/bio.c include/linux/bio.h+57 -150 replies
2/4md: introduce bio_clone_slow_mddev_partial()drivers/md/md.c drivers/md/md.h+19 -01 reply
3/4md/raid1: use bio_clone_slow_mddev_partial in case of write behinddrivers/md/raid1.c+16 -50 replies
4/4md: fast clone bio in bio_clone_mddev()drivers/md/md.c+6 -23 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] 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.

Thanks,
Ming

Ming Lei (4):
block: introduce bio_clone_bioset_partial()
md: introduce bio_clone_slow_mddev_partial()
md/raid1: use bio_clone_slow_mddev_partial in case of write behind
md: fast clone bio in bio_clone_mddev()

 block/bio.c         | 61 +++++++++++++++++++++++++++++++++++++++++------------
 drivers/md/md.c     | 24 +++++++++++++++++++--
 drivers/md/md.h     |  3 +++
 drivers/md/raid1.c  | 21 +++++++++++++-----
 include/linux/bio.h | 11 ++++++++--
 5 files changed, 98 insertions(+), 22 deletions(-)
Signature · 1 line
2.7.4