summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-18 11:09:48 -0700
committerJaegeuk Kim <jaegeuk@google.com>2018-04-20 22:30:46 -0700
commit0f4e0fa71f18604e498ee8458370f367e3b36de3 (patch)
tree7856863e10784c506086c2092620b85618f94273 /fs/splice.c
parentf478c9bfbb71ed9b17af110606eb81a08269003b (diff)
f2fs: refactor read path to allow multiple postprocessing steps
Cherry-pick from origin/upstream-f2fs-stable-linux-4.4.y: c18b4f60c8df ("f2fs: refactor read path to allow multiple postprocessing steps") Currently f2fs's ->readpage() and ->readpages() assume that either the data undergoes no postprocessing, or decryption only. But with fs-verity, there will be an additional authenticity verification step, and it may be needed either by itself, or combined with decryption. To support this, store a 'struct bio_post_read_ctx' in ->bi_private which contains a work struct, a bitmask of postprocessing steps that are enabled, and an indicator of the current step. The bio completion routine, if there was no I/O error, enqueues the first postprocessing step. When that completes, it continues to the next step. Pages that fail any postprocessing step have PageError set. Once all steps have completed, pages without PageError set are set Uptodate, and all pages are unlocked. Also replace f2fs_encrypted_file() with a new function f2fs_post_read_required() in places like direct I/O and garbage collection that really should be testing whether the file needs special I/O processing, not whether it is encrypted specifically. This may also be useful for other future f2fs features such as compression. Change-Id: I742be348b9dfc2113200bcc5366a84e978371a54 Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/splice.c')
0 files changed, 0 insertions, 0 deletions