forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fscache: Implement a fallback I/O interface to replace the old API
Implement an alternative to using the netfslib-base I/O API so that we can move forwards on getting rid of the old API. Note that this API is should not be used by new filesystems as it still uses the backing filesystem to track unfilled holes in the backing file, though using SEEK_DATA/SEEK_HOLE rather than bmap(). This is dangerous and can lead to corrupted data as the backing filesystem cannot be relied on not to fill in holes with blocks of zeros in order to optimise an extent list[1]. It may also punch out blocks of zeros to create holes for the same reason, but this is less of a problem. Also adjust the macros that must be defined to indicate which API is to be used: (*) FSCACHE_USE_OLD_IO_API - Use the current upstream API. This will be deleted. (*) FSCACHE_USE_FALLBACK_IO_API - Use the API added here. (*) FSCACHE_USE_NEW_IO_API - Use the new API or netfs API. Changes ======= ver #2: - Changed "deprecated" to "fallback" in the new function names[2]. - Need to define FSCACHE_USE_FALLBACK_IO_API in fscache/io.c to enable the prototypes of the functions[3]. - Removed a couple of unused variables[3]. - Make netfs/read_helpers.c use NETFS_READ_HOLE_*. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Dave Wysochanski <dwysocha@redhat.com> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/YO17ZNOcq+9PajfQ@mit.edu/ [1] Link: https://lore.kernel.org/r/CAHk-=wiVK+1CyEjW8u71zVPK8msea=qPpznX35gnX+s8sXnJTg@mail.gmail.com/ [2] Link: https://lore.kernel.org/r/202109150420.QX7dDzSE-lkp@intel.com/ [3] Link: https://lore.kernel.org/r/163162770137.438332.13788466444753625553.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/163189107352.2509237.759630157032861275.stgit@warthog.procyon.org.uk/ # rfc v2
- Loading branch information
Showing
11 changed files
with
314 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.