From 10e8c927a923648484167462149bfb3d16a8e15f Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 30 Sep 2005 10:10:20 +0000 Subject: [PATCH] Branch b1_4 Use actual page size instead of hard-coded 4096 bytes. --- lustre/tests/write_disjoint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/tests/write_disjoint.c b/lustre/tests/write_disjoint.c index 16c51fe..9548cdc 100644 --- a/lustre/tests/write_disjoint.c +++ b/lustre/tests/write_disjoint.c @@ -149,16 +149,16 @@ int main (int argc, char *argv[]) { continue; printf("rank %d, loop %d: chunk %d corrupted " - "with chunk_size %d\n", rank, n, i, - chunk_size); + "with chunk_size %d, page_size %d\n", + rank, n, i, chunk_size, getpagesize()); printf("(ranks: page boundry, chunk boundry, " "page boundry)\n"); for (j = 1 ; j < noProcessors; j++) { int b = j * chunk_size; printf("\t%c -> %c: %d %d %d\n", 'A' + j - 1, 'A' + j, - b & ~(4096-1), b, - (b + 4096) & ~(4096-1)); + b & ~(getpagesize()-1), b, + (b + getpagesize()) & ~(getpagesize()-1)); } sprintf(command, "od -Ad -a %s", filename); -- 1.8.3.1