On Tue, Oct 02, 2012 at 03:24:34PM -0400, Vivek Goyal wrote: > On Mon, Sep 24, 2012 at 03:34:49PM -0700, Kent Overstreet wrote: > > [..] > > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > > index 95e52879..24e5cef 100644 > > --- a/drivers/block/floppy.c > > +++ b/drivers/block/floppy.c > > @@ -3778,7 +3778,6 @@ static int __floppy_read_block_0(struct block_device *bdev) > > bio_vec.bv_len = size; > > bio_vec.bv_offset = 0; > > bio.bi_vcnt = 1; > > - bio.bi_idx = 0; > > So leaving bio.bi_idx uninitialized is safer than setting it to zero? Can > you explain a bit more that why this change is required? It's not uninitialized, because it just called bio_init() - it was entirely redundant before. It's not strictly necessary, but immutable bio vecs require getting rid of a lot of bi_idx usage, and everything that's left is either unecessary or better/cleaner done some other way, so it's best to just get rid of all of them - immutable bvecs changes the semantics of bi_idx just enough that directly using it tends to be wrong. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel