Commit Diff


commit - 1d2c3c3945a229f896640b615b84f3d9a78e8b5a
commit + 833216fef8b946895956737d205bcad7031bf06f
blob - 0ef668476fd78407bfbafe1805a3b763dad33d78
blob + 6f8bf3f6be0fbe84fc3f90b13a156ed27ef803b7
--- src/cmd/acme/exec.c
+++ src/cmd/acme/exec.c
@@ -662,6 +662,11 @@ putfile(File *f, int q0, int q1, Rune *namer, int nnam
 		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();