Re: BUG at fs/btrfs/inode.c:1828! RIP: btrfs_merge_bio_hook+0x8b/0xa0 [btrfs]

2016-04-15 Thread Liu Bo
On Fri, Apr 15, 2016 at 09:28:49AM -0600, Chris Murphy wrote: > Note this is a testing VM, no user data is at risk > > https://bugzilla.kernel.org/show_bug.cgi?id=116331 >From the call stack we can tell that btrfs_root_bytenr() returns 0 somehow. And this comes from btrfs_recover_relocation() re

Re: RAID6, errors at missing device replacement

2016-04-15 Thread Henk Slager
On Fri, Apr 15, 2016 at 9:49 PM, Yauhen Kharuzhy wrote: > Hi. > > I have discovered case when replacement of missing devices causes > metadata corruption. Does anybody know anything about this? I just can confirm that there is corruption when doing replacement for both raid5 and raid6, and not on

btrfrs send ... | ... receive ... stores files sparsely?

2016-04-15 Thread Nicholas D Steeves
Hi, I happened to notice this when checking free space of my backup and primary system. I'll use an example of a file that won't have any private or confidential information. For du -hc ./var/tmp/kdecache-kdmtjNM8H/icon-cache.kcache; ls -alh ./var/tmp/kdecache-kdmtjNM8H/icon-cache.kcache; sha512

RAID6, errors at missing device replacement

2016-04-15 Thread Yauhen Kharuzhy
Hi. I have discovered case when replacement of missing devices causes metadata corruption. Does anybody know anything about this? I use 4.4.5 kernel with latest global spare patches. If we have RAID6 (may be reproducible on RAID5 too) and try to replace one missing drive by other and after this

[PATCH 01/42] block/fs/drivers: remove rw argument from submit_bio

2016-04-15 Thread mchristi
From: Mike Christie This has callers of submit_bio/submit_bio_wait set the bio->bi_rw instead of passing it in. This makes that use the same as generic_make_request and how we set the other bio fields. v5: 1. Missed crypto fs submit_bio_wait call. v2: 1. Set bi_rw instead of ORing it. For clon

