Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77072ca5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-20180623' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

 - Further timeout fixes. We aren't quite there yet, so expect another
   round of fixes for that to completely close some of the IRQ vs
   completion races. (Christoph/Bart)

 - Set of NVMe fixes from the usual suspects, mostly error handling

 - Two off-by-one fixes (Dan)

 - Another bdi race fix (Jan)

 - Fix nbd reconfigure with NBD_DISCONNECT_ON_CLOSE (Doron)

* tag 'for-linus-20180623' of git://git.kernel.dk/linux-block:
  blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
  bdi: Fix another oops in wb_workfn()
  lightnvm: Remove depends on HAS_DMA in case of platform dependency
  nvme-pci: limit max IO size and segments to avoid high order allocations
  nvme-pci: move nvme_kill_queues to nvme_remove_dead_ctrl
  nvme-fc: release io queues to allow fast fail
  nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
  block: sed-opal: Fix a couple off by one bugs
  blk-mq-debugfs: Off by one in blk_mq_rq_state_name()
  nvmet: reset keep alive timer in controller enable
  nvme-rdma: don't override opts->queue_size
  nvme-rdma: Fix command completion race at error recovery
  nvme-rdma: fix possible free of a non-allocated async event buffer
  nvme-rdma: fix possible double free condition when failing to create a controller
  Revert "block: Add warning for bi_next not NULL in bio_endio()"
  block: fix timeout changes for legacy request drivers
parents 2dd3f7c9 f5e350f0
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1807,9 +1807,6 @@ void bio_endio(struct bio *bio)
	if (!bio_integrity_endio(bio))
		return;

	if (WARN_ONCE(bio->bi_next, "driver left bi_next not NULL"))
		bio->bi_next = NULL;

	/*
	 * Need to have a real endio function for chained bios, otherwise
	 * various corner cases will break (like stacking block devices that
+1 −7
Original line number Diff line number Diff line
@@ -273,10 +273,6 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
	bio_advance(bio, nbytes);

	/* don't actually finish bio if it's part of flush sequence */
	/*
	 * XXX this code looks suspicious - it's not consistent with advancing
	 * req->bio in caller
	 */
	if (bio->bi_iter.bi_size == 0 && !(rq->rq_flags & RQF_FLUSH_SEQ))
		bio_endio(bio);
}
@@ -3081,10 +3077,8 @@ bool blk_update_request(struct request *req, blk_status_t error,
		struct bio *bio = req->bio;
		unsigned bio_bytes = min(bio->bi_iter.bi_size, nr_bytes);

		if (bio_bytes == bio->bi_iter.bi_size) {
		if (bio_bytes == bio->bi_iter.bi_size)
			req->bio = bio->bi_next;
			bio->bi_next = NULL;
		}

		/* Completion has already been traced */
		bio_clear_flag(bio, BIO_TRACE_COMPLETION);
+1 −1
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ static const char *const blk_mq_rq_state_name_array[] = {

static const char *blk_mq_rq_state_name(enum mq_rq_state rq_state)
{
	if (WARN_ON_ONCE((unsigned int)rq_state >
	if (WARN_ON_ONCE((unsigned int)rq_state >=
			 ARRAY_SIZE(blk_mq_rq_state_name_array)))
		return "(?)";
	return blk_mq_rq_state_name_array[rq_state];
+0 −1
Original line number Diff line number Diff line
@@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
		WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
	}

	req->rq_flags &= ~RQF_TIMED_OUT;
	blk_add_timer(req);
}

+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ void __blk_complete_request(struct request *req)

	local_irq_restore(flags);
}
EXPORT_SYMBOL(__blk_complete_request);

/**
 * blk_complete_request - end I/O on a request
Loading