From f3cd44c9b0fc84bd09a208b5176189984ec06309 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 13:59:56 +0000 Subject: Apply patch bz1839219-mkfs_gfs2_Don_t_use_i_o_limits_hints_4K_for_block_size.patch patch_name: bz1839219-mkfs_gfs2_Don_t_use_i_o_limits_hints_4K_for_block_size.patch present_in_specfile: true --- diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c index 846b341..412d470 100644 --- a/gfs2/mkfs/main_mkfs.c +++ b/gfs2/mkfs/main_mkfs.c @@ -505,7 +505,7 @@ static unsigned choose_blocksize(struct mkfs_opts *opts) } if (!opts->got_bsize && got_topol) { if (dev->optimal_io_size <= getpagesize() && - dev->optimal_io_size >= dev->minimum_io_size) + dev->optimal_io_size >= GFS2_DEFAULT_BSIZE) bsize = dev->optimal_io_size; else if (dev->physical_sector_size <= getpagesize() && dev->physical_sector_size >= GFS2_DEFAULT_BSIZE) diff --git a/tests/mkfs.at b/tests/mkfs.at index 3e3fb82..4220567 100644 --- a/tests/mkfs.at +++ b/tests/mkfs.at @@ -112,6 +112,8 @@ AT_CLEANUP AT_SETUP([Device i/o limits handling]) AT_KEYWORDS(mkfs.gfs2 mkfs) AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:0:0:0:0 $GFS_TGT], 0, [ignore], [ignore]) +AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:512:512:512:512 $GFS_TGT], 0, [ignore], [ignore]) +AT_CHECK([gfs2_edit -p sb field sb_bsize $GFS_TGT | tr -d '\n' ], 0, [4096], [ignore]) AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=7168:512:0:33553920:512 $GFS_TGT], 0, [ignore], [ignore]) AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=7168:512:8192:33553920:512 $GFS_TGT], 0, [ignore], [Warning: device is not properly aligned. This may harm performance. ])