]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
netfs: Pass more information on how to deal with a hole in the cache
authorDavid Howells <dhowells@redhat.com>
Tue, 14 Sep 2021 08:47:45 +0000 (09:47 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 14:28:53 +0000 (14:28 +0000)
commitf817db66a0e42406b64510b296211839ce6e8500
tree3d8e4e4838cb9c0acb506f822bce33df74dfa5b9
parent7c7fa67690ffd5e3e1a0ceb94ea6116dd1a6d60f
netfs: Pass more information on how to deal with a hole in the cache

Pass more information to the cache on how to deal with a hole if it
encounters one when trying to read from the cache.  Three options are
provided:

 (1) NETFS_READ_HOLE_IGNORE.  Read the hole along with the data, assuming
     it to be a punched-out extent by the backing filesystem.

 (2) NETFS_READ_HOLE_CLEAR.  If there's a hole, erase the requested region
     of the cache and clear the read buffer.

 (3) NETFS_READ_HOLE_FAIL.  Fail the read if a hole is detected.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
fs/netfs/read_helper.c
include/linux/netfs.h