Re: [PATCH 2/3] block, dm-crypt, btrfs: Introduce bio_flags()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 14, 2016 at 10:45:36AM +0200, Bart Van Assche wrote:
> Introduce the bio_flags() macro. Ensure that the second argument of
> bio_set_op_attrs() only contains flags and no operation. This patch
> does not change any functionality.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Cc: Mike Christie <mchristi@xxxxxxxxxx>
> Cc: Chris Mason <clm@xxxxxx> (maintainer:BTRFS FILE SYSTEM)
> Cc: Josef Bacik <jbacik@xxxxxx> (maintainer:BTRFS FILE SYSTEM)
> Cc: Mike Snitzer <snitzer@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxx>
> Cc: Damien Le Moal <damien.lemoal@xxxxxxxx>
> ---
>  drivers/md/dm-crypt.c     | 2 +-
>  fs/btrfs/inode.c          | 5 +++--
>  include/linux/blk_types.h | 3 ++-
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
> index 8742957..0448e7e 100644
> --- a/drivers/md/dm-crypt.c
> +++ b/drivers/md/dm-crypt.c
> @@ -1136,7 +1136,7 @@ static void clone_init(struct dm_crypt_io *io, struct bio *clone)
>  	clone->bi_private = io;
>  	clone->bi_end_io  = crypt_endio;
>  	clone->bi_bdev    = cc->dev->bdev;
> -	bio_set_op_attrs(clone, bio_op(io->base_bio), io->base_bio->bi_opf);
> +	bio_set_op_attrs(clone, bio_op(io->base_bio), bio_flags(io->base_bio));

Given that bio_set_op_attrs calls bio_flags internall do we need
the call here as well?

The other option might be to check that we only get flags inside the
bio_flags space and let the caller sort it out, which sounds useful
to me.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux