Skip to content

Reduce code duplication

Bart Van Assche linux-block 2 versions – Applied

Status from this message: Applied, thanks Bart.

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 7 repliesSuperseded

Changes in v2 from the cover letter

- Converted ternary operators into an if/then/else-sequence.
- Used EXPORT_SYMBOL_GPL() to export block layer internals.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5block: Export blk_init_request_from_bio()block/blk-core.c block/blk-mq.c block/blk.h +1 more+5 -41 reply
2/5null_blk: Use blk_init_request_from_bio() instead of open-coding itdrivers/block/null_blk.c+1 -81 reply
3/5lightnvm: Use blk_init_request_from_bio() instead of open-coding itdrivers/nvme/host/lightnvm.c+1 -51 reply
4/5block: Inline blk_rq_set_prio()block/blk-core.c include/linux/blkdev.h+6 -151 reply
5/5block: Optimize ioprio_best()block/ioprio.c+1 -110 replies

Reviews trailers per patch

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

PatchChristoph HellwigAdam ManzanaresJohannes Thumshirn
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b T-b R-b
5/5R-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/5] Reduce code duplication

Hello Jens,

This series contains three patches intended to reduce code duplication and two patches that simplify / optimize I/O priority handling. Please consider these patches for kernel v4.12.

Thanks,

Bart.

Changes compared to v1:
- Converted ternary operators into an if/then/else-sequence.
- Used EXPORT_SYMBOL_GPL() to export block layer internals.

Bart Van Assche (5):
block: Export blk_init_request_from_bio()
null_blk: Use blk_init_request_from_bio() instead of open-coding it
lightnvm: Use blk_init_request_from_bio() instead of open-coding it
block: Inline blk_rq_set_prio()
block: Optimize ioprio_best()

 block/blk-core.c             | 12 +++++++++---
 block/blk-mq.c               |  2 +-
 block/blk.h                  |  1 -
 block/ioprio.c               | 12 +-----------
 drivers/block/null_blk.c     |  9 +--------
 drivers/nvme/host/lightnvm.c |  6 +-----
 include/linux/blkdev.h       | 15 +--------------
 7 files changed, 14 insertions(+), 43 deletions(-)
Signature · 1 line
2.12.2