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

Commit 75f64f68 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull block fixes from Jens Axboe:
 "A selection of fixes/changes that should make it into this series.
  This contains:

   - NVMe, two merges, containing:
        - pci-e, rdma, and fc fixes
        - Device quirks

   - Fix for a badblocks leak in null_blk

   - bcache fix from Rui Hua for a race condition regression where
     -EINTR was returned to upper layers that didn't expect it.

   - Regression fix for blktrace for a bug introduced in this series.

   - blktrace cleanup for cgroup id.

   - bdi registration error handling.

   - Small series with cleanups for blk-wbt.

   - Various little fixes for typos and the like.

  Nothing earth shattering, most important are the NVMe and bcache fixes"

* 'for-linus' of git://git.kernel.dk/linux-block: (34 commits)
  nvme-pci: fix NULL pointer dereference in nvme_free_host_mem()
  nvme-rdma: fix memory leak during queue allocation
  blktrace: fix trace mutex deadlock
  nvme-rdma: Use mr pool
  nvme-rdma: Check remotely invalidated rkey matches our expected rkey
  nvme-rdma: wait for local invalidation before completing a request
  nvme-rdma: don't complete requests before a send work request has completed
  nvme-rdma: don't suppress send completions
  bcache: check return value of register_shrinker
  bcache: recover data from backing when data is clean
  bcache: Fix building error on MIPS
  bcache: add a comment in journal bucket reading
  nvme-fc: don't use bit masks for set/test_bit() numbers
  blk-wbt: fix comments typo
  blk-wbt: move wbt_clear_stat to common place in wbt_done
  blk-sysfs: remove NULL pointer checking in queue_wb_lat_store
  blk-wbt: remove duplicated setting in wbt_init
  nvme-pci: add quirk for delay before CHK RDY for WDC SN200
  block: remove useless assignment in bio_split
  null_blk: fix dev->badblocks leak
  ...
parents df8ba95c ed565371
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1819,7 +1819,7 @@ EXPORT_SYMBOL(bio_endio);
struct bio *bio_split(struct bio *bio, int sectors,
		      gfp_t gfp, struct bio_set *bs)
{
	struct bio *split = NULL;
	struct bio *split;

	BUG_ON(sectors <= 0);
	BUG_ON(sectors >= bio_sectors(bio));
+1 −4
Original line number Diff line number Diff line
@@ -450,12 +450,9 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
		ret = wbt_init(q);
		if (ret)
			return ret;

		rwb = q->rq_wb;
		if (!rwb)
			return -EINVAL;
	}

	rwb = q->rq_wb;
	if (val == -1)
		rwb->min_lat_nsec = wbt_default_latency_nsec(q);
	else if (val >= 0)
+2 −5
Original line number Diff line number Diff line
@@ -178,12 +178,11 @@ void wbt_done(struct rq_wb *rwb, struct blk_issue_stat *stat)

		if (wbt_is_read(stat))
			wb_timestamp(rwb, &rwb->last_comp);
		wbt_clear_state(stat);
	} else {
		WARN_ON_ONCE(stat == rwb->sync_cookie);
		__wbt_done(rwb, wbt_stat_to_mask(stat));
		wbt_clear_state(stat);
	}
	wbt_clear_state(stat);
}

/*
@@ -482,7 +481,7 @@ static inline unsigned int get_limit(struct rq_wb *rwb, unsigned long rw)

	/*
	 * At this point we know it's a buffered write. If this is
	 * kswapd trying to free memory, or REQ_SYNC is set, set, then
	 * kswapd trying to free memory, or REQ_SYNC is set, then
	 * it's WB_SYNC_ALL writeback, and we'll use the max limit for
	 * that. If the write is marked as a background write, then use
	 * the idle limit, or go to normal if we haven't had competing
@@ -723,8 +722,6 @@ int wbt_init(struct request_queue *q)
		init_waitqueue_head(&rwb->rq_wait[i].wait);
	}

	rwb->wc = 1;
	rwb->queue_depth = RWB_DEF_DEPTH;
	rwb->last_comp = rwb->last_issue = jiffies;
	rwb->queue = q;
	rwb->win_nsec = RWB_WINDOW_NSEC;
+6 −3
Original line number Diff line number Diff line
@@ -671,10 +671,13 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
		disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
		disk->flags |= GENHD_FL_NO_PART_SCAN;
	} else {
		int ret;

		/* Register BDI before referencing it from bdev */
		disk_to_dev(disk)->devt = devt;
		bdi_register_owner(disk->queue->backing_dev_info,
		ret = bdi_register_owner(disk->queue->backing_dev_info,
						disk_to_dev(disk));
		WARN_ON(ret);
		blk_register_region(disk_devt(disk), disk->minors, NULL,
				    exact_match, exact_lock, disk);
	}
@@ -1389,7 +1392,7 @@ struct gendisk *__alloc_disk_node(int minors, int node_id)

	if (minors > DISK_MAX_PARTS) {
		printk(KERN_ERR
			"block: can't allocated more than %d partitions\n",
			"block: can't allocate more than %d partitions\n",
			DISK_MAX_PARTS);
		minors = DISK_MAX_PARTS;
	}
+4 −1
Original line number Diff line number Diff line
@@ -471,7 +471,6 @@ static void nullb_device_release(struct config_item *item)
{
	struct nullb_device *dev = to_nullb_device(item);

	badblocks_exit(&dev->badblocks);
	null_free_device_storage(dev, false);
	null_free_dev(dev);
}
@@ -582,6 +581,10 @@ static struct nullb_device *null_alloc_dev(void)

static void null_free_dev(struct nullb_device *dev)
{
	if (!dev)
		return;

	badblocks_exit(&dev->badblocks);
	kfree(dev);
}

Loading