1. Russ Cox
  2. plan9port


Russ Cox  committed 201eca9

acme: add comment for aligned writes


  • Participants
  • Parent commits e0309ab
  • Branches default

Comments (0)

Files changed (1)

File src/cmd/acme/exec.c

View file
 		warning(nil, "can't create file %s: %r\n", name);
 		goto Rescue1;
+	// Use bio in order to force the writes to be large and
+	// block-aligned (bio's default is 8K). This is not strictly
+	// necessary; it works around some buggy underlying
+	// file systems that mishandle unaligned writes.
+	// https://codereview.appspot.com/89550043/
 	b = emalloc(sizeof *b);
 	Binit(b, fd, OWRITE);
 	r = fbufalloc();