mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
A fix for stacked dm thin devices and a fix for the new dm WRITE SAME
support. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJRCn+IAAoJEK2W1qbAHj1naQEP/2eXMOslRyws7M6CcsEgpEK9 N2L2hf6bD3xF/04ZSLbHFI6hPe9wDXSL9Vxd+DRLYTSnc0E9WYBXHmE6Eb0L0xK8 m0Iubk/hi7mk6mnMJtpTFT5pazBTPhVz0nXOijguh5U6PW0xL+4ypXe9nrH2jtW0 DvEHFDIPbKcqwplm8nvo/QJ5O3YNQaMifKUtpXF/JWGlCYP4vPk0dJVg9ATbscEV Fg3kefoJzZM09q3Uvo01wigbj+wRkpBK9+CiyW6XcE0lkOAnFmpvyYerIoAHAK37 Rsw5J4aMPA9U8mggBEtlHBWa0q5utZafHM11lT2ZeFGCXkdn+TSWni6O7ov54xPP Cd7jx+uNpe/OuLT5YjbCg2IMXgJs+zIZMSeqSj3SrywE0a0EQHECWiXaFmMmrCCJ TgZtmp/HS1UsdoiHA3v3ZX3AaX4W+mggYp/5md9P1vHyYS9uTlgSVplhwtVgsL23 EsDxNNxODSIFMAMnrXxAV+NBPiQRY42K22hK/RrnWew9roAQHxroIvQDmzzm5ZRL BqCFW3w/x2loJOZZ6NH/J8IUEoF9RhCK1tOGVjFuAVn30srt3zXb4pOzYeydykT7 m04HaGO7rCBJI75XdVDhm6ozOvV/GhXF2fJOt4qyoX/X6M8YN5i0jfwC3rhKeuOe U9fyyYoQV37EWIRI9K5Q =qtaF -----END PGP SIGNATURE----- Merge tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm Pull more device-mapper fixes from Alasdair G Kergon: "A fix for stacked dm thin devices and a fix for the new dm WRITE SAME support." * tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: dm: fix write same requests counting dm thin: fix queue limits stacking
This commit is contained in:
commit
cc6c954a07
@ -2746,19 +2746,9 @@ static int thin_iterate_devices(struct dm_target *ti,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* A thin device always inherits its queue limits from its pool.
|
||||
*/
|
||||
static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits)
|
||||
{
|
||||
struct thin_c *tc = ti->private;
|
||||
|
||||
*limits = bdev_get_queue(tc->pool_dev->bdev)->limits;
|
||||
}
|
||||
|
||||
static struct target_type thin_target = {
|
||||
.name = "thin",
|
||||
.version = {1, 6, 0},
|
||||
.version = {1, 7, 0},
|
||||
.module = THIS_MODULE,
|
||||
.ctr = thin_ctr,
|
||||
.dtr = thin_dtr,
|
||||
@ -2767,7 +2757,6 @@ static struct target_type thin_target = {
|
||||
.postsuspend = thin_postsuspend,
|
||||
.status = thin_status,
|
||||
.iterate_devices = thin_iterate_devices,
|
||||
.io_hints = thin_io_hints,
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
@ -1188,6 +1188,7 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
|
||||
{
|
||||
struct dm_target *ti;
|
||||
sector_t len;
|
||||
unsigned num_requests;
|
||||
|
||||
do {
|
||||
ti = dm_table_find_target(ci->map, ci->sector);
|
||||
@ -1200,7 +1201,8 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
|
||||
* reconfiguration might also have changed that since the
|
||||
* check was performed.
|
||||
*/
|
||||
if (!get_num_requests || !get_num_requests(ti))
|
||||
num_requests = get_num_requests ? get_num_requests(ti) : 0;
|
||||
if (!num_requests)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (is_split_required && !is_split_required(ti))
|
||||
@ -1208,7 +1210,7 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
|
||||
else
|
||||
len = min(ci->sector_count, max_io_len(ci->sector, ti));
|
||||
|
||||
__issue_target_requests(ci, ti, ti->num_discard_requests, len);
|
||||
__issue_target_requests(ci, ti, num_requests, len);
|
||||
|
||||
ci->sector += len;
|
||||
} while (ci->sector_count -= len);
|
||||
|
Loading…
Reference in New Issue
Block a user