mount过程

IopCreateFile=>IoMountVolume=>IopMountFileSystem

IopMountFileSystem构造IRP
StackPtr->MajorFunction = IRP_MJ_FILE_SYSTEM_CONTROL;
StackPtr->MinorFunction = IRP_MN_MOUNT_VOLUME;

然后依次查询注册过的分区驱动,如vfat、ntfs等

这个IRP经过IoCallDriver到达vfat的设备

VfatBuildRequest=>VfatDispatchRequest=>VfatFileSystemControl=>VfatMount

1.VfatMount通过VfatHasFileSystem查看是fat16、fat32、fat12等。
2.VfatMount调用VfatMountDevice
3.VfatMount调用IoCreateStreamFileObject

转载于:https://www.cnblogs.com/fanzi2009/archive/2009/06/24/1510401.html

你可能感兴趣的:(mount过程)