[master 1/1] lvm: Add missing argument to libblockdev API for thinpool

cgwalters installerbot-noreply at redhat.com
Thu May 21 19:07:54 UTC 2015


From: Colin Walters <walters at verbum.org>

It takes a boolean:
```
 * @discard: whether discard/TRIM is required to be supported or not
```

So I don't know offhand whether anything in anaconda has support for
forcing TRIM support on or not.  `git grep -i trim` in both blivet and
anaconda has no obvious hits, so I'm going to go ahead and assume no.
In that case, let's pass `False` here to avoid blowing chunks.

NOTE: Not actually tested, but I was trying to do thinp via kickstart
with a rawhide installer and saw a traceback for this, and it looks
right to me.
---
 blivet/devices/lvm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index a4bc712..42be509 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -1016,7 +1016,7 @@ def __init__(self, name, parents=None, size=None, uuid=None,
             raise ValueError("invalid metadatasize value")
 
         if chunksize is not None and \
-           not blockdev.lvm.is_valid_thpool_chunk_size(chunksize):
+           not blockdev.lvm.is_valid_thpool_chunk_size(chunksize, False):
             raise ValueError("invalid chunksize value")
 
         super(LVMThinPoolDevice, self).__init__(name, parents=parents,


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/085ff186b1f3cddae5e0ef3fb942a0350a06c676


More information about the anaconda-patches mailing list