Linux源码笔记 - mount

 

(一)在Linux的VFS上,各种文件系统对mount操作的注册


do_mount
   => do_new_mount
   ==> vfs_kern_mount
   ===> mount_fs

 

   各主流文件系统注册的回调函数举例:

   file_system_type->mount

    ====>  aio_mount
    ====>  ext2_mount
    ====>  ext3_mount
    ====>  ext4_mount
    ====>  ntfs_mount
    ====>  sysfs_mount
    ====>  cgroup_mount
    ====>  cifs_do_mount
    ====>  nfs_fs_mount
    ====>  nfs4_remote_mount
    ====>  ceph_mount
    ====>  lustre_mount

(二)NFSv3协议,对mount的实现

nfs_fs_mount
=> nfs_subversion->rpc_ops->try_mount
==> nfs_try_mount
===> nfs_try_mount_request
====> nfs_request_mount
=====> nfs_mount
======> rpc_create
======> rpc_call_sync
=======> rpc_run_task
========> rpc_execute
==========> _rpc_execute
===========> do_action

 

 

 

(三)NFSv4协议,对mount的实现

nfs4_remote_mount

 => nfs4_create_server

   ==> nfs4_init_server

     ===> nfs4_set_client

     ===> nfs_init_server_rpcclient

   ==> nfs4_server_common_setup

     ===> nfs4_init_session

     ===> nfs4_get_rootfh

     ===> nfs_probe_fsinfo

 => nfs_fs_mount_common

   ==> nfs_get_root

(四)ceph_mount

ceph_mount

   ==》 ceph_real_mount

      ===》 open_root_dentry

          ====》ceph_mdsc_create_request

          ====》ceph_mdsc_do_request

          ====》ceph_init_dentry

          ====》ceph_mdsc_put_request

 

posted @   乌鸦嘴-raven  阅读(367)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
点击右上角即可分享
微信分享提示