acme: add comment for aligned writes
TBR=r https://codereview.appspot.com/89510044
This commit is contained in:
parent
1d2c3c3945
commit
833216fef8
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
warning(nil, "can't create file %s: %r\n", name);
|
||||||
goto Rescue1;
|
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);
|
b = emalloc(sizeof *b);
|
||||||
Binit(b, fd, OWRITE);
|
Binit(b, fd, OWRITE);
|
||||||
r = fbufalloc();
|
r = fbufalloc();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue