mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: fix recent commits
This commit is contained in:
parent
701b4a8363
commit
7ecccc3099
@ -115,7 +115,7 @@ static int _thin_pool_text_import(struct lv_segment *seg,
|
||||
return SEG_LOG_ERROR("Could not read chunk_size");
|
||||
|
||||
if (dm_config_has_node(sn, "discards") &&
|
||||
!dm_config_get_str(sn, "discards", &discard_str))
|
||||
!dm_config_get_str(sn, "discards", &discards_str))
|
||||
return SEG_LOG_ERROR("Could not read discards for");
|
||||
|
||||
if (!discards_str)
|
||||
@ -276,8 +276,7 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
seg->zero_new_blocks ? 0 : 1))
|
||||
return_0;
|
||||
|
||||
if (seg->discards != THIN_DISCARDS_PASSDOWN)
|
||||
if (attr & THIN_FEATURE_DISCARDS) {
|
||||
if ((seg->discards != THIN_DISCARDS_PASSDOWN) && (attr & THIN_FEATURE_DISCARDS)) {
|
||||
/* FIXME: Check whether underlying dev supports discards */
|
||||
if (!dm_tree_node_set_thin_pool_discard(node,
|
||||
seg->discards == THIN_DISCARDS_IGNORE,
|
||||
|
Loading…
Reference in New Issue
Block a user