[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220209060108.43051-22-jefflexu@linux.alibaba.com>
Date: Wed, 9 Feb 2022 14:01:07 +0800
From: Jeffle Xu <jefflexu@...ux.alibaba.com>
To: dhowells@...hat.com, linux-cachefs@...hat.com, xiang@...nel.org,
chao@...nel.org, linux-erofs@...ts.ozlabs.org
Cc: torvalds@...ux-foundation.org, gregkh@...uxfoundation.org,
willy@...radead.org, linux-fsdevel@...r.kernel.org,
joseph.qi@...ux.alibaba.com, bo.liu@...ux.alibaba.com,
tao.peng@...ux.alibaba.com, gerry@...ux.alibaba.com,
eguan@...ux.alibaba.com, linux-kernel@...r.kernel.org
Subject: [PATCH v3 21/22] erofs: implement fscache-based data readahead for inline layout
Signed-off-by: Jeffle Xu <jefflexu@...ux.alibaba.com>
---
fs/erofs/fscache.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c
index ef5eef33e3d5..003f9abdaf1b 100644
--- a/fs/erofs/fscache.c
+++ b/fs/erofs/fscache.c
@@ -198,6 +198,7 @@ static int erofs_fscache_readpage(struct file *file, struct page *page)
enum erofs_fscache_readahead_type {
EROFS_FSCACHE_READAHEAD_TYPE_HOLE,
EROFS_FSCACHE_READAHEAD_TYPE_NOINLINE,
+ EROFS_FSCACHE_READAHEAD_TYPE_INLINE,
};
static int erofs_fscache_do_readahead(struct readahead_control *rac,
@@ -231,6 +232,9 @@ static int erofs_fscache_do_readahead(struct readahead_control *rac,
ret = erofs_fscache_readpage_noinline(page, fsmap);
fsmap->m_pa += EROFS_BLKSIZ;
break;
+ case EROFS_FSCACHE_READAHEAD_TYPE_INLINE:
+ ret = erofs_fscache_readpage_inline(page, fsmap);
+ break;
default:
DBG_BUGON(1);
return -EINVAL;
@@ -285,6 +289,10 @@ static void erofs_fscache_readahead(struct readahead_control *rac)
ret = erofs_fscache_do_readahead(rac, &fsmap,
EROFS_FSCACHE_READAHEAD_TYPE_NOINLINE);
break;
+ case EROFS_INODE_FLAT_INLINE:
+ ret = erofs_fscache_do_readahead(rac, &fsmap,
+ EROFS_FSCACHE_READAHEAD_TYPE_INLINE);
+ break;
default:
DBG_BUGON(1);
return;
--
2.27.0
Powered by blists - more mailing lists