Commit 60a40096 authored by Mike Christie's avatar Mike Christie Committed by Jens Axboe

ext4: use bio op helprs in ext4 crypto code

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 95fe6c1a
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: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 91148325
...@@ -428,7 +428,7 @@ int ext4_encrypted_zeroout(struct inode *inode, ext4_lblk_t lblk, ...@@ -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_bdev = inode->i_sb->s_bdev;
bio->bi_iter.bi_sector = bio->bi_iter.bi_sector =
pblk << (inode->i_sb->s_blocksize_bits - 9); 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, ret = bio_add_page(bio, ciphertext_page,
inode->i_sb->s_blocksize, 0); inode->i_sb->s_blocksize, 0);
if (ret != inode->i_sb->s_blocksize) { if (ret != inode->i_sb->s_blocksize) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment