* [merged] fs-affs-filec-fix-direct-io-writes-beyond-eof.patch removed from -mm tree
@ 2015-02-18 19:43 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2015-02-18 19:43 UTC (permalink / raw
To: fabf, jack, mm-commits
The patch titled
Subject: fs/affs/file.c: fix direct IO writes beyond EOF
has been removed from the -mm tree. Its filename was
fs-affs-filec-fix-direct-io-writes-beyond-eof.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Fabian Frederick <fabf@skynet.be>
Subject: fs/affs/file.c: fix direct IO writes beyond EOF
Use the same fallback to normal IO in case of write
operations beyond EOF as fat direct IO. This patch fixes
fsx file -d -Z -r 4096 -w 4096
Report:
129(129 mod 256): TRUNCATE DOWN from 0x3ff01 to 0xb3f6
130(130 mod 256): WRITE 0x22000 thru 0x2dfff (0xc000 bytes) HOLE
Thanks to Jan for helping me on this problem.
The ideal solution suggested by Jan Kara would be to use
cont_write_begin() but affs direct_IO shouldn't be used a lot anyway...
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/affs/file.c | 7 +++++++
1 file changed, 7 insertions(+)
diff -puN fs/affs/file.c~fs-affs-filec-fix-direct-io-writes-beyond-eof fs/affs/file.c
--- a/fs/affs/file.c~fs-affs-filec-fix-direct-io-writes-beyond-eof
+++ a/fs/affs/file.c
@@ -398,6 +398,13 @@ affs_direct_IO(int rw, struct kiocb *ioc
size_t count = iov_iter_count(iter);
ssize_t ret;
+ if (rw == WRITE) {
+ loff_t size = offset + count;
+
+ if (AFFS_I(inode)->mmu_private < size)
+ return 0;
+ }
+
ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, affs_get_block);
if (ret < 0 && (rw & WRITE))
affs_write_failed(mapping, offset + count);
_
Patches currently in -mm which might be from fabf@skynet.be are
origin.patch
fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-18 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 19:43 [merged] fs-affs-filec-fix-direct-io-writes-beyond-eof.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.