Re: [PATCH v3] Btrfs: change how we iterate bios in endio

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

 



On Mon, Jun 12, 2017 at 11:05:12AM -0600, Liu Bo wrote:
> Since dio submit has used bio_clone_fast, the submitted bio may not have a
> reliable bi_vcnt, for the bio vector iterations in checksum related
> functions, bio->bi_iter is not modified yet and it's safe to use
> bio_for_each_segment, while for those bio vector iterations in dio read's
> endio, we now save a copy of bvec_iter in struct btrfs_io_bio when cloning
> bios and use the helper __bio_for_each_segment with the saved bvec_iter to
> access each bvec.
> 
> Also for dio reads which don't get split, we also need to save a copy of
> bio iterator in btrfs_bio_clone to let __bio_for_each_segments to access
> each bvec in dio read's endio.  Note that it doesn't affect other calls of
> btrfs_bio_clone() because they don't need to use this iterator.
> 
> Cc: David Sterba <dsterba@xxxxxxx>
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>
> ---
> v2: Fix null pointer crash in the case of non-split dio reads.

Perfect, thanks. Patch replaced.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux