Bug 43178
Summary: | pwrite() should not be affected by O_APPEND | ||
---|---|---|---|
Product: | File System | Reporter: | Michael Kerrisk (mtk.manpages) |
Component: | VFS | Assignee: | fs_vfs |
Status: | NEW --- | ||
Severity: | normal | CC: | alan, szg00000, tss |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | Test program |
Description
Michael Kerrisk
2012-04-29 19:32:30 UTC
Timo Sirainen also noted this issue: http://thread.gmane.org/gmane.linux.kernel/513390 Created attachment 73123 [details]
Test program
Test program and example that demonstrates the issue:
$ cat > a
aaaaaaa
bbbbbbb
ccccccc
ddddddd
$ ./t_pwrite_O_APPEND a 5 XXXXX y
$ cat a
aaaaaaa
bbbbbbb
ccccccc
ddddddd
XXXXX$
In the above, the XXXXX string should have been placed at offset 5 of the file 'a'.
Not clear what the fix is however.. we can't just ignore it because of the appendonly attribute. |