Skip to content

separate operations from flags in the bio/request structs

[email protected] dm-devel drbd-dev linux-bcache linux-btrfs linux-ext4 linux-f2fs-devel linux-fsdevel linux-mtd linux-raid linux-scsi linux-xfs lkml ocfs2-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest35 patches 2 repliesIn review
  2. v335 patches 1 replySuperseded
  3. v235 patches 18 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC32 patches11 repliesSuperseded

Changes in v4 from the cover letter

1. Rebased to current linux-next tree.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/35block/fs/drivers: remove rw argument from submit_bioblock/bio.c block/blk-core.c block/blk-flush.c +49 more+212 -1410 replies
2/35block: add REQ_OP definitions and bi_op/op fieldsblock/blk-core.c include/linux/blk_types.h include/linux/blkdev.h +1 more+66 -60 replies
3/35block, fs, mm, drivers: set bi_op to REQ_OPblock/bio.c block/blk-flush.c block/blk-lib.c +14 more+41 -330 replies
4/35fs: have submit_bh users pass in op and flags separatelydrivers/md/bitmap.c fs/btrfs/check-integrity.c fs/btrfs/check-integrity.h +27 more+103 -960 replies
5/35fs: have ll_rw_block users pass in op and flags separatelyfs/buffer.c fs/ext4/inode.c fs/ext4/namei.c +18 more+40 -380 replies
6/35direct-io: set bi_op to REQ_OPfs/btrfs/inode.c fs/direct-io.c include/linux/fs.h+27 -190 replies
7/35btrfs: have submit_one_bio users setup bio bi_opfs/btrfs/extent_io.c+45 -430 replies
8/35btrfs: set bi_op tp REQ_OPfs/btrfs/check-integrity.c fs/btrfs/compression.c fs/btrfs/disk-io.c +4 more+50 -390 replies
9/35btrfs: update __btrfs_map_block for bi_op transitionfs/btrfs/extent-tree.c fs/btrfs/inode.c fs/btrfs/volumes.c +1 more+34 -290 replies
10/35btrfs: don't pass rq_flag_bits if there is a biofs/btrfs/compression.c fs/btrfs/ctree.h fs/btrfs/disk-io.c +6 more+53 -660 replies
11/35f2fs: set bi_op to REQ_OPfs/f2fs/checkpoint.c fs/f2fs/data.c fs/f2fs/f2fs.h +6 more+74 -450 replies
12/35gfs2: set bi_op to REQ_OPfs/gfs2/log.c fs/gfs2/lops.c fs/gfs2/lops.h +2 more+18 -130 replies
13/35xfs: set bi_op to REQ_OPfs/xfs/xfs_aops.c fs/xfs/xfs_buf.c+17 -130 replies
14/35hfsplus: set bi_op to REQ_OPfs/hfsplus/hfsplus_fs.h fs/hfsplus/part_tbl.c fs/hfsplus/super.c +1 more+17 -110 replies
15/35mpage: set bi_op to REQ_OPfs/mpage.c+21 -200 replies
16/35nilfs: set bi_op to REQ_OPfs/nilfs2/segbuf.c+10 -80 replies
17/35ocfs2: set bi_op to REQ_OPfs/ocfs2/cluster/heartbeat.c+7 -40 replies
18/35pm: set bi_op to REQ_OPkernel/power/swap.c+19 -120 replies
19/35dm: set bi_op to REQ_OPdrivers/md/dm-bufio.c drivers/md/dm-crypt.c drivers/md/dm-io.c +8 more+82 -660 replies
20/35dm: pass dm stats data dir instead of bi_rwdrivers/md/dm-stats.c drivers/md/dm.c+16 -140 replies
21/35bcache: set bi_op to REQ_OPdrivers/md/bcache/btree.c drivers/md/bcache/debug.c drivers/md/bcache/io.c +5 more+32 -220 replies
22/35drbd: set bi_op to REQ_OPdrivers/block/drbd/drbd_actlog.c drivers/block/drbd/drbd_bitmap.c drivers/block/drbd/drbd_int.h +3 more+51 -330 replies
23/35md/raid: set bi_op to REQ_OPdrivers/md/bitmap.c drivers/md/dm-raid.c drivers/md/md.c +5 more+101 -770 replies
24/35xen: set bi_op to REQ_OPdrivers/block/xen-blkback/blkback.c+17 -120 replies
25/35target: set bi_op to REQ_OPdrivers/target/target_core_iblock.c drivers/target/target_core_pscsi.c+24 -160 replies
26/35block: set op to REQ_OPblock/blk-core.c block/blk-flush.c block/blk-merge.c +6 more+120 -950 replies
27/35drivers: set request op to REQ_OPdrivers/block/loop.c drivers/block/mtip32xx/mtip32xx.c drivers/block/nbd.c +10 more+44 -380 replies
28/35blktrace: get op from req->op/bio->bi_opinclude/linux/blktrace_api.h include/trace/events/bcache.h include/trace/events/block.h +1 more+57 -400 replies
29/35ide cd: do not set REQ_WRITE on requests.drivers/ide/ide-cd_ioctl.c+0 -30 replies
30/35block, fs, drivers: do not test bi_rw for REQ_OPsblock/bio.c block/blk-core.c block/blk-merge.c +27 more+100 -1150 replies
31/35block, fs: remove old REQ definitions.include/linux/blk_types.h include/linux/fs.h include/trace/events/f2fs.h+17 -260 replies
32/35block: shrink bi_rw and bi_opblock/blk-core.c drivers/md/dm-flakey.c drivers/md/raid5.c +5 more+18 -310 replies
33/35block, drivers: add REQ_OP_FLUSH operationDocumentation/block/writeback_cache_control.txt arch/um/drivers/ubd_kern.c block/blk-flush.c +17 more+37 -320 replies
34/35block: add QUEUE_FLAGs for flush and fuaarch/um/drivers/ubd_kern.c block/blk-core.c block/blk-flush.c +22 more+108 -950 replies
35/35block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSHDocumentation/block/writeback_cache_control.txt Documentation/device-mapper/log-writes.txt block/blk-core.c +36 more+107 -1020 replies

