Revision: 14305 Author: adrian.chadd Date: Fri Sep 25 22:19:05 2009 Log: Write out zero's to the whole file contents, rather than just writing out sparse files.
We want the best possible linear ordering on disk. Its not guaranteed obviously but we really would like a given stripe to be contiguous. http://code.google.com/p/lusca-cache/source/detail?r=14305 Modified: /branches/LUSCA_HEAD/app/coss_newfs/coss_newfs.c ======================================= --- /branches/LUSCA_HEAD/app/coss_newfs/coss_newfs.c Fri Sep 25 22:16:36 2009 +++ /branches/LUSCA_HEAD/app/coss_newfs/coss_newfs.c Fri Sep 25 22:19:05 2009 @@ -25,7 +25,7 @@ const char *path; size_t i; int fd; - char buf[256]; + char *buf; off_t r; /* Setup the debugging library */ @@ -53,7 +53,7 @@ perror("open"); exit(127); } - bzero(buf, sizeof(buf)); + buf = xcalloc(stripe_sz, sizeof(char)); for (i = 0; i < sz; i += 1) { getCurrentTime(); @@ -63,14 +63,13 @@ perror("lseek"); exit(127); } - r = write(fd, buf, sizeof(buf)); + r = write(fd, buf, stripe_sz); if (r < 0) { perror("write"); exit(127); } } - + safe_free(buf); close(fd); - exit(0); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en -~----------~----~----~----~------~----~------~--~---
