summaryrefslogtreecommitdiffstats
path: root/fs/netfs/main.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-02-21 11:38:17 +0000
committerDavid Howells <dhowells@redhat.com>2023-12-28 09:45:24 +0000
commit153a9961b551101cd38e94e26cd92fbfd198b19b (patch)
tree4d45c248dbdaf8ded00848164de353f239f8bac9 /fs/netfs/main.c
parent016dc8516aec8719641e7aaaacd78d344759178e (diff)
downloadlinux-153a9961b551101cd38e94e26cd92fbfd198b19b.tar.gz
linux-153a9961b551101cd38e94e26cd92fbfd198b19b.tar.bz2
linux-153a9961b551101cd38e94e26cd92fbfd198b19b.zip
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/main.c')
-rw-r--r--fs/netfs/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/netfs/main.c b/fs/netfs/main.c
index abb8857486ee..8e4db9ff40c4 100644
--- a/fs/netfs/main.c
+++ b/fs/netfs/main.c
@@ -26,11 +26,13 @@ LIST_HEAD(netfs_io_requests);
DEFINE_SPINLOCK(netfs_proc_lock);
static const char *netfs_origins[nr__netfs_io_origin] = {
- [NETFS_READAHEAD] = "RA",
- [NETFS_READPAGE] = "RP",
- [NETFS_READ_FOR_WRITE] = "RW",
- [NETFS_WRITEBACK] = "WB",
- [NETFS_DIO_READ] = "DR",
+ [NETFS_READAHEAD] = "RA",
+ [NETFS_READPAGE] = "RP",
+ [NETFS_READ_FOR_WRITE] = "RW",
+ [NETFS_WRITEBACK] = "WB",
+ [NETFS_UNBUFFERED_WRITE] = "UW",
+ [NETFS_DIO_READ] = "DR",
+ [NETFS_DIO_WRITE] = "DW",
};
/*