Re: [PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-04-15 Thread Mike Snitzer
i_rw. > > This patchset was made against linux-next from today April 15 > (git tag next-20160415). > > I put a git tree here: > https://github.com/mikechristie/linux-kernel.git > The patches are in the op branch. > > v7: > 1. Fix broken feature_flush/fua use. > >

[PATCH 04/42] fs: have submit_bh users pass in op and flags separately

2016-04-15 Thread mchristi
From: Mike Christie This has submit_bh users pass in the operation and flags separately, so submit_bh_wbc can setup bio->bi_op and bio-bi_rw on the bio that is submitted. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bitmap.c

[PATCH 03/42] block, fs, mm, drivers: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the simple bi_rw use cases in the block, drivers, mm and fs code to set the bio->bi_op to a REQ_OP. These should be simple one liner cases, so I just did them in one patch. The next patches handle the more complicated cases in a module per patch. v5: 1. A

[PATCH 02/42] block: add REQ_OP definitions and bi_op/op fields

2016-04-15 Thread mchristi
From: Mike Christie The following patches separate the operation (write, read, discard, etc) from the rq_flag_bits flags. This patch adds definitions for request/bio operations, adds fields to the request/bio to set them, and some temporary compat code so the kernel/modules can use either one. In

[PATCH 07/42] btrfs: have submit_one_bio users setup bio bi_op

2016-04-15 Thread mchristi
From: Mike Christie This patch has btrfs's submit_one_bio callers set the bio->bi_op to a REQ_OP and the bi_rw to rq_flag_bits. The next patches will continue to convert btrfs, so submit_bio_hook and merge_bio_hook related code will be modified to take only the bio. I did not do it in this patch

[PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-04-15 Thread mchristi
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 April 15 (git tag next-20160415). I put a git tree here:

[PATCH 22/42] drbd: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has drbd use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Lars and Philip, I might have split this patch up a little weird. The block layer has compat so you can set either bi_rw or bi_op. This patch handles setting up the bio in drbd. I then converted al

[PATCH 15/42] mpage: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has mpage.c use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/mpage.c | 41 + 1 file changed, 21 insertions(+), 20 d

[PATCH 16/42] nilfs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has nilfs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/nilfs2/segbuf.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff

[PATCH 09/42] btrfs: update __btrfs_map_block for bi_op transition

2016-04-15 Thread mchristi
From: Mike Christie We no longer pass in a bitmap of rq_flag_bits bits to __btrfs_map_block. It will always be a REQ_OP, or the btrfs specific REQ_GET_READ_MIRRORS, so this drops the bit tests. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/bt

[PATCH 18/42] pm: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the pm code use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- kernel/power/swap.c | 31 +++ 1 file changed, 19 insertions(+), 1

[PATCH 26/42] block: copy bio op to request op

2016-04-15 Thread mchristi
From: Mike Christie The bio users should now always be setting up the bio->bi_op. This patch has us copy that to the struct request op field. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 25/42] target: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the target modules use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Nicholas Bellinger --- drivers/target/target_core_iblock.c | 30 +++

[PATCH 23/42] md/raid: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has md use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bitmap.c | 2 +- drivers/md/dm-raid.c | 5 +++-- drivers/md/md.c | 11 +

[PATCH 10/42] btrfs: use bio fields for op and flags

2016-04-15 Thread mchristi
From: Mike Christie The bio bi_op and bi_rw is now setup, so there is no need to pass around the rq_flag_bits bits too. btrfs users should should access the bio. v2: 1. Fix merge_bio issue where instead of removing rw/op argument I passed it in again to the merge_bio related functions. Signed-

[PATCH 13/42] xfs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has xfs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Dave Chinner --- fs/xfs/xfs_aops.c | 3 +-- fs/xfs/xfs_buf.c | 27 +++--

[PATCH 24/42] xen: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the xen block driver use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/xen-blkback/blkback.c | 29 + 1 file chang

[PATCH 19/42] dm: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has dm use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/dm-bufio.c | 8 +++--- drivers/md/dm-crypt.c | 1 + drivers/md/dm-io.

[PATCH 05/42] fs: have ll_rw_block users pass in op and flags separately

2016-04-15 Thread mchristi
From: Mike Christie This has ll_rw_block users pass in the operation and flags separately, so ll_rw_block can setup bio->bi_op and bio-bi_rw on the bio that is submitted. v2: 1. Fix for kbuild error in ll_rw_block comments. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed

[PATCH 21/42] bcache: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has bcache use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bcache/btree.c | 2 ++ drivers/md/bcache/debug.c | 2 ++ drivers/md/bcache/io

[PATCH 11/42] f2fs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has f2fs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/f2fs/checkpoint.c| 10 ++ fs/f2fs/data.c | 33 --

[PATCH 20/42] dm: pass dm stats data dir instead of bi_rw

2016-04-15 Thread mchristi
From: Mike Christie It looks like dm stats cares about the data direction (READ vs WRITE) and does not need the bio/request flags. Commands like REQ_FLUSH, REQ_DISCARD and REQ_WRITE_SAME are currently always set with REQ_WRITE, so the extra check for REQ_DISCARD in dm_stats_account_io is not need

[PATCH 12/42] gfs2: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has gfs2 use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/gfs2/log.c| 8 fs/gfs2/lops.c | 12 +++- fs/gfs2/lops.h |

[PATCH 14/42] hfsplus: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has hfsplus use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/hfsplus/hfsplus_fs.h | 2 +- fs/hfsplus/part_tbl.c | 5 +++-- fs/hfsplus/super.c | 6

[PATCH 17/42] ocfs2: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has ocfs2 use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/ocfs2/cluster/heartbeat.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) dif

[PATCH 08/42] btrfs: set bi_op tp REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has btrfs use the bio bi_op for REQ_OP and bi_rw for rq_flag_bits. v5: - Misset bi_rw to REQ_OP_WRITE in finish_parity_scrub Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/btrfs/check-integrity.c | 19 +-

