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

Commit 802ea9d8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull device mapper changes from Mike Snitzer:

 - The most significant change this cycle is request-based DM now
   supports stacking ontop of blk-mq devices.  This blk-mq support
   changes the model request-based DM uses for cloning a request to
   relying on calling blk_get_request() directly from the underlying
   blk-mq device.

   An early consumer of this code is Intel's emerging NVMe hardware;
   thanks to Keith Busch for working on, and pushing for, these changes.

 - A few other small fixes and cleanups across other DM targets.

* tag 'dm-3.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm: inherit QUEUE_FLAG_SG_GAPS flags from underlying queues
  dm snapshot: remove unnecessary NULL checks before vfree() calls
  dm mpath: simplify failure path of dm_multipath_init()
  dm thin metadata: remove unused dm_pool_get_data_block_size()
  dm ioctl: fix stale comment above dm_get_inactive_table()
  dm crypt: update url in CONFIG_DM_CRYPT help text
  dm bufio: fix time comparison to use time_after_eq()
  dm: use time_in_range() and time_after()
  dm raid: fix a couple integer overflows
  dm table: train hybrid target type detection to select blk-mq if appropriate
  dm: allocate requests in target when stacking on blk-mq devices
  dm: prepare for allocating blk-mq clone requests in target
  dm: submit stacked requests in irq enabled context
  dm: split request structure out from dm_rq_target_io structure
  dm: remove exports for request-based interfaces without external callers
parents 8494bcf5 a4afe76b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -231,9 +231,8 @@ config DM_CRYPT
	  transparently encrypts the data on it. You'll need to activate
	  the ciphers you're going to use in the cryptoapi configuration.

	  Information on how to use dm-crypt can be found on

	  <http://www.saout.de/misc/dm-crypt/>
	  For further information on dm-crypt and userspace tools see:
	  <http://code.google.com/p/cryptsetup/wiki/DMCrypt>

	  To compile this code as a module, choose M here: the module will
	  be called dm-crypt.
+2 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/device-mapper.h>
#include <linux/dm-io.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/vmalloc.h>
#include <linux/shrinker.h>
#include <linux/module.h>
@@ -1739,7 +1740,7 @@ static unsigned get_max_age_hz(void)

static bool older_than(struct dm_buffer *b, unsigned long age_hz)
{
	return (jiffies - b->last_accessed) >= age_hz;
	return time_after_eq(jiffies, b->last_accessed + age_hz);
}

static void __evict_old_buffers(struct dm_bufio_client *c, unsigned long age_hz)
+3 −2
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@

#include <linux/dm-io.h>
#include <linux/dm-kcopyd.h>
#include <linux/jiffies.h>
#include <linux/init.h>
#include <linux/mempool.h>
#include <linux/module.h>
@@ -1562,8 +1563,8 @@ static void process_bio(struct cache *cache, struct prealloc *structs,

static int need_commit_due_to_time(struct cache *cache)
{
	return jiffies < cache->last_commit_jiffies ||
	       jiffies > cache->last_commit_jiffies + COMMIT_PERIOD;
	return !time_in_range(jiffies, cache->last_commit_jiffies,
			      cache->last_commit_jiffies + COMMIT_PERIOD);
}

static int commit_if_needed(struct cache *cache)
+2 −2
Original line number Diff line number Diff line
@@ -639,8 +639,8 @@ static int check_name(const char *name)

/*
 * On successful return, the caller must not attempt to acquire
 * _hash_lock without first calling dm_table_put, because dm_table_destroy
 * waits for this dm_table_put and could be called under this lock.
 * _hash_lock without first calling dm_put_live_table, because dm_table_destroy
 * waits for this dm_put_live_table and could be called under this lock.
 */
static struct dm_table *dm_get_inactive_table(struct mapped_device *md, int *srcu_idx)
{
+3 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#include <linux/bio.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/dm-dirty-log.h>
#include <linux/device-mapper.h>
#include <linux/dm-log-userspace.h>
@@ -829,7 +830,7 @@ static int userspace_is_remote_recovering(struct dm_dirty_log *log,
	int r;
	uint64_t region64 = region;
	struct log_c *lc = log->context;
	static unsigned long long limit;
	static unsigned long limit;
	struct {
		int64_t is_recovering;
		uint64_t in_sync_hint;
@@ -845,7 +846,7 @@ static int userspace_is_remote_recovering(struct dm_dirty_log *log,
	 */
	if (region < lc->in_sync_hint)
		return 0;
	else if (jiffies < limit)
	else if (time_after(limit, jiffies))
		return 1;

	limit = jiffies + (HZ / 4);
Loading