diff options
author | David S. Miller <davem@davemloft.net> | 2014-02-19 10:24:22 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-19 10:24:22 +0400 |
commit | 1e8d6421cff2c24fe0b345711e7a21af02e8bcf5 (patch) | |
tree | 773b30106efb9b48055bc93958e5a94ac53768ce /include/linux/bio.h | |
parent | f7b12606b5de323a2bb5ca1696558efde8f25441 (diff) | |
parent | 960dfc4eb23a28495276b02604d7458e0e1a1ed8 (diff) | |
download | linux-1e8d6421cff2c24fe0b345711e7a21af02e8bcf5.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/bonding/bond_3ad.h
drivers/net/bonding/bond_main.c
Two minor conflicts in bonding, both of which were overlapping
changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 70654521dab6..5a4d39b4686b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -250,6 +250,17 @@ static inline unsigned bio_segments(struct bio *bio) struct bio_vec bv; struct bvec_iter iter; + /* + * We special case discard/write same, because they interpret bi_size + * differently: + */ + + if (bio->bi_rw & REQ_DISCARD) + return 1; + + if (bio->bi_rw & REQ_WRITE_SAME) + return 1; + bio_for_each_segment(bv, bio, iter) segs++; @@ -332,6 +343,7 @@ extern struct bio *bio_clone_fast(struct bio *, gfp_t, struct bio_set *); extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs); extern struct bio_set *fs_bio_set; +unsigned int bio_integrity_tag_size(struct bio *bio); static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs) { |