summaryrefslogtreecommitdiffstats
path: root/fs/coda/coda_psdev.h
diff options
context:
space:
mode:
authorPedro Cuadra <pjcuadra@gmail.com>2019-07-16 16:29:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-16 19:23:23 -0700
commita9fba24c6ac9b66c09dfc2a0e845ecace187e89c (patch)
treec0985325e935868b52697d0e0167e0023a0e5d9b /fs/coda/coda_psdev.h
parent5bb44810f47a00b608ed2cb9f892ae7ce37b02bd (diff)
downloadlinux-a9fba24c6ac9b66c09dfc2a0e845ecace187e89c.tar.gz
linux-a9fba24c6ac9b66c09dfc2a0e845ecace187e89c.tar.xz
coda: add hinting support for partial file caching
This adds support for partial file caching in Coda. Every read, write and mmap informs the userspace cache manager about what part of a file is about to be accessed so that the cache manager can ensure the relevant parts are available before the operation is allowed to proceed. When a read or write operation completes, this is also reported to allow the cache manager to track when partially cached content can be released. If the cache manager does not support partial file caching, or when the entire file has been fetched into the local cache, the cache manager may return an EOPNOTSUPP error to indicate that intent upcalls are no longer necessary until the file is closed. [akpm@linux-foundation.org: little whitespace fixup] Link: http://lkml.kernel.org/r/20190618181301.6960-1-jaharkes@cs.cmu.edu Signed-off-by: Pedro Cuadra <pjcuadra@gmail.com> Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda/coda_psdev.h')
-rw-r--r--fs/coda/coda_psdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/coda/coda_psdev.h b/fs/coda/coda_psdev.h
index 801423cbbdfc..52da08c770b0 100644
--- a/fs/coda/coda_psdev.h
+++ b/fs/coda/coda_psdev.h
@@ -83,6 +83,9 @@ int coda_downcall(struct venus_comm *vcp, int opcode, union outputArgs *out,
size_t nbytes);
int venus_fsync(struct super_block *sb, struct CodaFid *fid);
int venus_statfs(struct dentry *dentry, struct kstatfs *sfs);
+int venus_access_intent(struct super_block *sb, struct CodaFid *fid,
+ bool *access_intent_supported,
+ size_t count, loff_t ppos, int type);
/*
* Statistics