Skip to content

block: introduce helpers for allocating io buffer from slab

Ming Lei linux-block linux-fsdevel linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5block: warn on un-aligned DMA IO bufferblock/blk-merge.c+2 -010 replies
2/5block: move .dma_alignment into q->limitsblock/blk-settings.c include/linux/blkdev.h+5 -52 replies
3/5block: make dma_alignment as stacked limitblock/blk-settings.c+50 -391 reply
4/5block: introduce helpers for allocating IO buffers from slabblock/Makefile block/blk-core.c block/blk-sec-buf.c +2 more+196 -16 replies
5/5xfs: use block layer helpers to allocate io buffer from slabfs/xfs/xfs_buf.c fs/xfs/xfs_super.c+37 -40 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigBart Van Assche
1/5R-b
2/5R-b R-b
3/5
4/5
5/5

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

Read the v1 thread

Cover letter [PATCH 0/5] block: introduce helpers for allocating io buffer from slab

Hi,

Filesystems may allocate io buffer from slab, and use this buffer to submit bio. This way may break storage drivers if they have special requirement on DMA alignment.

The patch 1 adds one warning if the io buffer isn't aligned to DMA alignment.

The 2nd & 3rd patches make DMA alignment as stacked limit.

The 4th patch introduces helpers for allocating io buffer from slab, and DMA alignment is respected on this allocation.

The 5th patch converts xfs to use the introduced helpers for allocating io buffer from slab.

See previous discussion on this topic:

https://marc.info/?t=153734857500004&r=1&w=2

Thanks,
Ming

Ming Lei (5):
block: warn on un-aligned DMA IO buffer
block: move .dma_alignment into q->limits
block: make dma_alignment as stacked limit
block: introduce helpers for allocating IO buffers from slab
xfs: use block layer helpers to allocate io buffer from slab

 block/Makefile              |   3 +-
 block/blk-core.c            |   2 +
 block/blk-merge.c           |   2 +
 block/blk-sec-buf.c         | 144 ++++++++++++++++++++++++++++++++++++++++++++
 block/blk-settings.c        |  89 +++++++++++++++------------
 fs/xfs/xfs_buf.c            |  28 ++++++++-
 fs/xfs/xfs_super.c          |  13 +++-
 include/linux/blk-sec-buf.h |  43 +++++++++++++
 include/linux/blkdev.h      |   9 ++-
 9 files changed, 287 insertions(+), 46 deletions(-)
 create mode 100644 block/blk-sec-buf.c
 create mode 100644 include/linux/blk-sec-buf.h
Cc Vitaly Kuznetsov <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Linux FS Devel <[email protected]>
Cc Darrick J. Wong <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Matthew Wilcox <[email protected]>
Signature · 1 line
2.9.5