[PATCH 33/42] block: convert rq_data_dir helper to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie The request->op field is now always setup up with a REQ_OP. This patch has the rq_data_dir helper convert the operation to a WRITE or READ direction based on that. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- include/linux/b

[PATCH 37/42] block, fs, drivers: do use bi_rw/cmd_flags for REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie We no longer use the bio->bi_rw and request->cmd_flags field for REQ_OPs: REQ_WRITE, REQ_DISCARD, REQ_WRITE_SAME, so this patch stops checking for them in bi_rw/cmd_flags and also removes the related compat code. v2: 1. Remove compat code in __get_request. Signed-off-by: Mi

[PATCH 32/42] block: convert is_sync helpers to use REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the is_sync helpers to use separate variables for the operation and flags. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 6 +++--- block/blk-mq.c | 8 block/cfq-io

[PATCH 30/42] blkg_rwstat: separate op from flags

2016-04-15 Thread mchristi
From: Mike Christie The bio and request operation and flags are going to be separate definitions, so we cannot pass them in as a bitmap. This patch converts the blkg_rwstat code and its caller, cfq, to pass in the values separately. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig R

[PATCH 28/42] block: prepare mq request creation to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie This patch modifies the blk mq request creation code to use separate variables for the operation and flags, because in the the next patches the struct request users will be converted like was done for bios. request->op will be used for the REQ_OP and request->cmd_flags for the

[PATCH 40/42] block, drivers: add REQ_OP_FLUSH operation

2016-04-15 Thread mchristi
From: Mike Christie This adds a REQ_OP_FLUSH operation that is sent to request_fn based drivers by the block layer's flush code, instead of sending requests with the request->cmd_flags REQ_FLUSH bit set. For the following 3 flush related patches, I have not tested every driver. I have only teste

[PATCH 35/42] blktrace: get op from req->op/bio->bi_op

2016-04-15 Thread mchristi
From: Mike Christie The bio and request structs now store the operation in bio->bi_op/request->op. This patch has blktrace use that field instead of bi_rw/cmd_flags. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- include/linux/blktrace_api.h |

