summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-03-04 11:18:34 -0600
committerDavid Teigland <teigland@redhat.com>2019-03-04 12:14:06 -0600
commit7edbf8a441fab4518959523e3e726bcd66b2c6a8 (patch)
tree9438b21f9d84ad69b4d466b80455280dd46ebf2e
parent3584e0c0d5e5992a3c93e03de8b6042de0853ef2 (diff)
downloadlvm2-7edbf8a441fab4518959523e3e726bcd66b2c6a8.tar.gz
io: increase the default io memory from 4 to 8 MiB
This is the default bcache size that is created at the start of the command. It needs to be large enough to hold a single copy of metadata for a given VG, or the VG cannot be read or written (since the entire VG would not fit into available memory.) Increasing the default reduces the chances of anyone needing to increase the default to use their VG. The size can be set in lvm.conf global/io_memory_size; the lower limit is 4 MiB and the upper limit is 128 MiB.
-rw-r--r--lib/config/defaults.h2
-rw-r--r--lib/label/label.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index ee6ca3a52..3b8d341cb 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -314,6 +314,6 @@
#define DEFAULT_HINTS "all"
-#define DEFAULT_IO_MEMORY_SIZE_KB 4096
+#define DEFAULT_IO_MEMORY_SIZE_KB 8192
#endif /* _LVM_DEFAULTS_H */
diff --git a/lib/label/label.c b/lib/label/label.c
index 174139e55..f356e1830 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -794,7 +794,7 @@ out:
* the metadata size.)
*/
-#define MIN_BCACHE_BLOCKS 32 /* 4MB, currently matches DEFAULT_IO_MEMORY_SIZE_KB */
+#define MIN_BCACHE_BLOCKS 32 /* 4MB */
#define MAX_BCACHE_BLOCKS 1024
static int _setup_bcache(int num_devs)