summaryrefslogtreecommitdiff
path: root/fs/netfs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-02-21 14:38:17 +0300
committerDavid Howells <dhowells@redhat.com>2023-12-28 12:45:24 +0300
commit153a9961b551101cd38e94e26cd92fbfd198b19b (patch)
tree4d45c248dbdaf8ded00848164de353f239f8bac9 /fs/netfs/internal.h
parent016dc8516aec8719641e7aaaacd78d344759178e (diff)
downloadlinux-153a9961b551101cd38e94e26cd92fbfd198b19b.tar.xz
netfs: Implement unbuffered/DIO write support
Implement support for unbuffered writes and direct I/O writes. If the write is misaligned with respect to the fscrypt block size, then RMW cycles are performed if necessary. DIO writes are a special case of unbuffered writes with extra restriction imposed, such as block size alignment requirements. Also provide a field that can tell the code to add some extra space onto the bounce buffer for use by the filesystem in the case of a content-encrypted file. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org
Diffstat (limited to 'fs/netfs/internal.h')
-rw-r--r--fs/netfs/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h
index 886c2e8f841f..2de4f826dbe4 100644
--- a/fs/netfs/internal.h
+++ b/fs/netfs/internal.h
@@ -27,6 +27,12 @@ int netfs_prefetch_for_write(struct file *file, struct folio *folio,
size_t offset, size_t len);
/*
+ * direct_write.c
+ */
+ssize_t netfs_unbuffered_write_iter_locked(struct kiocb *iocb, struct iov_iter *iter,
+ struct netfs_group *netfs_group);
+
+/*
* io.c
*/
int netfs_begin_read(struct netfs_io_request *rreq, bool sync);