Skip to content

Remove of blk_rq_append_bio usage

Boaz Harrosh linux-scsi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5blk_rq_map_pages() new APIblock/blk-map.c include/linux/blkdev.h+57 -00 replies
2/5libosd: Rename osd_req_write/read to osd_req_write/read_olddrivers/scsi/osd/osd_initiator.c fs/exofs/common.h include/scsi/osd_initiator.h+10 -20 replies
3/5libosd: No bio for youdrivers/scsi/osd/osd_initiator.c include/scsi/osd_initiator.h+88 -520 replies
4/5exofs: No bio for youfs/exofs/common.h fs/exofs/inode.c+55 -570 replies
5/5libosd: Remove deprecated bio based APIdrivers/scsi/osd/osd_initiator.c include/scsi/osd_initiator.h+0 -200 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFD] [PATCHSETS 0/2 0/2 0/5] Remove of blk_rq_append_bio usage

Hi all

In an effort to remove blk_rq_append_bio() and only use well published block API, I would like to propose the below solution for OSD and exofs.

Current discussion has two sides:
* blk_make_request():
exofs and other non-block-based filesystems can use a bio, in which case a well established block API should allow of allocating a request given a bio.

* blk_rq_map_pages():
Let filesystems submit an array of page-pointers, and refrain from using bio(s). bio(s) is a privilege of block-based filesystems only.

The first solution is trivial, robust, safe with minimum changes and impact. It will allow any future directions easily.

I have also implemented a second approach with the use of a new blk_rq_map_pages. It works, all exofs tests pass successfully just as with today's code. But I hate it because:
* Jeff Garzik is working on a block-over-osd-object block-device. I'm not sure of his plans, but sitting under block-layer at it's prepare_fn routine, the most trivial solution is to pass the bio as is to libosd. Otherwise he will need to copy and recopy all these pages information.
Jeff please comment.
* Use of the in-kernel raid engines.
Current dm-raid engines are heavily bio based. If we want to tap into-that (And we must) from exofs and pNFS-objects-layout we have no choice but to use bio(s) and be able to submit bios.
* For any none trivial usage, even today. bio is more stable, robust faster. and less code since it is already there.

Here is some code:
[PATCHSET 0/2] Allow append of kernel pointers to request
[PATCH 1/4] allow blk_rq_map_kern to append to requests [PATCH 2/4] libosd: Use new blk_rq_map_kern

These two patches are not disputable and safe and should go in as is even to 2.6.30. They remove one usage of blk_rq_append_bio from the osd_initiator.

[PROPOSAL_1 0/2] blk_make_request()
[PATCH 3/4] [RFC] Export new blk_make_request() which takes bio and returns request [PATCH 4/4] libosd: Use of new blk_make_request

This is option one above. Trivial, cosmetic, no core changes.

[PROPOSAL_2 0/5] blk_rq_map_pages()
[RFC 1/5] blk_rq_map_pages() new API
[RFC 2/5] libosd: Rename osd_req_write/read to osd_req_write/read_old [RFC 3/5] libosd: No bio for you
[RFC 4/5] exofs: No bio for you
[RFC 5/5] libosd: Remove deprecated bio based API

This is option two above. Needs lots of core changes to exofs. After patch 5/5 code runs well, all tests pass. There is runtime bisectability problem, the exofs will not run between [3/5]-[4/5].

Please advise
Boaz