* [PATCH 0/2] linux-block for-next REQ_OP fixes
@ 2016-06-08 20:49 mchristi
2016-06-08 20:49 ` [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code mchristi
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: mchristi @ 2016-06-08 20:49 UTC (permalink / raw)
To: linux-ext4, linux-block
Hi Jens,
The following patches fix 2 issues from the REQ_OP patch
merge.
They were made over your for-next branch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code
2016-06-08 20:49 [PATCH 0/2] linux-block for-next REQ_OP fixes mchristi
@ 2016-06-08 20:49 ` mchristi
2016-06-08 21:00 ` Jens Axboe
2016-06-08 20:49 ` [PATCH 2/2] mg_disk: fix enum REQ_OP_ kbuild error mchristi
2016-06-08 21:00 ` [PATCH 0/2] linux-block for-next REQ_OP fixes Jens Axboe
2 siblings, 1 reply; 5+ messages in thread
From: mchristi @ 2016-06-08 20:49 UTC (permalink / raw)
To: linux-ext4, linux-block; +Cc: Mike Christie
From: Mike Christie <mchristi@redhat.com>
This was missed from my last patchset.
This patch has ext4 crypto code use the bio op helper
to set the operation. The operation (discard, write, writesame,
etc) is now defined seperately from the other REQ bits. They
still share the bi_rw field to save space, so we use these
helpers so modules do not have to worry about setting/overwriting
info.
Jens, I am not sure how you handle patches on top of patches
in the next branches. If you merge patches that fix issues
in previous patches in next, then this patch could be part
of
commit 95fe6c1a209ef89d9f94dd04a0ad72be1487d5d5
Author: Mike Christie <mchristi@redhat.com>
Date: Sun Jun 5 14:31:48 2016 -0500
block, fs, mm, drivers: use bio set/get op accessors
Signed-off-by: Mike Christie <mchristi@redhat.com>
---
fs/ext4/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 811bd5d..d3fa47c 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -428,7 +428,7 @@ int ext4_encrypted_zeroout(struct inode *inode, ext4_lblk_t lblk,
bio->bi_bdev = inode->i_sb->s_bdev;
bio->bi_iter.bi_sector =
pblk << (inode->i_sb->s_blocksize_bits - 9);
- bio->bi_rw = WRITE;
+ bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
ret = bio_add_page(bio, ciphertext_page,
inode->i_sb->s_blocksize, 0);
if (ret != inode->i_sb->s_blocksize) {
--
2.7.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] mg_disk: fix enum REQ_OP_ kbuild error
2016-06-08 20:49 [PATCH 0/2] linux-block for-next REQ_OP fixes mchristi
2016-06-08 20:49 ` [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code mchristi
@ 2016-06-08 20:49 ` mchristi
2016-06-08 21:00 ` [PATCH 0/2] linux-block for-next REQ_OP fixes Jens Axboe
2 siblings, 0 replies; 5+ messages in thread
From: mchristi @ 2016-06-08 20:49 UTC (permalink / raw)
To: linux-ext4, linux-block; +Cc: Mike Christie
From: Mike Christie <mchristi@redhat.com>
Because we define WRITE/READ as REQ_OPs, we cannot do
switch (rq_data_dir(request))
case READ
....
case WRITE
...
without getting warnings about handling other REQ_OPs.
This just has mq_disk do a if/else like it does in other
places.
Signed-off-by: Mike Christie <mchristi@redhat.com>
---
drivers/block/mg_disk.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 145ce2a..1ee3918 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -687,15 +687,13 @@ static unsigned int mg_issue_req(struct request *req,
unsigned int sect_num,
unsigned int sect_cnt)
{
- switch (rq_data_dir(req)) {
- case READ:
+ if (rq_data_dir(req) == READ) {
if (mg_out(host, sect_num, sect_cnt, MG_CMD_RD, &mg_read_intr)
!= MG_ERR_NONE) {
mg_bad_rw_intr(host);
return host->error;
}
- break;
- case WRITE:
+ } else {
/* TODO : handler */
outb(ATA_NIEN, (unsigned long)host->dev_base + MG_REG_DRV_CTRL);
if (mg_out(host, sect_num, sect_cnt, MG_CMD_WR, &mg_write_intr)
@@ -714,7 +712,6 @@ static unsigned int mg_issue_req(struct request *req,
mod_timer(&host->timer, jiffies + 3 * HZ);
outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
MG_REG_COMMAND);
- break;
}
return MG_ERR_NONE;
}
--
2.7.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code
2016-06-08 20:49 ` [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code mchristi
@ 2016-06-08 21:00 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2016-06-08 21:00 UTC (permalink / raw)
To: mchristi, linux-ext4, linux-block
On 06/08/2016 02:49 PM, mchristi@redhat.com wrote:
> From: Mike Christie <mchristi@redhat.com>
>
> This was missed from my last patchset.
>
> This patch has ext4 crypto code use the bio op helper
> to set the operation. The operation (discard, write, writesame,
> etc) is now defined seperately from the other REQ bits. They
> still share the bi_rw field to save space, so we use these
> helpers so modules do not have to worry about setting/overwriting
> info.
>
> Jens, I am not sure how you handle patches on top of patches
> in the next branches. If you merge patches that fix issues
> in previous patches in next, then this patch could be part
> of
Since it's all merged, there's only one way to handle it - and that's to
apply this on top. I can't fold patches at this point.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] linux-block for-next REQ_OP fixes
2016-06-08 20:49 [PATCH 0/2] linux-block for-next REQ_OP fixes mchristi
2016-06-08 20:49 ` [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code mchristi
2016-06-08 20:49 ` [PATCH 2/2] mg_disk: fix enum REQ_OP_ kbuild error mchristi
@ 2016-06-08 21:00 ` Jens Axboe
2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2016-06-08 21:00 UTC (permalink / raw)
To: mchristi, linux-ext4, linux-block
On 06/08/2016 02:49 PM, mchristi@redhat.com wrote:
> Hi Jens,
>
> The following patches fix 2 issues from the REQ_OP patch
> merge.
>
> They were made over your for-next branch.
Added, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-08 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 20:49 [PATCH 0/2] linux-block for-next REQ_OP fixes mchristi
2016-06-08 20:49 ` [PATCH 1/2] ext4: use bio op helprs in ext4 crypto code mchristi
2016-06-08 21:00 ` Jens Axboe
2016-06-08 20:49 ` [PATCH 2/2] mg_disk: fix enum REQ_OP_ kbuild error mchristi
2016-06-08 21:00 ` [PATCH 0/2] linux-block for-next REQ_OP fixes Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).