[PATCH 27/42] block: prepare request creation/destruction code to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie This patch prepares *_get_request/*_put_request and freed_request, to use separate variables for the operation and flags. In the next patches the struct request users will be converted like was done for bios. request->op will be used for the REQ_OP and request->cmd_flags for t

[PATCH 39/42] block: shrink bio/request fields

2016-04-15 Thread mchristi
From: Mike Christie bi_op only needed to be a int for temp compat reasons, so this patch shrinks it to u8. There is no need for bi_rw to be so large now, so that is reduced to a unsigned int and bi_ioprio is just put in its own field. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig

[PATCH 38/42] block, fs: remove old REQ definitions.

2016-04-15 Thread mchristi
From: Mike Christie We no longer use REQ_WRITE. REQ_WRITE_SAME and REQ_DISCARD, so this patch removes them. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- include/linux/blk_types.h | 21 ++--- include/linux/fs.h | 21 ++

[PATCH 29/42] block: prepare elevator to use REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the elevator code to use separate variables for the operation and flags, and to check request->op for the REQ_OP. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 +- block/cfq-io

[PATCH 34/42] drivers: set request op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the block drivers use the request->op for REQ_OP operations and cmd_flags for rq_flag_bits. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/loop.c | 6 +++--- drivers/block/mtip32xx/mt

[PATCH 31/42] block: convert merge/insert code to check for REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the block layer merging code to use separate variables for the operation and flags, and to check request->op for the REQ_OP. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 +- bl

[PATCH 42/42] block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH

2016-04-15 Thread mchristi
From: Mike Christie To avoid confusion between REQ_OP_FLUSH, which is handled by request_fn drivers, and upper layers requesting the block layer perform a flush sequence along with possibly a WRITE, this patch renames REQ_FLUSH to REQ_PREFLUSH. Signed-off-by: Mike Christie Reviewed-by: Christop

[PATCH 36/42] ide cd: do not set REQ_WRITE on requests.

2016-04-15 Thread mchristi
From: Mike Christie The block layer will set the correct READ/WRITE operation flags/fields when creating a request, so there is not need for drivers to set the REQ_WRITE flag. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/ide/ide-cd_ioct

[PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-15 Thread mchristi
From: Mike Christie The last patch added a REQ_OP_FLUSH for request_fn drivers and the next patch renames REQ_FLUSH to REQ_PREFLUSH which will be used by file systems and make_request_fn drivers so they can send a write/flush combo. This patch drops xen's use of REQ_FLUSH to track if it supports

[PATCH 06/42] direct-io: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the dio code set the bio bi_op to a REQ_OP and bio op_flags to rq_flag_bits. It also begins to convert btrfs's dio_submit_t because of the dio submit_io callout use. In the btrfs_submit_direct change, I OR'd the op and flag back together. It is only temporary.

Re: [PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-15 Thread Mike Christie
On 04/15/2016 05:50 AM, Juergen Gross wrote: > On 15/04/16 12:40, mchri...@redhat.com wrote: >> From: Mike Christie >> >> The last patch added a REQ_OP_FLUSH for request_fn drivers >> and the next patch renames REQ_FLUSH to REQ_PREFLUSH which >> will be used by file systems and make_request_fn dri

Re: Uncorrectable errors after rebooting with Magic Sysrq Keys

2016-04-15 Thread Niccolò Belli
https://bpaste.net/show/df9cc097c1da This fs is *completely* FUCKED. Can't wait to get my hands on the external drive to be able to make a full backup. Is it possible it is a kernel 4.6 regression? I had problems before, but nothing like this :( Niccolò -- To unsubscribe from this list: send

Re: Uncorrectable errors after rebooting with Magic Sysrq Keys

2016-04-15 Thread Roman Mamedov
On Fri, 15 Apr 2016 17:42:21 +0200 Niccolò Belli wrote: > Hi, > Is it 100% safe to run a btrfs check without --repair? > Because otherwise I will have to wait for my new external drive to arrive > and make a backup first. In cases like these remember that you can use "blockdev --setro /dev/sdX"

Re: btrfs-image and btrfs send related queries

2016-04-15 Thread Henk Slager
On Fri, Apr 15, 2016 at 2:49 PM, Hugo Mills wrote: > On Fri, Apr 15, 2016 at 12:41:36PM +, sri wrote: >> Hi, >> >> I have couple of queries related to btrfs-image, btrfs send and with >> combination of two. >> 1) >> I would like to know if a btrfs source file system is spread across more >> th

Re: [PATCH v3] btrfs: qgroup: Fix qgroup accounting when creating snapshot

2016-04-15 Thread Mark Fasheh
On Fri, Apr 15, 2016 at 09:00:06AM +0800, Qu Wenruo wrote: > > > Mark Fasheh wrote on 2016/04/14 14:42 -0700: > >Hi Qu, > > > >On Thu, Apr 14, 2016 at 01:38:40PM +0800, Qu Wenruo wrote: > >>Current btrfs qgroup design implies a requirement that after calling > >>btrfs_qgroup_account_extents() the

Re: Uncorrectable errors after rebooting with Magic Sysrq Keys

2016-04-15 Thread Hugo Mills
On Fri, Apr 15, 2016 at 05:42:21PM +0200, Niccolò Belli wrote: > Hi, > Is it 100% safe to run a btrfs check without --repair? > Because otherwise I will have to wait for my new external drive to > arrive and make a backup first. Yes, it's safe, unless there's some underlying hardware problem th

Re: Uncorrectable errors after rebooting with Magic Sysrq Keys

2016-04-15 Thread Niccolò Belli
Hi, Is it 100% safe to run a btrfs check without --repair? Because otherwise I will have to wait for my new external drive to arrive and make a backup first. Thanks, Niccolò On venerdì 15 aprile 2016 11:30:32 CEST, Qu Wenruo wrote: Would you please run "btrfs check --readonly " and paste the

BUG at fs/btrfs/inode.c:1828! RIP: btrfs_merge_bio_hook+0x8b/0xa0 [btrfs]

2016-04-15 Thread Chris Murphy
Note this is a testing VM, no user data is at risk https://bugzilla.kernel.org/show_bug.cgi?id=116331 Gist is this is a new Btrfs file system, and while -o recovery,ro permits mount, it can't be repaired, and btrfs-image fails also. A normal mount results in a call trace, which is what the subjec

Re: btrfs-image and btrfs send related queries

2016-04-15 Thread Hugo Mills
On Fri, Apr 15, 2016 at 12:41:36PM +, sri wrote: > Hi, > > I have couple of queries related to btrfs-image, btrfs send and with > combination of two. > 1) > I would like to know if a btrfs source file system is spread across more > than 1 disks, does btrfs-image require same number of disks

btrfs-image and btrfs send related queries

2016-04-15 Thread sri
Hi, I have couple of queries related to btrfs-image, btrfs send and with combination of two. 1) I would like to know if a btrfs source file system is spread across more than 1 disks, does btrfs-image require same number of disks to create empty file system without files content?? 2) would btr

[PATCH 01/42] block/fs/drivers: remove rw argument from submit_bio

2016-04-15 Thread mchristi
From: Mike Christie This has callers of submit_bio/submit_bio_wait set the bio->bi_rw instead of passing it in. This makes that use the same as generic_make_request and how we set the other bio fields. v5: 1. Missed crypto fs submit_bio_wait call. v2: 1. Set bi_rw instead of ORing it. For clon

[PATCH 00/42] v6: separate operations from flags in the bio/request structs

2016-04-15 Thread mchristi
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 April 15 (git tag next-20160415). I put a git tree here:

[PATCH 04/42] fs: have submit_bh users pass in op and flags separately

2016-04-15 Thread mchristi
From: Mike Christie This has submit_bh users pass in the operation and flags separately, so submit_bh_wbc can setup bio->bi_op and bio-bi_rw on the bio that is submitted. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bitmap.c

[PATCH 02/42] block: add REQ_OP definitions and bi_op/op fields

2016-04-15 Thread mchristi
From: Mike Christie The following patches separate the operation (write, read, discard, etc) from the rq_flag_bits flags. This patch adds definitions for request/bio operations, adds fields to the request/bio to set them, and some temporary compat code so the kernel/modules can use either one. In

[PATCH 13/42] xfs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has xfs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Dave Chinner --- fs/xfs/xfs_aops.c | 3 +-- fs/xfs/xfs_buf.c | 27 +++--

[PATCH 06/42] direct-io: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the dio code set the bio bi_op to a REQ_OP and bio op_flags to rq_flag_bits. It also begins to convert btrfs's dio_submit_t because of the dio submit_io callout use. In the btrfs_submit_direct change, I OR'd the op and flag back together. It is only temporary.

[PATCH 05/42] fs: have ll_rw_block users pass in op and flags separately

2016-04-15 Thread mchristi
From: Mike Christie This has ll_rw_block users pass in the operation and flags separately, so ll_rw_block can setup bio->bi_op and bio-bi_rw on the bio that is submitted. v2: 1. Fix for kbuild error in ll_rw_block comments. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed

Re: [PATCH] btrfs-progs: Check if the FSID was seen by comparing full UUID

2016-04-15 Thread David Sterba
On Thu, Apr 14, 2016 at 03:21:11PM -0700, Yauhen Kharuzhy wrote: > is_seen_fsid() uses simple hash to check if FS was seen before at > walking on FS list in 'filesystem show' command: hash key is first byte > of the UUID. This function doesn't check full UUID then, so, if there > are two FS with sa

[PATCH 03/42] block, fs, mm, drivers: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the simple bi_rw use cases in the block, drivers, mm and fs code to set the bio->bi_op to a REQ_OP. These should be simple one liner cases, so I just did them in one patch. The next patches handle the more complicated cases in a module per patch. v5: 1. A

[PATCH 07/42] btrfs: have submit_one_bio users setup bio bi_op

2016-04-15 Thread mchristi
From: Mike Christie This patch has btrfs's submit_one_bio callers set the bio->bi_op to a REQ_OP and the bi_rw to rq_flag_bits. The next patches will continue to convert btrfs, so submit_bio_hook and merge_bio_hook related code will be modified to take only the bio. I did not do it in this patch

Re: [PATCH] btrfs-progs: Restrict e2fsprogs version for new convert

2016-04-15 Thread David Sterba
On Thu, Apr 14, 2016 at 02:24:34PM +0800, Qu Wenruo wrote: > New btrfs-convert is using a lot of new macro in e2fsprogs 1.42. > Unfortunately the new compatible layer for older e2fsprogs is still > under development. It hasn't been released yet so it's not really a big problem, although it makes t

[PATCH 08/42] btrfs: set bi_op tp REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has btrfs use the bio bi_op for REQ_OP and bi_rw for rq_flag_bits. v5: - Misset bi_rw to REQ_OP_WRITE in finish_parity_scrub Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/btrfs/check-integrity.c | 19 +-

Re: RFE: btrfs subvolume list -t, include marker for snapshots, and whether they are ro

2016-04-15 Thread Austin S. Hemmelgarn
On 2016-04-14 21:55, Chris Murphy wrote: Hi, I'm realizing instead of doing 'btrfs subvolume -t' and then 'btrfs subvolume -tr' and comparing, it would be better if -t just had a column for whether a subvolume is ro. And maybe it's useful to know if a subvolume is a snapshot or not (?). I'm not

[PATCH 10/42] btrfs: use bio fields for op and flags

2016-04-15 Thread mchristi
From: Mike Christie The bio bi_op and bi_rw is now setup, so there is no need to pass around the rq_flag_bits bits too. btrfs users should should access the bio. v2: 1. Fix merge_bio issue where instead of removing rw/op argument I passed it in again to the merge_bio related functions. Signed-

[PATCH 12/42] gfs2: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has gfs2 use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/gfs2/log.c| 8 fs/gfs2/lops.c | 12 +++- fs/gfs2/lops.h |

[PATCH 11/42] f2fs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has f2fs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/f2fs/checkpoint.c| 10 ++ fs/f2fs/data.c | 33 --

[PATCH 15/42] mpage: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has mpage.c use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/mpage.c | 41 + 1 file changed, 21 insertions(+), 20 d

[PATCH 09/42] btrfs: update __btrfs_map_block for bi_op transition

2016-04-15 Thread mchristi
From: Mike Christie We no longer pass in a bitmap of rq_flag_bits bits to __btrfs_map_block. It will always be a REQ_OP, or the btrfs specific REQ_GET_READ_MIRRORS, so this drops the bit tests. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/bt

[PATCH 17/42] ocfs2: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has ocfs2 use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/ocfs2/cluster/heartbeat.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) dif

[PATCH 18/42] pm: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the pm code use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- kernel/power/swap.c | 31 +++ 1 file changed, 19 insertions(+), 1

[PATCH 16/42] nilfs: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has nilfs use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/nilfs2/segbuf.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff

[PATCH 14/42] hfsplus: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has hfsplus use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- fs/hfsplus/hfsplus_fs.h | 2 +- fs/hfsplus/part_tbl.c | 5 +++-- fs/hfsplus/super.c | 6

[PATCH 20/42] dm: pass dm stats data dir instead of bi_rw

2016-04-15 Thread mchristi
From: Mike Christie It looks like dm stats cares about the data direction (READ vs WRITE) and does not need the bio/request flags. Commands like REQ_FLUSH, REQ_DISCARD and REQ_WRITE_SAME are currently always set with REQ_WRITE, so the extra check for REQ_DISCARD in dm_stats_account_io is not need

[PATCH 19/42] dm: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has dm use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/dm-bufio.c | 8 +++--- drivers/md/dm-crypt.c | 1 + drivers/md/dm-io.

[PATCH 21/42] bcache: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has bcache use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bcache/btree.c | 2 ++ drivers/md/bcache/debug.c | 2 ++ drivers/md/bcache/io

[PATCH 23/42] md/raid: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has md use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/bitmap.c | 2 +- drivers/md/dm-raid.c | 5 +++-- drivers/md/md.c | 11 +

[PATCH 22/42] drbd: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has drbd use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Lars and Philip, I might have split this patch up a little weird. The block layer has compat so you can set either bi_rw or bi_op. This patch handles setting up the bio in drbd. I then converted al

[PATCH 25/42] target: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the target modules use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Nicholas Bellinger --- drivers/target/target_core_iblock.c | 30 +++

[PATCH 24/42] xen: set bi_op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the xen block driver use bio->bi_op for REQ_OPs and rq_flag_bits to bio->bi_rw. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/xen-blkback/blkback.c | 29 + 1 file chang

[PATCH 27/42] block: prepare request creation/destruction code to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie This patch prepares *_get_request/*_put_request and freed_request, to use separate variables for the operation and flags. In the next patches the struct request users will be converted like was done for bios. request->op will be used for the REQ_OP and request->cmd_flags for t

[PATCH 26/42] block: copy bio op to request op

2016-04-15 Thread mchristi
From: Mike Christie The bio users should now always be setting up the bio->bi_op. This patch has us copy that to the struct request op field. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 31/42] block: convert merge/insert code to check for REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the block layer merging code to use separate variables for the operation and flags, and to check request->op for the REQ_OP. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 +- bl

[PATCH 28/42] block: prepare mq request creation to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie This patch modifies the blk mq request creation code to use separate variables for the operation and flags, because in the the next patches the struct request users will be converted like was done for bios. request->op will be used for the REQ_OP and request->cmd_flags for the

[PATCH 30/42] blkg_rwstat: separate op from flags

2016-04-15 Thread mchristi
From: Mike Christie The bio and request operation and flags are going to be separate definitions, so we cannot pass them in as a bitmap. This patch converts the blkg_rwstat code and its caller, cfq, to pass in the values separately. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig R

[PATCH 32/42] block: convert is_sync helpers to use REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the is_sync helpers to use separate variables for the operation and flags. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 6 +++--- block/blk-mq.c | 8 block/cfq-io

[PATCH 33/42] block: convert rq_data_dir helper to use REQ_OPs

2016-04-15 Thread mchristi
From: Mike Christie The request->op field is now always setup up with a REQ_OP. This patch has the rq_data_dir helper convert the operation to a WRITE or READ direction based on that. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- include/linux/b

[PATCH 29/42] block: prepare elevator to use REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie This patch converts the elevator code to use separate variables for the operation and flags, and to check request->op for the REQ_OP. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 +- block/cfq-io

[PATCH 36/42] ide cd: do not set REQ_WRITE on requests.

2016-04-15 Thread mchristi
From: Mike Christie The block layer will set the correct READ/WRITE operation flags/fields when creating a request, so there is not need for drivers to set the REQ_WRITE flag. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/ide/ide-cd_ioct

[PATCH 34/42] drivers: set request op to REQ_OP

2016-04-15 Thread mchristi
From: Mike Christie This patch has the block drivers use the request->op for REQ_OP operations and cmd_flags for rq_flag_bits. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/loop.c | 6 +++--- drivers/block/mtip32xx/mt

[PATCH 37/42] block, fs, drivers: do use bi_rw/cmd_flags for REQ_OPs.

2016-04-15 Thread mchristi
From: Mike Christie We no longer use the bio->bi_rw and request->cmd_flags field for REQ_OPs: REQ_WRITE, REQ_DISCARD, REQ_WRITE_SAME, so this patch stops checking for them in bi_rw/cmd_flags and also removes the related compat code. v2: 1. Remove compat code in __get_request. Signed-off-by: Mi

Re: [PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-15 Thread Juergen Gross
On 15/04/16 12:40, mchri...@redhat.com wrote: > From: Mike Christie > > The last patch added a REQ_OP_FLUSH for request_fn drivers > and the next patch renames REQ_FLUSH to REQ_PREFLUSH which > will be used by file systems and make_request_fn drivers so > they can send a write/flush combo. > > T

[PATCH 35/42] blktrace: get op from req->op/bio->bi_op

2016-04-15 Thread mchristi
From: Mike Christie The bio and request structs now store the operation in bio->bi_op/request->op. This patch has blktrace use that field instead of bi_rw/cmd_flags. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- include/linux/blktrace_api.h |

  1   2   >