Re: [f2fs-dev] [PATCH] f2fs: fix O_DIRECT cleanup range for append writes
정성재 <[email protected]>
| Newsgroups | net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAPHXVrzgPpxgAJrCmJ_Ro19AertMnqKfC1oW_y_FpbLoqO7nug@mail.gmail.com> |
> If generic_write_checks() can adjust writing position or amount of bytes > to write, shouldn't we access iocb->ki_pos and iov_iter_count(from) after > generic_write_checks()? Yes, agreed. generic_write_checks() can adjust both iocb->ki_pos and the iterator count. I noticed that the pinned file overwrite check uses pos and count saved before f2fs_write_checks(). I plan to keep the check in f2fs_file_write_iter(), but move it after f2fs_write_checks() and use the adjusted iocb->ki_pos and iov_iter_count(from). This also keeps the change local to f2fs_file_write_iter(), where other checks are already performed after f2fs_write_checks(). For the buffered cleanup, as in my original patch, I plan to save the adjusted write position after f2fs_write_checks() and use it for f2fs_flush_buffered_write(). Does this approach look reasonable to you? Thanks, Seongjae _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel