阅读:6075回复:11
完全格式化和快速格式化到底有什么区别,困扰好久了,请各位大侠赐教
我在自己写的总线驱动上将文件虚拟成一个硬盘,可以进行分区,也能进行快速格式化,但是在完全格式化时,进度条到最后,总是提示格式化无法完成,这两种格式化方式到底有什么区别呢,请各位大哥大姐帮帮小弟
![]() |
|
最新喜欢:![]()
|
沙发#
发布于:2007-03-22 12:44
你的driver是哪种?
|
|
|
板凳#
发布于:2007-03-22 19:35
我的DRIVER是一个虚拟总线驱动,总线驱动创建PDO,disk.sys就是附加在这个PDO上,硬盘的由总线驱动来虚拟,现在读写分区都没有问题,就是不能进行完全格式化,只能快速格式化.
|
|
|
地板#
发布于:2007-03-27 13:49
跟踪看看哪个irp失败了
|
|
地下室#
发布于:2007-04-01 10:26
传说中的tooflat 大虾来了,是这样的程序中的所有的命令都是成功执行的,我怀疑的是校验命令没有正确处理,我是直接返回成功的,还有一个控制码是0x0066001B命令我也不知道是什么命令,所以没有处理,直接返回STATUS_NOT_IMPLEMENTED或者STATUS_SUCCESS都试过。不知道这个命令是什么命令,查不到资料。
|
|
|
5楼#
发布于:2007-04-14 09:51
终于搞定了。
|
|
|
6楼#
发布于:2007-04-17 07:23
引用第5楼redhatking于2007-04-14 09:51发表的“”: 楼上的兄弟,我也在看一些disk.sys方面的东西。对于windows下的格式化,没有办法搞清楚它到底在干什么。你能否把一些经验分享一下? |
|
|
7楼#
发布于:2007-04-17 08:29
其实非常简单,格式化就是读写磁盘,建立对应的文件系统,完全格式化主比快速格式化多开始的磁盘校验的功能
|
|
|
8楼#
发布于:2007-04-17 22:11
引用第7楼redhatking于2007-04-17 08:29发表的“”: 谢谢!那如何区别普通读写磁盘和格式化读写磁盘呢?老兄能不能把IRP的流程告知呢? |
|
|
9楼#
发布于:2007-04-17 23:36
格式化读写是向磁盘驱动发读写扇区IRP,主要操作是建立文件分配表之类的(当然具体操作是调用系统函数来完全成)
普通读写是先向文件系统发IRP,再由文件系统向磁盘驱动发IRP |
|
|
10楼#
发布于:2007-05-21 23:17
引用第9楼redhatking于2007-04-17 23:36发表的 : 虽然咱不是搞这个的,但还是要顶一下! |
|
11楼#
发布于:2007-05-22 17:13
引用第9楼redhatking于2007-04-17 23:36发表的 : 貌似就在这一大堆disk 的 ioctl里了 吧,,, ![]() ![]() ![]() Disk Management Control Codes The following table identifies the control codes that are used in disk management. Control code Operation IOCTL_DISK_CREATE_DISK : Initializes the specified disk and disk partition table by using the specified information. IOCTL_DISK_DELETE_DRIVE_LAYOUT Removes the boot signature from the master boot record. IOCTL_DISK_FORMAT_TRACKS : Formats a contiguous set of floppy disk tracks. IOCTL_DISK_FORMAT_TRACKS_EX : Formats a contiguous set of floppy disk tracks with an extended set of track specification parameters. IOCTL_DISK_GET_CACHE_INFORMATION: Retrieves the disk cache configuration data. IOCTL_DISK_GET_DRIVE_GEOMETRY_EX : Retrieves information about the physical disk's geometry. IOCTL_DISK_GET_DRIVE_LAYOUT_EX Retrieves information about the number of partitions on a disk and the features of each partition. IOCTL_DISK_GET_LENGTH_INFO Retrieves the length of the specified disk, volume, or partition. IOCTL_DISK_GET_PARTITION_INFO_EX Retrieves partition information for AT and EFI (Extensible Firmware Interface) partitions. IOCTL_DISK_GROW_PARTITION Enlarges the specified partition. IOCTL_DISK_IS_WRITABLE Determines whether the specified disk is writable. IOCTL_DISK_PERFORMANCE Provides disk performance information. IOCTL_DISK_PERFORMANCE_OFF Disables disk performance information. IOCTL_DISK_REASSIGN_BLOCKS Maps disk blocks to spare-block pool. IOCTL_DISK_SET_CACHE_INFORMATION Sets the disk cache configuration data. IOCTL_DISK_SET_DRIVE_LAYOUT_EX Partitions a disk. IOCTL_DISK_SET_PARTITION_INFO_EX Sets the disk partition type. IOCTL_DISK_UPDATE_PROPERTIES Invalidates the cached partition table of the specified disk and re-enumerates the disk. IOCTL_DISK_VERIFY Performs logical format of a disk extent. The following are defragmentation control codes. Value Meaning FSCTL_GET_RETRIEVAL_POINTERS Gets information about the cluster use of a file. FSCTL_GET_VOLUME_BITMAP Gets a bitmap of cluster allocation. FSCTL_MOVE_FILE Moves all or part of a file from one set of clusters to another within a volume. The following list identifies the obsolete control codes: IOCTL_DISK_CONTROLLER_NUMBER IOCTL_DISK_GET_DRIVE_GEOMETRY IOCTL_DISK_GET_DRIVE_LAYOUT IOCTL_DISK_GET_PARTITION_INFO IOCTL_DISK_HISTOGRAM_DATA IOCTL_DISK_HISTOGRAM_RESET IOCTL_DISK_HISTOGRAM_STRUCTURE IOCTL_DISK_LOGGING IOCTL_DISK_REQUEST_DATA IOCTL_DISK_REQUEST_STRUCTURE IOCTL_DISK_SET_DRIVE_LAYOUT IOCTL_DISK_SET_PARTITION_INFO |
|