* [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
2023-01-06 12:53 [RFC PATCH 0/6] erofs: support page cache sharing between EROFS images " Jingbo Xu
@ 2023-01-06 12:53 ` Jingbo Xu
0 siblings, 0 replies; 5+ messages in thread
From: Jingbo Xu @ 2023-01-06 12:53 UTC (permalink / raw)
To: xiang, chao, linux-erofs; +Cc: linux-fsdevel, huyue2, linux-kernel
Erofs supports chunk deduplication to reduce disk usage. Furthermore we
can make inodes share page cache of these deduplicated chunks to reduce
the memory usage. This shall be much usable in container scenarios as
deduplication is requisite for container image.
This can be achieved by managing page cache of deduplicated chunks in
blob's address space. In this way, all inodes sharing the deduplicated
chunk will refer to and share the page cache in the blob's address
space.
So far there are some restrictions for enabling this feature.
The page cache sharing feature also supports .mmap(). The reverse
mapping requires that one vma can not be shared among inodes and can
be linked to only one inode. As the vma will be finally linked to the
blob's address space when page cache sharing enabled, the restriction of
the reverse mapping actually requires that the mapped file area can not
be mapped to multiple blobs. Thus page cache sharing can only be
enabled for those files mapped to one blob.
The chunk based data layout guarantees that a chunk will not cross the
device (blob) boundary. Thus in chunk based data layout, those files
smaller than the chunk size shall be guaranteed to be mapped to one
blob. As chunk size is tunable at a per-file basis, this restriction
can be relaxed at image building phase. As long as we ensure that the
file can not be deduplicated, the file's chunk size can be set to a
reasonable value larger than the file size, so that the page cache
sharing feature can be enabled on this file later.
The second restriction is that EROFS_BLKSIZ mus be multiples of
PAGE_SIZE to avoid data leakage. Otherwise unrelated data may be
exposed at the end of the last page, since file's data is arranged in
unit of EROFS_BLKSIZ in the image.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
fs/erofs/inode.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index d3b8736fa124..8fe9b29422b5 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -241,6 +241,29 @@ static int erofs_fill_symlink(struct inode *inode, void *kaddr,
return 0;
}
+static bool erofs_can_share_page_cache(struct inode *inode)
+{
+ struct erofs_inode *vi = EROFS_I(inode);
+
+ /* enable page cache sharing only in share domain mode */
+ if (!erofs_is_fscache_mode(inode->i_sb) ||
+ !EROFS_SB(inode->i_sb)->domain_id)
+ return false;
+
+ if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
+ return false;
+
+ /* avoid crossing multi devicces/blobs */
+ if (inode->i_size > 1UL << vi->chunkbits)
+ return false;
+
+ /* avoid data leakage in mmap routine */
+ if (EROFS_BLKSIZ % PAGE_SIZE)
+ return false;
+
+ return true;
+}
+
static int erofs_fill_inode(struct inode *inode)
{
struct erofs_inode *vi = EROFS_I(inode);
@@ -262,6 +285,10 @@ static int erofs_fill_inode(struct inode *inode)
inode->i_op = &erofs_generic_iops;
if (erofs_inode_is_data_compressed(vi->datalayout))
inode->i_fop = &generic_ro_fops;
+#ifdef CONFIG_EROFS_FS_ONDEMAND
+ else if (erofs_can_share_page_cache(inode))
+ inode->i_fop = &erofs_fscache_share_file_fops;
+#endif
else
inode->i_fop = &erofs_file_fops;
break;
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
@ 2023-01-06 12:53 ` Jingbo Xu
0 siblings, 0 replies; 5+ messages in thread
From: Jingbo Xu @ 2023-01-06 12:53 UTC (permalink / raw)
To: xiang, chao, linux-erofs; +Cc: huyue2, linux-kernel, linux-fsdevel
Erofs supports chunk deduplication to reduce disk usage. Furthermore we
can make inodes share page cache of these deduplicated chunks to reduce
the memory usage. This shall be much usable in container scenarios as
deduplication is requisite for container image.
This can be achieved by managing page cache of deduplicated chunks in
blob's address space. In this way, all inodes sharing the deduplicated
chunk will refer to and share the page cache in the blob's address
space.
So far there are some restrictions for enabling this feature.
The page cache sharing feature also supports .mmap(). The reverse
mapping requires that one vma can not be shared among inodes and can
be linked to only one inode. As the vma will be finally linked to the
blob's address space when page cache sharing enabled, the restriction of
the reverse mapping actually requires that the mapped file area can not
be mapped to multiple blobs. Thus page cache sharing can only be
enabled for those files mapped to one blob.
The chunk based data layout guarantees that a chunk will not cross the
device (blob) boundary. Thus in chunk based data layout, those files
smaller than the chunk size shall be guaranteed to be mapped to one
blob. As chunk size is tunable at a per-file basis, this restriction
can be relaxed at image building phase. As long as we ensure that the
file can not be deduplicated, the file's chunk size can be set to a
reasonable value larger than the file size, so that the page cache
sharing feature can be enabled on this file later.
The second restriction is that EROFS_BLKSIZ mus be multiples of
PAGE_SIZE to avoid data leakage. Otherwise unrelated data may be
exposed at the end of the last page, since file's data is arranged in
unit of EROFS_BLKSIZ in the image.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
fs/erofs/inode.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index d3b8736fa124..8fe9b29422b5 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -241,6 +241,29 @@ static int erofs_fill_symlink(struct inode *inode, void *kaddr,
return 0;
}
+static bool erofs_can_share_page_cache(struct inode *inode)
+{
+ struct erofs_inode *vi = EROFS_I(inode);
+
+ /* enable page cache sharing only in share domain mode */
+ if (!erofs_is_fscache_mode(inode->i_sb) ||
+ !EROFS_SB(inode->i_sb)->domain_id)
+ return false;
+
+ if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
+ return false;
+
+ /* avoid crossing multi devicces/blobs */
+ if (inode->i_size > 1UL << vi->chunkbits)
+ return false;
+
+ /* avoid data leakage in mmap routine */
+ if (EROFS_BLKSIZ % PAGE_SIZE)
+ return false;
+
+ return true;
+}
+
static int erofs_fill_inode(struct inode *inode)
{
struct erofs_inode *vi = EROFS_I(inode);
@@ -262,6 +285,10 @@ static int erofs_fill_inode(struct inode *inode)
inode->i_op = &erofs_generic_iops;
if (erofs_inode_is_data_compressed(vi->datalayout))
inode->i_fop = &generic_ro_fops;
+#ifdef CONFIG_EROFS_FS_ONDEMAND
+ else if (erofs_can_share_page_cache(inode))
+ inode->i_fop = &erofs_fscache_share_file_fops;
+#endif
else
inode->i_fop = &erofs_file_fops;
break;
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
@ 2023-01-18 23:01 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-01-18 23:01 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "gcc: unused function warning for stub function"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230106125330.55529-7-jefflexu@linux.alibaba.com>
References: <20230106125330.55529-7-jefflexu@linux.alibaba.com>
TO: Jingbo Xu <jefflexu@linux.alibaba.com>
Hi Jingbo,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on xiang-erofs/dev xiang-erofs/fixes linus/master v6.2-rc4 next-20230118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
patch link: https://lore.kernel.org/r/20230106125330.55529-7-jefflexu%40linux.alibaba.com
patch subject: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
:::::: branch date: 12 days ago
:::::: commit date: 12 days ago
config: i386-randconfig-a004-20220328 (https://download.01.org/0day-ci/archive/20230119/202301190654.hZ4dPPlb-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/5c565bd6afacc699309e9fc20119d91501a5d3ae
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
git checkout 5c565bd6afacc699309e9fc20119d91501a5d3ae
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/ lib//
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/erofs/inode.c:244:13: warning: 'erofs_can_share_page_cache' defined but not used [-Wunused-function]
244 | static bool erofs_can_share_page_cache(struct inode *inode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/erofs_can_share_page_cache +244 fs/erofs/inode.c
431339ba90423a0 drivers/staging/erofs/inode.c Gao Xiang 2018-07-26 243
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 @244 static bool erofs_can_share_page_cache(struct inode *inode)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 245 {
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 246 struct erofs_inode *vi = EROFS_I(inode);
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 247
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 248 /* enable page cache sharing only in share domain mode */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 249 if (!erofs_is_fscache_mode(inode->i_sb) ||
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 250 !EROFS_SB(inode->i_sb)->domain_id)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 251 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 252
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 253 if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 254 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 255
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 256 /* avoid crossing multi devicces/blobs */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 257 if (inode->i_size > 1UL << vi->chunkbits)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 258 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 259
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 260 /* avoid data leakage in mmap routine */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 261 if (EROFS_BLKSIZ % PAGE_SIZE)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 262 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 263
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 264 return true;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 265 }
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 266
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
@ 2023-01-19 1:06 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-01-19 1:06 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "gcc: unused function warning for stub function"
::::::
BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230106125330.55529-7-jefflexu@linux.alibaba.com>
References: <20230106125330.55529-7-jefflexu@linux.alibaba.com>
TO: Jingbo Xu <jefflexu@linux.alibaba.com>
Hi Jingbo,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on xiang-erofs/dev xiang-erofs/fixes linus/master v6.2-rc4 next-20230118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
patch link: https://lore.kernel.org/r/20230106125330.55529-7-jefflexu%40linux.alibaba.com
patch subject: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
:::::: branch date: 13 days ago
:::::: commit date: 13 days ago
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20230119/202301190850.EDJzy3Cz-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/5c565bd6afacc699309e9fc20119d91501a5d3ae
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
git checkout 5c565bd6afacc699309e9fc20119d91501a5d3ae
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/erofs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/erofs/inode.c:244:13: warning: unused function 'erofs_can_share_page_cache' [-Wunused-function]
static bool erofs_can_share_page_cache(struct inode *inode)
^
1 warning generated.
vim +/erofs_can_share_page_cache +244 fs/erofs/inode.c
431339ba90423a0 drivers/staging/erofs/inode.c Gao Xiang 2018-07-26 243
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 @244 static bool erofs_can_share_page_cache(struct inode *inode)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 245 {
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 246 struct erofs_inode *vi = EROFS_I(inode);
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 247
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 248 /* enable page cache sharing only in share domain mode */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 249 if (!erofs_is_fscache_mode(inode->i_sb) ||
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 250 !EROFS_SB(inode->i_sb)->domain_id)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 251 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 252
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 253 if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 254 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 255
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 256 /* avoid crossing multi devicces/blobs */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 257 if (inode->i_size > 1UL << vi->chunkbits)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 258 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 259
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 260 /* avoid data leakage in mmap routine */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 261 if (EROFS_BLKSIZ % PAGE_SIZE)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 262 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 263
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 264 return true;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 265 }
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 266
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
2023-01-06 12:53 ` Jingbo Xu
(?)
@ 2023-01-19 8:54 ` kernel test robot
-1 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-01-19 8:54 UTC (permalink / raw)
To: Jingbo Xu; +Cc: oe-kbuild-all
Hi Jingbo,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on xiang-erofs/dev xiang-erofs/fixes linus/master v6.2-rc4 next-20230118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
patch link: https://lore.kernel.org/r/20230106125330.55529-7-jefflexu%40linux.alibaba.com
patch subject: [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode
config: i386-randconfig-a004-20220328 (https://download.01.org/0day-ci/archive/20230119/202301190654.hZ4dPPlb-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/5c565bd6afacc699309e9fc20119d91501a5d3ae
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jingbo-Xu/erofs-remove-unused-device-mapping-in-the-meta-routine/20230106-205600
git checkout 5c565bd6afacc699309e9fc20119d91501a5d3ae
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/ lib//
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/erofs/inode.c:244:13: warning: 'erofs_can_share_page_cache' defined but not used [-Wunused-function]
244 | static bool erofs_can_share_page_cache(struct inode *inode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Please consider guarding the implementation of erofs_can_share_page_cache with CONFIG_EROFS_FS_ONDEMAND.
vim +/erofs_can_share_page_cache +244 fs/erofs/inode.c
431339ba90423a0 drivers/staging/erofs/inode.c Gao Xiang 2018-07-26 243
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 @244 static bool erofs_can_share_page_cache(struct inode *inode)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 245 {
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 246 struct erofs_inode *vi = EROFS_I(inode);
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 247
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 248 /* enable page cache sharing only in share domain mode */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 249 if (!erofs_is_fscache_mode(inode->i_sb) ||
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 250 !EROFS_SB(inode->i_sb)->domain_id)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 251 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 252
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 253 if (vi->datalayout != EROFS_INODE_CHUNK_BASED)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 254 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 255
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 256 /* avoid crossing multi devicces/blobs */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 257 if (inode->i_size > 1UL << vi->chunkbits)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 258 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 259
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 260 /* avoid data leakage in mmap routine */
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 261 if (EROFS_BLKSIZ % PAGE_SIZE)
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 262 return false;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 263
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 264 return true;
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 265 }
5c565bd6afacc69 fs/erofs/inode.c Jingbo Xu 2023-01-06 266
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-19 8:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 23:01 [RFC PATCH 6/6] erofs: enable page cache sharing in fscache mode kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-01-19 1:06 kernel test robot
2023-01-06 12:53 [RFC PATCH 0/6] erofs: support page cache sharing between EROFS images " Jingbo Xu
2023-01-06 12:53 ` [RFC PATCH 6/6] erofs: enable page cache sharing " Jingbo Xu
2023-01-06 12:53 ` Jingbo Xu
2023-01-19 8:54 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.