Whamcloud - gitweb
LU-13745 pcc: fall back normal splice read for detached file 96/40396/4
authorQian Yingjin <qian@ddn.com>
Mon, 26 Oct 2020 02:37:26 +0000 (10:37 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Dec 2020 05:28:07 +0000 (05:28 +0000)
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 <qian@ddn.com>
Change-Id: Iff3449069a0a12ac56b58618e474749361c31bb7
Reviewed-on: https://review.whamcloud.com/40396
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index cfad000..c51a735 100644 (file)
@@ -1806,14 +1806,14 @@ ssize_t pcc_file_splice_read(struct file *in_file, loff_t *ppos,
-       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);