diff --git a/src/shifter_core.c b/src/shifter_core.c index 364daf64..452774b1 100644 --- a/src/shifter_core.c +++ b/src/shifter_core.c @@ -1643,9 +1643,11 @@ int setupPerNodeCacheBackingStore(VolMapPerNodeCacheConfig *cache, const char *b } args = (char **) _malloc(sizeof(char *) * 4); args[0] = _strdup(udiConfig->mkfsXfsPath); - args[1] = _strdup("-d"); - args[2] = alloc_strgenf("name=%s,file=1,size=%lu", buffer, cache->cacheSize); - args[3] = NULL; + args[1] = _strdup("-b"); + args[2] = alloc_strgenf("size=%lu", cache->blockSize); + args[3] = _strdup("-d"); + args[4] = alloc_strgenf("name=%s,file=1,size=%lu", buffer, cache->cacheSize); + args[5] = NULL; ret = forkAndExecvSilent(args); for (argPtr = args; argPtr && *argPtr; argPtr++) { free(*argPtr); diff --git a/src/test/test_shifter_core.cpp b/src/test/test_shifter_core.cpp index 7c4b20a8..b5cd4958 100644 --- a/src/test/test_shifter_core.cpp +++ b/src/test/test_shifter_core.cpp @@ -604,6 +604,7 @@ IGNORE_TEST(ShifterCoreTestGroup, setupPerNodeCacheBackingStore_tests) { cache->fstype = strdup("xfs"); cache->cacheSize = 200 * 1024 * 1024; // 200mb + cache->blockSize = 4096; // 4 KiB if (access("/sbin/mkfs.xfs", X_OK) == 0) { config->target_uid = getuid();