]> git.baikalelectronics.ru Git - kernel.git/commit
coda: add hinting support for partial file caching
authorPedro Cuadra <pjcuadra@gmail.com>
Tue, 16 Jul 2019 23:29:13 +0000 (16:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jul 2019 02:23:23 +0000 (19:23 -0700)
commit6ef9e77ba9ef60fbdbf3e1eb09d9841ea7acfd58
treec0985325e935868b52697d0e0167e0023a0e5d9b
parent04ce29ce7474b62e4281338bc0447432811df2e4
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>
fs/coda/coda_fs_i.h
fs/coda/coda_psdev.h
fs/coda/file.c
fs/coda/psdev.c
fs/coda/upcall.c
include/uapi/linux/coda.h