device-mapper updates for 3.10
Subsystems (2)
Alasdair G Kergon
maintainerPlease pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm tags/dm-3.10-changes
to get the following device-mapper updates for 3.10.
Thanks,
Alasdair
----------------------------------------------------------------
Allow devices that hold metadata for the device-mapper thin provisioning target to be extended easily; allow WRITE SAME on multipath devices; an assortment of little fixes and clean-ups.
----------------------------------------------------------------
Alasdair G Kergon (3):
dm: document iterate_devices
dm cache policy: fix description of lookup fn dm cache: move config fns
Joe Thornber (12):
dm cache: tune migration throttling
dm persistent data: fix error message typos
dm cache: fix typos in comments
dm cache: replace memcpy with struct assignment dm thin: refactor data dev resize
dm thin: open dev read only when possible
dm persistent data: support space map resizing dm thin: detect metadata device resizing
dm persistent data: add threshold callback to space map dm persistent metadata: add space map threshold callback dm thin: generate event when metadata threshold passed dm cache: set config value
Mike Snitzer (3):
dm stripe: fix regression in stripe_width calculation dm table: fix write same support
dm mpath: enable WRITE SAME support
Mikulas Patocka (1):
dm bufio: avoid a possible __vmalloc deadlock
Wei Yongjun (2):
dm cache: fix error return code in cache_create dm snapshot: fix error return code in snapshot_ctr
drivers/md/dm-bufio.c | 24 ++- drivers/md/dm-cache-metadata.c | 4 +- drivers/md/dm-cache-policy.h | 4 +- drivers/md/dm-cache-target.c | 100 +++++----- drivers/md/dm-mpath.c | 1 + drivers/md/dm-snap.c | 1 + drivers/md/dm-stripe.c | 11 +- drivers/md/dm-table.c | 2 +- drivers/md/dm-thin-metadata.c | 36 +++- drivers/md/dm-thin-metadata.h | 7 + drivers/md/dm-thin.c | 200 ++++++++++++++++---- drivers/md/persistent-data/dm-space-map-disk.c | 3 +- drivers/md/persistent-data/dm-space-map-metadata.c | 127 +++++++++++-- drivers/md/persistent-data/dm-space-map.h | 23 +++ include/linux/device-mapper.h | 15 ++ 15 files changed, 442 insertions(+), 116 deletions(-)
Quoted 6 lines · Alasdair G Kergon
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dmtags/dm-3.10-changesto get the following device-mapper updates for 3.10.
Please consider folding in
"dm-multipath: Drop table when retrying ioctl"
that fixes a rather nasty multipath deadlock.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Alasdair G Kergon
Quoted 1 line · Hannes Reinecke
"dm-multipath: Drop table when retrying ioctl"
That one's not showing up: direct link or mail me it?
Here it is.
I _thought_ to have it sent to dm-devel, but apparently not. Wonder what happened there...
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
From 3e501ba7080d7913e85361ea0cef5b5c8fd1f153 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <[email protected]>
Date: Tue, 23 Apr 2013 12:33:52 +0200
Subject: [PATCH] dm-multipath: Drop table when retrying ioctl
When multipath needs to retry an ioctl the reference to the current live table needs to be dropped. Otherwise a deadlock occurs when all paths are down:
- dm_blk_ioctl takes a reference to the current table and spins in multipath_iotcl().
- A new table is being loaded, but upon resume the process hangs in dm_table_destroy() waiting for references to drop to zero.
With this patch the reference to the old table is dropped prior to retry, thereby avoiding the deadlock.
drivers/md/dm-mpath.c +2 -5
@@ -1578,7 +1578,7 @@ again: }if ((pgpath && m->queue_io) || (!pgpath && m->queue_if_no_path)) - r = -EAGAIN ; + r = -ENOTCONN ;else if (!bdev) r = -EIO ;
@@ -1590,11 +1590,8 @@ again:if (!r && ti->len !=i_size_read (bdev->bd_inode) >>SECTOR_SHIFT ) r =scsi_verify_blk_ioctl (NULL , cmd); -if (r == -EAGAIN && !fatal_signal_pending (current)) { +if (r == -ENOTCONN && !fatal_signal_pending (current))queue_work (kmultipathd, &m->process_queued_ios); -msleep (10 ); - goto again; - }return r ? :__blkdev_driver_ioctl (bdev, mode, cmd, arg); }
drivers/md/dm.c +8 -1
@@ -388,10 +388,12 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) {struct mapped_device *md = bdev->bd_disk->private_data; -struct dm_table *map =dm_get_live_table (md); +struct dm_table *map;struct dm_target *tgt;int r = -ENOTTY ; +retry: + map =dm_get_live_table (md);if (!map || !dm_table_get_size (map)) goto out;
@@ -412,6 +414,11 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode, out:dm_table_put (map); +if (r == -ENOTCONN ) { +msleep (10 ); + goto retry; + } +return r; }
Alasdair G Kergon
maintainerQuoted 2 lines · Alasdair G Kergon
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dmtags/dm-3.10-changes
And the kbuild test robot just spotted that I lost a line from one of the patches which meant the thin threshold notification wouldn't happen, sorry.
Take two...
Alasdair
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm tags/dm-3.10-changes-2
to get the following device-mapper updates for 3.10.
----------------------------------------------------------------
Allow devices that hold metadata for the device-mapper thin provisioning target to be extended easily; allow WRITE SAME on multipath devices; an assortment of little fixes and clean-ups.
----------------------------------------------------------------
Alasdair G Kergon (3):
dm: document iterate_devices
dm cache policy: fix description of lookup fn dm cache: move config fns
Joe Thornber (12):
dm cache: tune migration throttling
dm persistent data: fix error message typos
dm cache: fix typos in comments
dm cache: replace memcpy with struct assignment dm thin: refactor data dev resize
dm thin: open dev read only when possible
dm persistent data: support space map resizing dm thin: detect metadata device resizing
dm persistent data: add threshold callback to space map dm persistent metadata: add space map threshold callback dm thin: generate event when metadata threshold passed dm cache: set config value
Mike Snitzer (3):
dm stripe: fix regression in stripe_width calculation dm table: fix write same support
dm mpath: enable WRITE SAME support
Mikulas Patocka (1):
dm bufio: avoid a possible __vmalloc deadlock
Wei Yongjun (2):
dm cache: fix error return code in cache_create dm snapshot: fix error return code in snapshot_ctr
drivers/md/dm-bufio.c | 24 ++- drivers/md/dm-cache-metadata.c | 4 +- drivers/md/dm-cache-policy.h | 4 +- drivers/md/dm-cache-target.c | 100 +++++----- drivers/md/dm-mpath.c | 1 + drivers/md/dm-snap.c | 1 + drivers/md/dm-stripe.c | 11 +- drivers/md/dm-table.c | 2 +- drivers/md/dm-thin-metadata.c | 36 +++- drivers/md/dm-thin-metadata.h | 7 + drivers/md/dm-thin.c | 200 ++++++++++++++++---- drivers/md/persistent-data/dm-space-map-disk.c | 3 +- drivers/md/persistent-data/dm-space-map-metadata.c | 127 +++++++++++-- drivers/md/persistent-data/dm-space-map.h | 23 +++ include/linux/device-mapper.h | 15 ++ 15 files changed, 442 insertions(+), 116 deletions(-)