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.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm

Pull a dm fix from Alasdair G Kergon:
"A fix to the thin provisioning userspace interface."

* tag 'dm-3.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
dm thin: fix table output when pool target disables discard passdown internally

+17 -15
+17 -15
drivers/md/dm-thin.c
··· 1632 1632 pool->low_water_blocks = pt->low_water_blocks; 1633 1633 pool->pf = pt->pf; 1634 1634 1635 + /* 1636 + * If discard_passdown was enabled verify that the data device 1637 + * supports discards. Disable discard_passdown if not; otherwise 1638 + * -EOPNOTSUPP will be returned. 1639 + */ 1640 + if (pt->pf.discard_passdown) { 1641 + struct request_queue *q = bdev_get_queue(pt->data_dev->bdev); 1642 + if (!q || !blk_queue_discard(q)) { 1643 + char buf[BDEVNAME_SIZE]; 1644 + DMWARN("Discard unsupported by data device (%s): Disabling discard passdown.", 1645 + bdevname(pt->data_dev->bdev, buf)); 1646 + pool->pf.discard_passdown = 0; 1647 + } 1648 + } 1649 + 1635 1650 return 0; 1636 1651 } 1637 1652 ··· 2001 1986 ti->error = "Discard support cannot be disabled once enabled"; 2002 1987 r = -EINVAL; 2003 1988 goto out_flags_changed; 2004 - } 2005 - 2006 - /* 2007 - * If discard_passdown was enabled verify that the data device 2008 - * supports discards. Disable discard_passdown if not; otherwise 2009 - * -EOPNOTSUPP will be returned. 2010 - */ 2011 - if (pf.discard_passdown) { 2012 - struct request_queue *q = bdev_get_queue(data_dev->bdev); 2013 - if (!q || !blk_queue_discard(q)) { 2014 - DMWARN("Discard unsupported by data device: Disabling discard passdown."); 2015 - pf.discard_passdown = 0; 2016 - } 2017 1989 } 2018 1990 2019 1991 pt->pool = pool; ··· 2387 2385 (unsigned long long)pt->low_water_blocks); 2388 2386 2389 2387 count = !pool->pf.zero_new_blocks + !pool->pf.discard_enabled + 2390 - !pool->pf.discard_passdown; 2388 + !pt->pf.discard_passdown; 2391 2389 DMEMIT("%u ", count); 2392 2390 2393 2391 if (!pool->pf.zero_new_blocks) ··· 2396 2394 if (!pool->pf.discard_enabled) 2397 2395 DMEMIT("ignore_discard "); 2398 2396 2399 - if (!pool->pf.discard_passdown) 2397 + if (!pt->pf.discard_passdown) 2400 2398 DMEMIT("no_discard_passdown "); 2401 2399 2402 2400 break;