mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue
When a buffered write submitted with IOCB_DONTCACHE has been successfully submitted, call filemap_fdatawrite_range_kick() to kick off the IO. File systems call generic_write_sync() for any successful buffered write submission, hence add the logic here rather than needing to modify the file system. Link: https://lkml.kernel.org/r/20241220154831.1086649-12-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk> Cc: Brian Foster <bfoster@redhat.com> Cc: Chris Mason <clm@meta.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
dddc559f2e
commit
1d44575765
1 changed files with 5 additions and 0 deletions
|
@ -2912,6 +2912,11 @@ static inline ssize_t generic_write_sync(struct kiocb *iocb, ssize_t count)
|
|||
(iocb->ki_flags & IOCB_SYNC) ? 0 : 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else if (iocb->ki_flags & IOCB_DONTCACHE) {
|
||||
struct address_space *mapping = iocb->ki_filp->f_mapping;
|
||||
|
||||
filemap_fdatawrite_range_kick(mapping, iocb->ki_pos,
|
||||
iocb->ki_pos + count);
|
||||
}
|
||||
|
||||
return count;
|
||||
|
|
Loading…
Add table
Reference in a new issue