From: Christoph Hellwig Date: Mon, 11 Dec 2023 16:37:34 +0000 (+0100) Subject: libxfs: remove the setblksize == 1 case in libxfs_device_open X-Git-Tag: v6.6.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8798d4a6a73caea5fb8d95ae87303d3d39c68abe;p=thirdparty%2Fxfsprogs-dev.git libxfs: remove the setblksize == 1 case in libxfs_device_open All callers of libxfs_init always pass an actual sector size or zero in the setblksize member. Remove the unreachable setblksize == 1 case. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/init.c b/libxfs/init.c index de1e588f1..6570c595a 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -125,10 +125,7 @@ retry: } if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK) { - if (setblksize == 1) { - /* use the default blocksize */ - (void)platform_set_blocksize(fd, path, statb.st_rdev, XFS_MIN_SECTORSIZE, 0); - } else if (dio) { + if (dio) { /* try to use the given explicit blocksize */ (void)platform_set_blocksize(fd, path, statb.st_rdev, setblksize, 0);