Skip to content

Commit

Permalink
netfs: Implement buffered writes through netfs_file_write_iter()
Browse files Browse the repository at this point in the history
Institute a netfs write helper, netfs_file_write_iter(), to be pointed at
by the network filesystem ->write_iter() call.  Make it handled buffered
writes by copying the data into the pagecache and creating a dirty regions
to represent contiguous spans of compatible data.

Dirty regions are considered compatible, and thus mergeable, if they are
part of the same flush group, have the same fscache requirements and have
the same O_SYNC/O_DSYNC characteristics - plus any constraints the netfs
wishes to add.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
dhowells committed Feb 16, 2022
1 parent 2146fb6 commit 261cd62
Show file tree
Hide file tree
Showing 6 changed files with 956 additions and 14 deletions.
1 change: 1 addition & 0 deletions fs/netfs/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0

netfs-y := \
buffered_write.o \
direct.o \
misc.o \
objects.o \
Expand Down

0 comments on commit 261cd62

Please sign in to comment.