linux-next: manual merge of the akpm-current tree with the block tree

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

 



Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in
fs/bio-integrity.c between commits ed2d2f9a8265 ("block: Abstract out
bvec iterator") and 5d1f127c3e0c ("block: Convert bio_for_each_segment()
to bvec_iter") from the block tree and commit 6952c5b3b2b7
("fs/bio-integrity.c: remove duplicated code") from the akpm-current tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc fs/bio-integrity.c
index 31f2d5af7b24,8a78830133ab..000000000000
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@@ -304,26 -295,37 +300,38 @@@ static int bio_integrity_generate_verif
  {
  	struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
  	struct blk_integrity_exchg bix;
 -	struct bio_vec *bv;
 +	struct bio_vec bv;
 +	struct bvec_iter iter;
- 	sector_t sector = bio->bi_iter.bi_sector;
- 	unsigned int sectors, total;
+ 	sector_t sector;
 -	unsigned int i, sectors, total, ret;
++	unsigned int sectors, total, ret;
  	void *prot_buf = bio->bi_integrity->bip_buf;
  
- 	total = 0;
+ 	if (operate)
 -		sector = bio->bi_sector;
++		sector = bio->bi_iter.bi_sector;
+ 	else
 -		sector = bio->bi_integrity->bip_sector;
++		sector = bio->bi_integrity->bip_iter.bi_sector;
+ 
+ 	ret = total = 0;
  	bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
  	bix.sector_size = bi->sector_size;
  
 -	bio_for_each_segment(bv, bio, i) {
 -		void *kaddr = kmap_atomic(bv->bv_page);
 -		bix.data_buf = kaddr + bv->bv_offset;
 -		bix.data_size = bv->bv_len;
 +	bio_for_each_segment(bv, bio, iter) {
 +		void *kaddr = kmap_atomic(bv.bv_page);
 +		bix.data_buf = kaddr + bv.bv_offset;
 +		bix.data_size = bv.bv_len;
  		bix.prot_buf = prot_buf;
  		bix.sector = sector;
- 
- 		bi->generate_fn(&bix);
+ 		if (operate) {
+ 			bi->generate_fn(&bix);
+ 		} else {
+ 			ret = bi->verify_fn(&bix);
+ 			if (ret) {
+ 				kunmap_atomic(kaddr);
+ 				return ret;
+ 			}
+ 		}
  
 -		sectors = bv->bv_len / bi->sector_size;
 +		sectors = bv.bv_len / bi->sector_size;
  		sector += sectors;
  		prot_buf += sectors * bi->tuple_size;
  		total += sectors * bi->tuple_size;

Attachment: pgpu4HmyOKYGf.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux