1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: discard

This commit is contained in:
Zdenek Kabelac 2012-08-21 15:51:54 +02:00
parent 0de57b98bf
commit 109b3bb49b
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ static int lvchange_pool_update(struct cmd_context *cmd,
}
if (arg_count(cmd, discards_ARG)) {
discards = arg_uint_value(cmd, discards_ARG, 0);
discards = (thin_discards_t) arg_uint_value(cmd, discards_ARG, THIN_DISCARDS_IGNORE);
if (discards != first_seg(lv)->discards) {
if (((discards == THIN_DISCARDS_IGNORE) ||
(first_seg(lv)->discards == THIN_DISCARDS_IGNORE)) &&

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
* Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@ -797,7 +797,7 @@ static int _lvcreate_params(struct lvcreate_params *lp,
return_0;
if (lp->create_thin_pool) {
lp->discards = arg_uint_value(cmd, discards_ARG, THIN_DISCARDS_PASSDOWN);
lp->discards = (thin_discards_t) arg_uint_value(cmd, discards_ARG, THIN_DISCARDS_PASSDOWN);
} else if (arg_count(cmd, discards_ARG)) {
log_error("--discards is only available for thin pool creation.");
return 0;