回合linux社区主线补丁
59cda49ecf6c shmem: allow reporting fanotify events with file handles on tmpfs
9591c3a34f77 fs: introduce a wrapper uuid_to_fsid()
使 fanotify support tmpfs
Hi cool-water, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @pi3orama , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @Qiuuuuu , @刘勇强 , @Xie XiuQi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
原理:
将 uuid 转化为 tmpfs 的 f_fsid, 作为tmpfs的唯一标识来区分多个 tmpfs 对象
然后允许设置一个 fanotify 标记
置上该标记后可以通过文件句柄在tmpfs上面报告相关事件
59cda49ecf6c shmem: allow reporting fanotify events with file handles on tmpfs
9591c3a34f77 fs: introduce a wrapper uuid_to_fsid()
从主线 5.13 回合上述两个补丁,
在第一个补丁中将 ext2/ext4/zonefs 这几个文件系统中 statfs 时
通过 uuid 计算 fsid 的代码逻辑封装到一个通用函数 uuid_to_fsid 中
减少了重复代码的数量
在第二补丁中 用上个补丁封装的函数 uuid_to_fsid 为 tmpfs 的 buf->f_fsid 赋值
使得可以在 tmpfs 上使用 fanotify
登录 后才可以发表评论