shithub: ext4srv

Download patch

ref: 29be1941191a55451847c25262ef0522d4e688b6
parent: 37345fce96f5df24f6fce02b876b37314ada0320
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Mar 1 08:34:35 EST 2023

part: make blksz at least 4k

--- a/part.c
+++ b/part.c
@@ -96,9 +96,7 @@
 	vlong x;
 	int f, n, r;
 
-	/* default blksz if couldn't find out the real one */
-	*blksz = 512;
-
+	*blksz = 0;
 	f = -1;
 	g = nil;
 	if((s = smprint("%s_ctl", dev)) == nil)
@@ -130,6 +128,8 @@
 			}
 		}
 	}
+	if(*blksz < 4096 || (*blksz-1)&*blksz != 0)
+		*blksz = 4096;
 
 	close(f);
 	free(g);