[PATCH] xfstests: initialize "valid" bitmap in randholes.c

Eric Sandeen sandeen at redhat.com
Wed Feb 5 12:35:55 CST 2014


Failures were reported in xfs/008 on s390; dchinner suggested that
perhaps the uninitialized "valid" bitmap was behaving differently on
that platform, and sure enough, this patch fixes things up.

TBH, I'm not sure why using an uninitialized bitmap worked at
all, ever, anywhere...?

Signed-off-by: Eric Sandeen <sandeen at redhat.com>
---

diff --git a/src/randholes.c b/src/randholes.c
index 5ad602e..ee5b6b6 100644
--- a/src/randholes.c
+++ b/src/randholes.c
@@ -437,6 +437,7 @@ main(int argc, char *argv[])
 		perror("malloc");
 		return 1;
 	}
+	memset(valid, 0, size);
 
 	/* Lots of arguments affect how we open the file */
 	oflags = test ? O_RDONLY : O_RDWR|O_CREAT;



More information about the xfs mailing list