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.15-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device-mapper fixes from Mike Snitzer:
"A dm-cache stable fix to split discards on cache block boundaries
because dm-cache cannot yet handle discards that span cache blocks.

Really fix a dm-mpath LOCKDEP warning that was introduced in -rc1.

Add a 'no_space_timeout' control to dm-thinp to restore the ability to
queue IO indefinitely when no data space is available. This fixes a
change in behavior that was introduced in -rc6 where the timeout
couldn't be disabled"

* tag 'dm-3.15-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm mpath: really fix lockdep warning
dm cache: always split discards on cache block boundaries
dm thin: add 'no_space_timeout' dm-thin-pool module param

+23 -10
+4 -1
Documentation/device-mapper/thin-provisioning.txt
··· 309 309 error_if_no_space|queue_if_no_space 310 310 If the pool runs out of data or metadata space, the pool will 311 311 either queue or error the IO destined to the data device. The 312 - default is to queue the IO until more space is added. 312 + default is to queue the IO until more space is added or the 313 + 'no_space_timeout' expires. The 'no_space_timeout' dm-thin-pool 314 + module parameter can be used to change this timeout -- it 315 + defaults to 60 seconds but may be disabled using a value of 0. 313 316 314 317 iii) Messages 315 318
+2
drivers/md/dm-cache-target.c
··· 2178 2178 ti->num_discard_bios = 1; 2179 2179 ti->discards_supported = true; 2180 2180 ti->discard_zeroes_data_unsupported = true; 2181 + /* Discard bios must be split on a block boundary */ 2182 + ti->split_discard_bios = true; 2181 2183 2182 2184 cache->features = ca->features; 2183 2185 ti->per_bio_data_size = get_per_bio_data_size(cache);
+8 -6
drivers/md/dm-mpath.c
··· 445 445 else 446 446 m->saved_queue_if_no_path = queue_if_no_path; 447 447 m->queue_if_no_path = queue_if_no_path; 448 - if (!m->queue_if_no_path) 449 - dm_table_run_md_queue_async(m->ti->table); 450 - 451 448 spin_unlock_irqrestore(&m->lock, flags); 449 + 450 + if (!queue_if_no_path) 451 + dm_table_run_md_queue_async(m->ti->table); 452 452 453 453 return 0; 454 454 } ··· 954 954 */ 955 955 static int reinstate_path(struct pgpath *pgpath) 956 956 { 957 - int r = 0; 957 + int r = 0, run_queue = 0; 958 958 unsigned long flags; 959 959 struct multipath *m = pgpath->pg->m; 960 960 ··· 978 978 979 979 if (!m->nr_valid_paths++) { 980 980 m->current_pgpath = NULL; 981 - dm_table_run_md_queue_async(m->ti->table); 981 + run_queue = 1; 982 982 } else if (m->hw_handler_name && (m->current_pg == pgpath->pg)) { 983 983 if (queue_work(kmpath_handlerd, &pgpath->activate_path.work)) 984 984 m->pg_init_in_progress++; ··· 991 991 992 992 out: 993 993 spin_unlock_irqrestore(&m->lock, flags); 994 + if (run_queue) 995 + dm_table_run_md_queue_async(m->ti->table); 994 996 995 997 return r; 996 998 } ··· 1568 1566 } 1569 1567 if (m->pg_init_required) 1570 1568 __pg_init_all_paths(m); 1571 - dm_table_run_md_queue_async(m->ti->table); 1572 1569 spin_unlock_irqrestore(&m->lock, flags); 1570 + dm_table_run_md_queue_async(m->ti->table); 1573 1571 } 1574 1572 1575 1573 return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
+9 -3
drivers/md/dm-thin.c
··· 27 27 #define MAPPING_POOL_SIZE 1024 28 28 #define PRISON_CELLS 1024 29 29 #define COMMIT_PERIOD HZ 30 - #define NO_SPACE_TIMEOUT (HZ * 60) 30 + #define NO_SPACE_TIMEOUT_SECS 60 31 + 32 + static unsigned no_space_timeout_secs = NO_SPACE_TIMEOUT_SECS; 31 33 32 34 DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(snapshot_copy_throttle, 33 35 "A percentage of time allocated for copy on write"); ··· 1672 1670 struct pool_c *pt = pool->ti->private; 1673 1671 bool needs_check = dm_pool_metadata_needs_check(pool->pmd); 1674 1672 enum pool_mode old_mode = get_pool_mode(pool); 1673 + unsigned long no_space_timeout = ACCESS_ONCE(no_space_timeout_secs) * HZ; 1675 1674 1676 1675 /* 1677 1676 * Never allow the pool to transition to PM_WRITE mode if user ··· 1735 1732 pool->process_prepared_mapping = process_prepared_mapping; 1736 1733 pool->process_prepared_discard = process_prepared_discard_passdown; 1737 1734 1738 - if (!pool->pf.error_if_no_space) 1739 - queue_delayed_work(pool->wq, &pool->no_space_timeout, NO_SPACE_TIMEOUT); 1735 + if (!pool->pf.error_if_no_space && no_space_timeout) 1736 + queue_delayed_work(pool->wq, &pool->no_space_timeout, no_space_timeout); 1740 1737 break; 1741 1738 1742 1739 case PM_WRITE: ··· 3510 3507 3511 3508 module_init(dm_thin_init); 3512 3509 module_exit(dm_thin_exit); 3510 + 3511 + module_param_named(no_space_timeout, no_space_timeout_secs, uint, S_IRUGO | S_IWUSR); 3512 + MODULE_PARM_DESC(no_space_timeout, "Out of data space queue IO timeout in seconds"); 3513 3513 3514 3514 MODULE_DESCRIPTION(DM_NAME " thin provisioning target"); 3515 3515 MODULE_AUTHOR("Joe Thornber <dm-devel@redhat.com>");