Commit 69d1dea8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-5.18/drivers-2022-03-18' of git://git.kernel.dk/linux-block

Pull block driver updates from Jens Axboe:

 - NVMe updates via Christoph:
      - add vectored-io support for user-passthrough (Kanchan Joshi)
      - add verbose error logging (Alan Adamson)
      - support buffered I/O on block devices in nvmet (Chaitanya
        Kulkarni)
      - central discovery controller support (Martin Belanger)
      - fix and extended the globally unique idenfier validation
        (Christoph)
      - move away from the deprecated IDA APIs (Sagi Grimberg)
      - misc code cleanup (Keith Busch, Max Gurtovoy, Qinghua Jin,
        Chaitanya Kulkarni)
      - add lockdep annotations for in-kernel sockets (Chris Leech)
      - use vmalloc for ANA log buffer (Hannes Reinecke)
      - kerneldoc fixes (Chaitanya Kulkarni)
      - cleanups (Guoqing Jiang, Chaitanya Kulkarni, Christoph)
      - warn about shared namespaces without multipathing (Christoph)

 - MD updates via Song with a set of cleanups (Christoph, Mariusz, Paul,
   Erik, Dirk)

 - loop cleanups and queue depth configuration (Chaitanya)

 - null_blk cleanups and fixes (Chaitanya)

 - Use descriptive init/exit names in virtio_blk (Randy)

 - Use bvec_kmap_local() in drivers (Christoph)

 - bcache fixes (Mingzhe)

 - xen blk-front persistent grant speedups (Juergen)

 - rnbd fix and cleanup (Gioh)

 - Misc fixes (Christophe, Colin)

* tag 'for-5.18/drivers-2022-03-18' of git://git.kernel.dk/linux-block: (76 commits)
  virtio_blk: eliminate anonymous module_init & module_exit
  nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
  nvme: remove nvme_alloc_request and nvme_alloc_request_qid
  nvme: cleanup how disk->disk_name is assigned
  nvmet: move the call to nvmet_ns_changed out of nvmet_ns_revalidate
  nvmet: use snprintf() with PAGE_SIZE in configfs
  nvmet: don't fold lines
  nvmet-rdma: fix kernel-doc warning for nvmet_rdma_device_removal
  nvmet-fc: fix kernel-doc warning for nvmet_fc_unregister_targetport
  nvmet-fc: fix kernel-doc warning for nvmet_fc_register_targetport
  nvme-tcp: lockdep: annotate in-kernel sockets
  nvme-tcp: don't fold the line
  nvme-tcp: don't initialize ret variable
  nvme-multipath: call bio_io_error in nvme_ns_head_submit_bio
  nvme-multipath: use vmalloc for ANA log buffer
  xen/blkfront: speed up purge_persistent_grants()
  raid5: initialize the stripe_head embeeded bios as needed
  raid5-cache: statically allocate the recovery ra bio
  raid5-cache: fully initialize flush_bio when needed
  raid5-ppl: fully initialize the bio in ppl_new_iounit
  ...
parents 616355cc ae53aea6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -108,13 +108,13 @@ static void simdisk_submit_bio(struct bio *bio)
	sector_t sector = bio->bi_iter.bi_sector;
	sector_t sector = bio->bi_iter.bi_sector;


	bio_for_each_segment(bvec, bio, iter) {
	bio_for_each_segment(bvec, bio, iter) {
		char *buffer = kmap_atomic(bvec.bv_page) + bvec.bv_offset;
		char *buffer = bvec_kmap_local(&bvec);
		unsigned len = bvec.bv_len >> SECTOR_SHIFT;
		unsigned len = bvec.bv_len >> SECTOR_SHIFT;


		simdisk_transfer(dev, sector, len, buffer,
		simdisk_transfer(dev, sector, len, buffer,
				bio_data_dir(bio) == WRITE);
				bio_data_dir(bio) == WRITE);
		sector += len;
		sector += len;
		kunmap_atomic(buffer);
		kunmap_local(buffer);
	}
	}


	bio_endio(bio);
	bio_endio(bio);
+2 −2
Original line number Original line Diff line number Diff line
@@ -1018,9 +1018,9 @@ bvcpy(struct sk_buff *skb, struct bio *bio, struct bvec_iter iter, long cnt)
	iter.bi_size = cnt;
	iter.bi_size = cnt;


	__bio_for_each_segment(bv, bio, iter, iter) {
	__bio_for_each_segment(bv, bio, iter, iter) {
		char *p = kmap_atomic(bv.bv_page) + bv.bv_offset;
		char *p = bvec_kmap_local(&bv);
		skb_copy_bits(skb, soff, p, bv.bv_len);
		skb_copy_bits(skb, soff, p, bv.bv_len);
		kunmap_atomic(p);
		kunmap_local(p);
		soff += bv.bv_len;
		soff += bv.bv_len;
	}
	}
}
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -2017,10 +2017,10 @@ static int recv_dless_read(struct drbd_peer_device *peer_device, struct drbd_req
	D_ASSERT(peer_device->device, sector == bio->bi_iter.bi_sector);
	D_ASSERT(peer_device->device, sector == bio->bi_iter.bi_sector);


	bio_for_each_segment(bvec, bio, iter) {
	bio_for_each_segment(bvec, bio, iter) {
		void *mapped = kmap(bvec.bv_page) + bvec.bv_offset;
		void *mapped = bvec_kmap_local(&bvec);
		expect = min_t(int, data_size, bvec.bv_len);
		expect = min_t(int, data_size, bvec.bv_len);
		err = drbd_recv_all_warn(peer_device->connection, mapped, expect);
		err = drbd_recv_all_warn(peer_device->connection, mapped, expect);
		kunmap(bvec.bv_page);
		kunmap_local(mapped);
		if (err)
		if (err)
			return err;
			return err;
		data_size -= expect;
		data_size -= expect;
+3 −3
Original line number Original line Diff line number Diff line
@@ -326,9 +326,9 @@ void drbd_csum_bio(struct crypto_shash *tfm, struct bio *bio, void *digest)
	bio_for_each_segment(bvec, bio, iter) {
	bio_for_each_segment(bvec, bio, iter) {
		u8 *src;
		u8 *src;


		src = kmap_atomic(bvec.bv_page);
		src = bvec_kmap_local(&bvec);
		crypto_shash_update(desc, src + bvec.bv_offset, bvec.bv_len);
		crypto_shash_update(desc, src, bvec.bv_len);
		kunmap_atomic(src);
		kunmap_local(src);


		/* REQ_OP_WRITE_SAME has only one segment,
		/* REQ_OP_WRITE_SAME has only one segment,
		 * checksum the payload only once. */
		 * checksum the payload only once. */
+2 −4
Original line number Original line Diff line number Diff line
@@ -2485,11 +2485,9 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
		}
		}


		if (CT(raw_cmd->cmd[COMMAND]) == FD_READ)
		if (CT(raw_cmd->cmd[COMMAND]) == FD_READ)
			memcpy_to_page(bv.bv_page, bv.bv_offset, dma_buffer,
			memcpy_to_bvec(&bv, dma_buffer);
				       size);
		else
		else
			memcpy_from_page(dma_buffer, bv.bv_page, bv.bv_offset,
			memcpy_from_bvec(dma_buffer, &bv);
					 size);


		remaining -= size;
		remaining -= size;
		dma_buffer += size;
		dma_buffer += size;
Loading