Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5 -14
+1 -12
drivers/md/dm-thin.c
··· 2746 2746 return 0; 2747 2747 } 2748 2748 2749 - /* 2750 - * A thin device always inherits its queue limits from its pool. 2751 - */ 2752 - static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits) 2753 - { 2754 - struct thin_c *tc = ti->private; 2755 - 2756 - *limits = bdev_get_queue(tc->pool_dev->bdev)->limits; 2757 - } 2758 - 2759 2749 static struct target_type thin_target = { 2760 2750 .name = "thin", 2761 - .version = {1, 6, 0}, 2751 + .version = {1, 7, 0}, 2762 2752 .module = THIS_MODULE, 2763 2753 .ctr = thin_ctr, 2764 2754 .dtr = thin_dtr, ··· 2757 2767 .postsuspend = thin_postsuspend, 2758 2768 .status = thin_status, 2759 2769 .iterate_devices = thin_iterate_devices, 2760 - .io_hints = thin_io_hints, 2761 2770 }; 2762 2771 2763 2772 /*----------------------------------------------------------------*/
+4 -2
drivers/md/dm.c
··· 1188 1188 { 1189 1189 struct dm_target *ti; 1190 1190 sector_t len; 1191 + unsigned num_requests; 1191 1192 1192 1193 do { 1193 1194 ti = dm_table_find_target(ci->map, ci->sector); ··· 1201 1200 * reconfiguration might also have changed that since the 1202 1201 * check was performed. 1203 1202 */ 1204 - if (!get_num_requests || !get_num_requests(ti)) 1203 + num_requests = get_num_requests ? get_num_requests(ti) : 0; 1204 + if (!num_requests) 1205 1205 return -EOPNOTSUPP; 1206 1206 1207 1207 if (is_split_required && !is_split_required(ti)) ··· 1210 1208 else 1211 1209 len = min(ci->sector_count, max_io_len(ci->sector, ti)); 1212 1210 1213 - __issue_target_requests(ci, ti, ti->num_discard_requests, len); 1211 + __issue_target_requests(ci, ti, num_requests, len); 1214 1212 1215 1213 ci->sector += len; 1216 1214 } while (ci->sector_count -= len);