aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2014-04-19 13:44:06 -0400
committerRuss Cox <rsc@swtch.com>2014-04-19 13:44:06 -0400
commit833216fef8b946895956737d205bcad7031bf06f (patch)
tree7a02033554aec4ee487f446e6b9678b133673783 /src/cmd/acme
parent1d2c3c3945a229f896640b615b84f3d9a78e8b5a (diff)
downloadplan9port-833216fef8b946895956737d205bcad7031bf06f.tar.gz
plan9port-833216fef8b946895956737d205bcad7031bf06f.tar.bz2
plan9port-833216fef8b946895956737d205bcad7031bf06f.zip
acme: add comment for aligned writes
TBR=r https://codereview.appspot.com/89510044
Diffstat (limited to 'src/cmd/acme')
-rw-r--r--src/cmd/acme/exec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index 0ef66847..6f8bf3f6 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -662,6 +662,11 @@ putfile(File *f, int q0, int q1, Rune *namer, int nname)
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();