Reviews trailers per patch

3 of 35 patches have a Reviewed-by or Acked-by.

PatchBart Van AsscheChristoph HellwigDave ChinnerNicholas Bellinger
1/35R-b R-b
2/35
3/35
4/35
5/35
6/35
7/35
8/35
9/35
10/35
11/35
12/35
13/35A-b
14/35
15/35
16/35
17/35
18/35
19/35
20/35
21/35
22/35
23/35
24/35
25/35A-b
26/35
27/35
28/35
29/35
30/35
31/35
32/35
33/35
34/35
35/35

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

Read the v4 thread

Cover letter [PATCH 00/35 v4] separate operations from flags in the bio/request structs

The following patches begin to cleanup the request->cmd_flags and bio->bi_rw mess. We currently use cmd_flags to specify the operation, attributes and state of the request. For bi_rw we use it for similar info and also the priority but then also have another bi_flags field for state. At some point, we abused them so much we just made cmd_flags 64 bits, so we could add more.

The following patches seperate the operation (read, write discard, flush, etc) from cmd_flags/bi_rw.

This patchset was made against linux-next from today Feb 24 2016 (git tag next-20160224).

I put a git tree here:
https://github.com/mikechristie/linux-kernel.git

v4:
1. Rebased to current linux-next tree.

v3:

1. Used "=" instead of "|=" to setup bio bi_rw.
2. Removed __get_request cmd_flags compat code.
3. Merged initial dm related changes requested by Mike Snitzer.
4. Fixed ubd kbuild errors in flush related patches.
5. Fix 80 char col issues in several patches.
6. Fix issue with one of the btrfs patches where it looks like I reverted a patch when trying to fix a merge error.

v2

1. Dropped arguments from submit_bio, and had callers setup bio.
2. Add REQ_OP_FLUSH for request_fn users and renamed REQ_FLUSH to REQ_PREFLUSH for make_request_fn users.
3. Dropped bio/rq_data_dir functions, and added a op_is_write function instead.