]> git.baikalelectronics.ru Git - kernel.git/commit
fs: introduce iomap infrastructure
authorChristoph Hellwig <hch@lst.de>
Mon, 20 Jun 2016 23:23:11 +0000 (09:23 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 20 Jun 2016 23:23:11 +0000 (09:23 +1000)
commit94f15e444f0fc55d89e19f9bffb62d84e4f5c05f
treea3c07fa9fb8c61475ff85f4d8812d83c287258ff
parentd2b9342654a5777fb8f33a247a9efe63c4f72fca
fs: introduce iomap infrastructure

Add infrastructure for multipage buffered writes.  This is implemented
using an main iterator that applies an actor function to a range that
can be written.

This infrastucture is used to implement a buffered write helper, one
to zero file ranges and one to implement the ->page_mkwrite VM
operations.  All of them borrow a fair amount of code from fs/buffers.
for now by using an internal version of __block_write_begin that
gets passed an iomap and builds the corresponding buffer head.

The file system is gets a set of paired ->iomap_begin and ->iomap_end
calls which allow it to map/reserve a range and get a notification
once the write code is finished with it.

Based on earlier code from Dave Chinner.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/Kconfig
fs/Makefile
fs/buffer.c
fs/internal.h
fs/iomap.c [new file with mode: 0644]
include/linux/iomap.h