From: Qian Yingjin Date: Mon, 26 Oct 2020 02:37:26 +0000 (+0800) Subject: LU-13745 pcc: fall back normal splice read for detached file X-Git-Tag: 2.14.0-RC1~50 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=cca45ad8aeaa8e124e9e48361bf7cff89a035f82;ds=sidebyside LU-13745 pcc: fall back normal splice read for detached file For the file that was once cached into PCC but detached from PCC later, it should fall back into the normal I/O path to direct I/Os to Lustre OSTs for splice read, not just return zero. Signed-off-by: Qian Yingjin Change-Id: Iff3449069a0a12ac56b58618e474749361c31bb7 Reviewed-on: https://review.whamcloud.com/40396 Reviewed-by: James Simmons Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/pcc.c b/lustre/llite/pcc.c index cfad000..c51a735 100644 --- a/lustre/llite/pcc.c +++ b/lustre/llite/pcc.c @@ -1806,14 +1806,14 @@ ssize_t pcc_file_splice_read(struct file *in_file, loff_t *ppos, ENTRY; - if (!pcc_file) { + if (!pcc_file) RETURN(default_file_splice_read(in_file, ppos, pipe, - count, flags)); - } + count, flags)); pcc_io_init(inode, PIT_SPLICE_READ, &cached); if (!cached) - RETURN(0); + RETURN(default_file_splice_read(in_file, ppos, pipe, + count, flags)); result = default_file_splice_read(pcc_file, ppos, pipe, count, flags);