Description of problem: erofs 使用fsid挂载时,读读.c, .h文本文件乱码 Version-Release number of selected component (if applicable): ck-release-4.19, tag: 4.19.91-27 How reproducible: Steps to Reproduce: 1. 编译4.19.91-27的内核安装,打开CONFIG_EROFS_FS_ONDEMAND=y, CONFIG_CACHEFILES_ONDEMAND=y。 2. 下载测试代码:https://github.com/lostjeffle/demand-read-cachefilesd 3. cd demand-read-cachefilesd && mkdir mp cache 4. ./run.sh . mp cache Actual results: 读文本文件:README.md可以正常显示: $ vim README.md [Quick Test] ============ 1. Start cachefilesd2 daemon ---------------------------- You could run run.sh to start a quick test. This test will run mkfs.erofs from @inputdir directory, start the cachefilesd2 daemon, and mount the built erofs at @mntdir. ...... 读hash.c等.c, .h文件显示乱码: $ vim hash.c ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ..... Expected results: 读文本文件显示正常结果 Additional info: 使用普通的erofs是可以正常显示的: $ mkfs.erofs test.img demand-read-cachefilesd-main/ $ sudo mount -t erofs -o loop test.img mp $ vim hash.c #define _GNU_SOURCE #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <stdint.h> ...
非bug,是我操作失误!