Hello, Okajima-san, and folks, A recent Docker issue reports that AUFS does not work with `fcntl(fd, F_SETFL, O_APPEND)`. How to reproduce the situation is also attached in the issue ticket. https://github.com/docker/docker/issues/20199
I found a workaround which disables `aufs_write()` and uses `aufs_write_iter()` instead, even for non-vectorized `write()` calls. I tested with Ubuntu kernel 4.2.0-27.32 (AUFS 20150629). diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c index 2c34864..efc46bc 100644 --- a/fs/aufs/f_op.c +++ b/fs/aufs/f_op.c @@ -708,8 +708,8 @@ const struct file_operations aufs_file_fop = { .llseek = default_llseek, - .read = aufs_read, - .write = aufs_write, + // .read = aufs_read, + // .write = aufs_write, .read_iter = aufs_read_iter, .write_iter = aufs_write_iter, In this workaround, underlying `h_file->f_op->write_iter` calls `generic_write_checks()`, and `generic_write_checks()` handles `fcntl(fd, F_SETFL, O_APPEND)`. Although it should be possible to add `O_APPEND` check for `aufs_write`, removing `aufs_write` seems the simplest solution. I know that the `write_iter` operation does not exist in Linux < 3.16, but I believe it does not matter because AUFS is no longer maintained for Linux < 3.18. Do you think it is possible to adopt my workaround? Regards, Akihiro Suda ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140