
技术领域technical field
本发明涉及一种磁盘的文件系统,更具体地说,本发明涉及一种用于嵌入式环境下音像录放装置的文件系统。The invention relates to a disk file system, more specifically, the invention relates to a file system used in an audio-video recording and playback device in an embedded environment.
背景技术Background technique
嵌入式环境下音像录放装置,如个人视频录像机(PVR,Personal VideoRecorder)和数字视频录象机(DVR,Digital Video Recorder),是将大容量存储介质(硬盘或可擦写光盘)与机顶盒相结合而出现的产物,它既可以用于接收并观看节目也可以将节目以数字格式保存在本地存储介质中,它除了具有与传统模拟录像机相同的功能外还引入了时移播放等新的特性,极大地方便了使用者。时移播放,英文叫TIME-SHIFTING,是指收看电视节目时中途离开一会儿,将节目录入硬盘,回来后可从刚才离开时刻接着观看,此时观看到的内容相当于将电台播放内容在时间上后移,故称时移播放。随着技术和市场的发展,在机顶盒中加入数字录放功能已成为一种趋势。Audio and video recording and playback devices in the embedded environment, such as personal video recorders (PVR, Personal Video Recorder) and digital video recorders (DVR, Digital Video Recorder), are large-capacity storage media (hard disks or rewritable CDs) combined with set-top boxes And the product that appears, it can be used to receive and watch the program or save the program in the local storage medium in digital format, it not only has the same function as the traditional analog video recorder, but also introduces new features such as time-shifted playback, Greatly facilitate the user. Time-shifting playback, English called TIME-SHIFTING, means that when watching TV programs, you leave for a while, record the programs into the hard disk, and then watch them from the moment you just left when you come back. Move backward, so it is called time-shift playback. With the development of technology and market, it has become a trend to add digital recording and playback functions in the set-top box.
PVR数字电视机顶盒作为一种非常有特色的数字电视终端,具有广阔的市场前景。目前一些国际性的大公司都加快了这种带大容量存储能力的PVR机顶盒的研究,芯片厂商和硬盘厂商也加强了对该类产品的投入,并且有专用于PVR机顶盒的芯片和硬盘投入生产。在国外,主要有以下厂商提供PVR产品:Tivo,SonicBlue公司的Replaytv、微软的UltimateTV、EchoStar/DishNetwork的DishPVR。PVR digital TV set-top box, as a very distinctive digital TV terminal, has a broad market prospect. At present, some large international companies have accelerated the research of this kind of PVR set-top box with large-capacity storage capacity. Chip manufacturers and hard disk manufacturers have also strengthened their investment in this type of products, and have chips and hard disks dedicated to PVR set-top boxes put into production. . In foreign countries, the following manufacturers mainly provide PVR products: Tivo, Replaytv of SonicBlue, UltimateTV of Microsoft, and DishPVR of EchoStar/DishNetwork.
在个人视频录像机中,需要对存储介质上存储的文件和存储介质本身进行有效的管理,因而一个高效简洁的文件系统就必不可少了。目前与个人视频录像机的文件系统有关的信息相当少,设计并实现一个这样的文件系统就成了主要难点和任务之一。In a personal video recorder, it is necessary to effectively manage the files stored on the storage medium and the storage medium itself, so an efficient and concise file system is essential. At present, there is quite little information related to the file system of personal video recorders, and designing and implementing such a file system has become one of the main difficulties and tasks.
在前述的产品中大都使用自己私有的文件系统。基于Linux的Tivo公司的产品采用一种称为MFS(Media File System)的文件系统,MFS是一种专为PVR环境设计的日志型文件系统,其显著特点就是意外掉电后能够快速恢复硬盘上数据的一致性。Replaytv则采用64位的文件系统,所有系统数据都采用64位的数据类型,这样可以存储高达2的64次方大小的文件。Echostar在其最新的卫星电视接收机DishPVR 721中采用SGI公司开源的XFS,它允许同时记录两路MPEG2流,并同时从硬盘播放一路MPEG2流。综合来看,大多数厂商的产品都在PVR产品中使用重新设计的私有的文件系统来管理硬盘上的数据,其他一些产品使用的文件系统则是通过对现有一些公开的文件系统的改造后形成的。Most of the aforementioned products use their own private file systems. Tivo's products based on Linux use a file system called MFS (Media File System). MFS is a log-type file system specially designed for the PVR environment. Data Consistency. Replaytv uses a 64-bit file system, and all system data uses a 64-bit data type, which can store files up to 2 to the 64th power. Echostar uses SGI's open source XFS in its latest satellite TV receiver DishPVR 721, which allows simultaneous recording of two MPEG2 streams and playback of one MPEG2 stream from the hard disk at the same time. In general, the products of most manufacturers use the redesigned private file system in the PVR products to manage the data on the hard disk, and the file system used by some other products is modified from some existing public file systems. Forming.
大容量的存储设备(如硬盘和光盘)在PC环境下已经使用很多年了,主要的文件系统有FAT(File Allocation Table)文件系统和Unix文件系统但要保证它在机顶盒等嵌入式环境下良好运行却并不容易。主要原因如下:Large-capacity storage devices (such as hard disks and optical discs) have been used in PC environments for many years. The main file systems include FAT (File Allocation Table) file system and Unix file system, but it must be guaranteed to work well in embedded environments such as set-top boxes. It's not easy to run. The main reasons are as follows:
1)在嵌入式环境下,内存通常较小,另外芯片处理能力也不高,当运行的任务较多时,系统资源会变得紧张,这样就要求文件系统占用的资源越少越好。1) In the embedded environment, the memory is usually small, and the processing capacity of the chip is not high. When there are many tasks running, the system resources will become tense, so the less resources the file system occupies, the better.
2)相对于内存和CPU来说,硬盘的速率较低,如果花在硬盘读写上的时间太长,将严重影响系统的实时性,进而影响整个PVR的性能。硬盘读写时间主要花在寻道时间上,因此应集中措施降低这个时间。读文件时间太长是因为文件数据在硬盘上太分散,写时间太长是因为空闲区碎片太多。因此应该运用合理的磁盘空间分配算法来使文件尽量连续存放。2) Compared with the memory and CPU, the speed of the hard disk is low. If the time spent on reading and writing of the hard disk is too long, it will seriously affect the real-time performance of the system, and then affect the performance of the entire PVR. Hard disk read and write time is mainly spent on seek time, so measures should be taken to reduce this time. The long time to read the file is because the file data is too scattered on the hard disk, and the long time to write is because there are too many fragments in the free area. Therefore, a reasonable disk space allocation algorithm should be used to store files as continuously as possible.
3)对于PVR这样一个特殊的应用来说,大容量存储介质中要保存的数据主要为高速的数字视频节目,在存储介质上就是一个大文件,以数字卫星电视为例,通常其速率为4Mbps(比特/秒),如果要保存一部两个小时电影需要3.6G字节的空间。因此文件系统应能够对大文件进行有效的管理。3) For a special application such as PVR, the data to be saved in the large-capacity storage medium is mainly a high-speed digital video program, which is a large file on the storage medium. Taking digital satellite TV as an example, the rate is usually 4Mbps (bits/second), if you want to save a two-hour movie, you need 3.6G bytes of space. Therefore, the file system should be able to effectively manage large files.
4)用户的操作具有随意性,同时不同节目的长度以及用户感兴趣的部分也不定,因而文件大小未知,文件系统必须支持动态文件大小分配和管理。4) The user's operation is arbitrary, and the length of different programs and the part that the user is interested in are also uncertain, so the file size is unknown, and the file system must support dynamic file size allocation and management.
5)PVR属于家电产品,由于外界或用户操作不小心的原因而导致突然断电的情况时有发生,因此文件系统要有足够的健壮性,不能因此造成系统数据紊乱,即使不可避免地要丢失一些数据也应该使数据量降到最低限度,在断电后也应能够快速地恢复。5) PVR is a home appliance product. Sudden power failures sometimes occur due to external or user careless operations. Therefore, the file system must be robust enough to prevent system data from being disordered, even if it is inevitable to lose it. Some data should also keep the data volume to a minimum and be able to recover quickly after a power outage.
因此,要在机顶盒这样特殊的环境下实现PVR技术面临主要难点就是如何在存储设备上建立一个有效的、存储容易的文件系统。文件系统的存储效率不高将影响实时性,而文件系统本身所占内存太多则会导致资源紧张。Therefore, the main difficulty in realizing PVR technology in such a special environment as a set-top box is how to establish an effective and easy-to-store file system on a storage device. The low storage efficiency of the file system will affect the real-time performance, and the file system itself occupies too much memory, which will lead to resource shortage.
发明内容Contents of the invention
本发明的目的在于针对嵌入式环境下音像录放装置设计一套高效简洁的文件系统,对存储介质本身和在存储介质上记录回放音视频数据文件进行有效的管理。The purpose of the present invention is to design a set of efficient and concise file system for the audio-video recording and playback device in the embedded environment, and effectively manage the storage medium itself and the audio-video data files recorded and played back on the storage medium.
为了实现上述目的,本发明提供一种嵌入式环境下音像录放装置的文件系统,用于对音像录放装置中的大容量存储器上的数字音视频文件的组织管理,在所述存储介质上建立一个分区表区,用于存储分区表,所述分区表描述了所述存储介质的分区状态;在所述存储介质中的至少一个分区上建立:In order to achieve the above object, the present invention provides a file system of an audio-visual recording and playback device in an embedded environment, which is used to organize and manage digital audio-video files on a large-capacity storage in the audio-visual recording and playback device, and establish a file system on the storage medium. The partition table area is used to store a partition table, and the partition table describes the partition status of the storage medium; on at least one partition in the storage medium:
超级块区,用于存储位图区、目录区、索引节点区和数据区在所述存储介质上的位置;The super block area is used to store the positions of the bitmap area, the directory area, the inode area and the data area on the storage medium;
位图区,用于存储位图,所述位图为一串二进制位,每个二进制位表示所述存储介质上一个块的占用状态;The bitmap area is used to store a bitmap, the bitmap is a string of binary bits, and each binary bit represents the occupancy status of a block on the storage medium;
目录区,用于存储目录项,所述目录项包括文件的文件名、该文件在索引节点区的入口索引节点编号;The directory area is used to store directory entries, and the directory entries include the file name of the file and the entry index node number of the file in the index node area;
索引节点区,用于存储索引节点,索引节点由索引节点头部和盘区表组成,每一个索引节点具有一个编号,每个文件用至少一个索引节点指示该文件的数据在存储介质中所占用的一组或多组的连续块;Index node area, used to store index nodes, index nodes are composed of index node headers and extent tables, each index node has a number, and each file uses at least one index node to indicate the data occupied by the file in the storage medium one or more groups of contiguous blocks;
数据区,用于存放数字音视频文件数据。The data area is used to store digital audio and video file data.
所述分区表对一个分区的描述由分区类型、分区起始扇区和该分区的扇区数组成。The description of a partition in the partition table consists of the partition type, the starting sector of the partition and the number of sectors of the partition.
所述目录区的目录项还包括用于标志本目录项空闲或占用的忙标志。所述目录区的目录项还包括一文件类型标志,用于区分该目录项所对应的文件的数据类型。The directory entry in the directory area also includes a busy flag used to indicate that the directory entry is free or occupied. The directory entry in the directory area also includes a file type flag for distinguishing the data type of the file corresponding to the directory entry.
所述索引节点头部包括一用于标志本索引节点空闲或占用的忙标志。所述索引节点区的索引节点还包括一个链表的下一个索引节点编号;当文件用多个索引节点形成的链表指示该文件在存储介质上的占用时,所述下一个索引节点编号用于指向该链表中的下一个索引节点。所述索引节点区的索引节点中的盘区表包括对至少一个盘区的描述,所述对至少一个盘区的描述由盘区起始块在文件中的逻辑起始位置、盘区起始块和盘区包含的块总数组成。The index node header includes a busy flag used to indicate that the index node is idle or occupied. The inode of the inode area also includes the next inode number of a linked list; when a file uses a linked list formed by a plurality of inodes to indicate the occupancy of the file on the storage medium, the next inode number is used to point to The next index node in this linked list. The extent table in the inode of the inode area includes a description of at least one extent, and the description of at least one extent consists of the logical start position of the extent start block in the file, the extent start block The block and the total number of blocks contained in the extent.
本发明的优点:Advantages of the present invention:
1)以单个比特来表示一个块的使用情况非常节省空间,以60G硬盘为例,当块大小定为512k时,所需的位图的大小为60G/512K/8=15K,这样大小的位图完全可以放置在内存中,从而空闲块的查找和分配都可以在内存中进行。1) Using a single bit to represent the usage of a block is very space-saving. Taking a 60G hard disk as an example, when the block size is set to 512k, the required bitmap size is 60G/512K/8=15K. The graph can be completely placed in memory, so that the search and allocation of free blocks can be performed in memory.
2)由于PVR主要用来保存数字音视频节目,所以一个文件就会占用很多个块。如以4Mbps码流速率为例,一秒钟的节目就是512K字节。从未录制任何节目的时候考虑,当录入一定数目的节目后,用户开始删除节目,此时原被删节目的地方将出现一个很大的空闲空间,再录入新节目时,将从这一段很长的连续空间分配,由于用户主要用来录制大文件,在很长时期内都可以分配到很多连续的大块空间,因此在Inode中采用盘区来表示文件的物理存储状况比较合适。同时采用盘区的结构也可以减小索引节点(Inode)的尺寸。2) Since the PVR is mainly used to save digital audio and video programs, one file will occupy many blocks. Take the 4Mbps stream rate as an example, one second of program is 512K bytes. Considering that no program has ever been recorded, when a certain number of programs have been recorded, the user starts to delete the program. At this time, there will be a large free space in the place where the program was deleted. When recording a new program, it will start from this long Since users are mainly used to record large files, many continuous large blocks of space can be allocated for a long time, so it is more appropriate to use extents in Inode to represent the physical storage status of files. At the same time, the structure of the panel can also reduce the size of the index node (Inode).
3)使用索引节点(Inode)来表示文件属性的方法非常简洁,也便于操作。本发明的Inode被设计成不光包含文件属性信息还包括文件的物理存储信息。3) The method of using index nodes (Inodes) to represent file attributes is very simple and easy to operate. The Inode of the present invention is designed to include not only file attribute information but also physical storage information of the file.
4)本文件系统高效简洁,所消耗的CPU运算能力、内存和硬盘I/O访问资源少,适合嵌入式环境下硬盘视频录象装置如PVR使用。4) This file system is efficient and concise, consumes less CPU computing power, memory and hard disk I/O access resources, and is suitable for hard disk video recording devices such as PVRs in embedded environments.
附图说明Description of drawings
图1是本发明的文件系统在存储介质的分区的示意图;Fig. 1 is the schematic diagram of the partition of the file system of the present invention in the storage medium;
图2是本发明的文件系统的组成示意图。Fig. 2 is a schematic diagram of the composition of the file system of the present invention.
具体实施方式Detailed ways
下面结合附图与具体实施方式对本发明作进一步详细描述。虽然在下面的描述中以用硬盘作为存储介质的PVR为例来说明本发明的文件系统,但是应当理解,本发明也适用于其他如光盘等大容量存储介质的其他嵌入式环境下的音像录放装置。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Although in the following description the file system of the present invention is illustrated by using a PVR with a hard disk as a storage medium as an example, it should be understood that the present invention is also applicable to audio and video recording and playback in other embedded environments such as large-capacity storage media such as optical discs. device.
如图1所示,可将PVR中的硬盘划分为多个分区。如现有技术那样,在硬盘上提供一个分区表来描述其分区信息,该分区表表示了硬盘的逻辑分区结构,指明物理硬盘分成几个逻辑盘和每个逻辑盘的开始扇区号和大小。分区表保存在硬盘的引导扇区(Boot Sector)内,通常是硬盘的第一个扇区。但是在嵌入式的PVR中,程序保存在ROM中,所以无需引导程序。没有引导程序后,引导扇区整个都可以用来存放分区表,如果要保留与PC机上的兼容性,则分区表可以从第467个字节开始存放,这样就只能保存四个分区信息。四个分区对于PVR应用已经够用了。As shown in Figure 1, the hard disk in the PVR can be divided into multiple partitions. As in the prior art, a partition table is provided on the hard disk to describe its partition information. The partition table shows the logical partition structure of the hard disk, and indicates that the physical hard disk is divided into several logical disks and the starting sector number and size of each logical disk. The partition table is stored in the boot sector (Boot Sector) of the hard disk, usually the first sector of the hard disk. But in embedded PVR, the program is saved in ROM, so no bootloader is needed. Without the boot program, the entire boot sector can be used to store the partition table. If the compatibility with the PC is to be retained, the partition table can be stored starting from the 467th byte, so that only four partition information can be saved. Four partitions are enough for PVR applications.
在图1中,本发明的文件系统10位于硬盘的一个分区中。但是本领域的技术人员可以理解,本发明的文件系统10可以分布在硬盘的多个分区上。In FIG. 1, the
结合图1和图2,本发明的文件系统10包括系统区和数据区15,系统区包括超级块区11、位图区12、目录区13和索引节点区14。Referring to FIG. 1 and FIG. 2 , the
位图区12用于磁盘空间管理,采用位图表示法。位图区12由多个比特位组成,用位图的比特与硬盘的硬盘块依序逐一对应,用比特位的状态来标识与其对应的硬盘块的占用情况。在这里,硬盘块是指硬盘上的一个物理分块的,每个物理块对应若干个连续物理硬盘扇区。位图区12的大小由文件系统10所在硬盘分区的大小和硬盘块的大小来决定,一旦数据区15硬盘块大小即确定下来,则位图区12的大小也就确定下来了。硬盘块的大小越大,则位图区12所占用的空间越小。相对于fat16和fat32文件分配表方式的文件系统,用位图表示法进行磁盘空间管理,占用空间少,可以一次将磁盘的空间描述调入内存,这适合于内存有限的嵌入式环境。The
文件的属性信息保存在目录区13和索引节点区14中。目录区13保存了文件的文件名等信息,而索引节点区14保存了文件的数据所占用的硬盘空间分布等信息。The attribute information of the file is stored in the
目录区13包含有若干目录项,每一个文件对应目录区中的一个目录项。每一个目录项除了包括本目录项对应的文件的文件名外,还可包括其他的信息。例如,在一个应用实例中,目录项的结构如表1所示:The
表1
目录项中的填充字节是为了便于将目录项大小控制为64字节,8个文件目录项占用512字节,便于与硬盘扇区大小512字节对齐。表1所示的目录项可通过定义一个数据结构来实现。The padding bytes in the directory entry are for the convenience of controlling the size of the directory entry to 64 bytes, and the 8 file directory entries occupy 512 bytes, which is convenient for alignment with the hard disk sector size of 512 bytes. The directory entries shown in Table 1 can be realized by defining a data structure.
其中,目录项中的“入口索引节点编号”与索引节点区14中的索引节点相关联,这一点将在下面的对索引节点区14的描述中看得更清楚。Wherein, the "entry inode number" in the directory entry is associated with the inodes in the
硬盘上一个文件的数据通常存放在若干不连续的硬盘的物理块中,在本发明中,用索引节点区14记录文件的数据所占用的硬盘空间分布信息。索引节点区14包含有若干索引节点(Inode),每个Inode占用一个或多个扇区。The data of a file on the hard disk is usually stored in several discontinuous physical blocks of the hard disk. In the present invention, the
每一个Inode都包括两部分,一部分为固定大小的Inode头部,另一部分为盘区表。在一个实施例中,Inode头部的结构如表2所示。Each Inode consists of two parts, one is the fixed-size Inode header, and the other is the extent table. In one embodiment, the structure of the Inode header is shown in Table 2.
表2
其中,Inode头部中的填充字节是为了将Inode头部固定为36字节大小。表2所示的Inode头部可通过定义一个数据结构来实现。Wherein, the filling byte in the Inode header is to fix the size of the Inode header to 36 bytes. The Inode header shown in Table 2 can be realized by defining a data structure.
在固定36字节大小的Inode头后,保存一个硬盘盘区表,用于描述文件物理存储的多个盘区信息。一实施例中,一个Inode大小一般取512字节的整数倍如4096字节。在这里,盘区是指硬盘上多个硬盘块的连续序列。盘区表中包括对多个盘区的描述,可通过定义一个数据结构来实现。盘区表的结构如表3所示。After the Inode header with a fixed size of 36 bytes, a hard disk extent table is saved, which is used to describe the information of multiple extents physically stored in the file. In one embodiment, the size of an Inode generally takes an integer multiple of 512 bytes, such as 4096 bytes. Here, an extent refers to a contiguous sequence of multiple hard disk blocks on a hard disk. The extent table includes descriptions of multiple extents, which can be realized by defining a data structure. The structure of the panel table is shown in Table 3.
表3
每一个文件在硬盘上的空间分布用索引节点区14中的至少一个Inode来描述。通过目录区13的目录项中的“入口索引节点编号”与索引节点区14的一个Inode中的“Inode编号”的对应,将一个文件指向索引节点区14的一个Inode,然后通过该Inode中的盘区表指向硬盘上实际的硬盘块。当一个文件需要用多个Inode来描述时,同样是通过该文件对应的目录项中的“入口索引节点编号”来指向索引节点区14的一个Inode,并通过该Inode中的“链表的下一个Inode号”来指向下一个Inode,依次可形成一个Inode链表,通过链表中的多个Inode来描述该文件在硬盘上的空间分布。在实施例中,每个Inode占8扇区即4096字节,每个Inode可容纳(4096-36)/12=338个盘区描述符,其中36字节为Inode头大小,12字节为盘区描述符大小。The spatial distribution of each file on the hard disk is described by at least one Inode in the
超级块11记录了:文件系统所在分区的扇区大小、该分区包含的扇区总数、硬盘块的大小、位图区大小、索引节点的大小、索引节点区的大小、目录区的大小、允许的最多文件数、数据区的起始位置、数据区扇区数、数据区的块数。通过超级块11可以找到位图区12、目录区13、索引节点区14和数据区在硬盘上的位置。上述超级块的结构中没有保存任何随着文件系统的使用而变化的信息,这样的设计是为了减少写盘的次数和减少随时可能掉电对系统数据的破坏。The
数据区15以硬盘块为单位存储音视频数据文件。The
本发明的文件系统的实现描述如下:The realization of the file system of the present invention is described as follows:
1.硬盘分区1. Hard disk partition
首先对硬盘分区。分区表保存在引导扇区(Boot Sector)内,也就是硬盘的第一个扇区。First partition the hard drive. The partition table is stored in the boot sector (Boot Sector), which is the first sector of the hard disk.
本文件系统只用“分区类型”、“分区起始扇区”和“该分区的扇区数”来表示一个分区。由于“分区起始扇区”和该“分区的扇区数”都是32位,所以可以表示232*512=2KGB分区大小。在硬盘录象机一类的嵌入式系统中,程序保存在ROM中,不需要主引导记录MBR。This file system only uses "partition type", "partition start sector" and "number of sectors of this partition" to represent a partition. Since both the "start sector of the partition" and the "number of sectors of the partition" are 32 bits, it can represent 232 *512=2KGB partition size. In an embedded system such as a hard disk video recorder, the program is stored in ROM, and the master boot record MBR is not required.
2.分区格式化2. Partition formatting
格式化(format)建立并初始化用于进行文件分配和外存空闲空间管理的管理数据。不同的文件系统由于结构不同所用的格式化程序也不同,格式化后的信息通常都保存在超级块中,超级块的大小可以是一个扇区也可以是多个扇区。本文件系统格式化需做的工作有:Format (format) establishes and initializes management data for file allocation and external storage free space management. Different file systems use different formatters due to their different structures. Formatted information is usually stored in a superblock, and the size of a superblock can be one sector or multiple sectors. The work to be done in this file system formatting is as follows:
1)获得用户指定的或系统缺省的参数。1) Obtain the parameters specified by the user or defaulted by the system.
2)根据获得的参数计算出系统数据结构的相关信息,这包括超级块区大小、位图区大小、目录区大小、Inode区大小、数据区开始扇区号。2) Calculate the relevant information of the system data structure according to the parameters obtained, which include the size of the super block area, the size of the bitmap area, the size of the directory area, the size of the Inode area, and the starting sector number of the data area.
3)将位图、目录区和Inode区填零。3) Fill the bitmap, directory area and Inode area with zeros.
4)将上述信息记入超级块结构,写入硬盘的固定位置。4) Record the above information into the super block structure, and write it into a fixed location on the hard disk.
位图紧跟在超级块的后面,在位图的后面还有目录区和索引节点区。The bitmap immediately follows the super block, and there are directory area and inode area behind the bitmap.
3.装载3. Loading
在使用文件系统之前需要将该文件系统装载到嵌入式系统中,主要操作是将该文件系统的重要结构信息如超级块读入内存,在内存中建立超级块映象。在装载本文件系统时,主要进行以下几项操作:Before using the file system, the file system needs to be loaded into the embedded system. The main operation is to read the important structural information of the file system, such as the super block, into the memory, and build the super block image in the memory. When loading this file system, the following operations are mainly performed:
1)读取超级块,获取系统数据在硬盘上的位置和大小信息。1) Read the super block to obtain the location and size information of the system data on the hard disk.
2)读入位图,并统计已用空间和剩余空间大小。2) Read in the bitmap, and count the used space and remaining space.
3)读入目录区,统计已存在的文件数目。3) Read into the directory area and count the number of existing files.
4)读入Inode区并统计已占用Inode和空闲Inode。4) Read in the Inode area and count the occupied Inodes and free Inodes.
读入这些信息后,整个文件系统的所有操作所依赖的数据结构就都已经在内存中建立了。After the information is read in, the data structures that all operations of the entire file system depend on have been established in memory.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100045920ACN100440171C (en) | 2004-02-24 | 2004-02-24 | A method for file organization and management of audio-video recording and playback devices in an embedded environment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100045920ACN100440171C (en) | 2004-02-24 | 2004-02-24 | A method for file organization and management of audio-video recording and playback devices in an embedded environment |
| Publication Number | Publication Date |
|---|---|
| CN1661568Atrue CN1661568A (en) | 2005-08-31 |
| CN100440171C CN100440171C (en) | 2008-12-03 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2004100045920AExpired - Fee RelatedCN100440171C (en) | 2004-02-24 | 2004-02-24 | A method for file organization and management of audio-video recording and playback devices in an embedded environment |
| Country | Link |
|---|---|
| CN (1) | CN100440171C (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006084417A1 (en)* | 2005-01-05 | 2006-08-17 | Huawei Technologies Co., Ltd. | A buffer management method based on a bitmap table |
| CN102136290A (en)* | 2011-04-21 | 2011-07-27 | 北京联合大学 | Method for storing embedded real-time video files |
| CN101740072B (en)* | 2009-12-17 | 2011-08-17 | 深圳市万兴软件有限公司 | DVD (digital video disk) backup method, DVD backup device and DVD playing device |
| CN102495777A (en)* | 2011-12-13 | 2012-06-13 | 百度在线网络技术(北京)有限公司 | Hard disc failure processing method and processing device |
| CN102623033A (en)* | 2011-01-31 | 2012-08-01 | 苏州科达科技有限公司 | Control method of file system based on rapid video data storage and apparatus |
| CN101673289B (en)* | 2009-10-10 | 2012-08-08 | 成都市华为赛门铁克科技有限公司 | Method and device for constructing distributed file storage framework |
| WO2012149884A1 (en)* | 2011-05-03 | 2012-11-08 | 成都市华为赛门铁克科技有限公司 | File system, and method and device for retrieving, writing, modifying or deleting file |
| CN103020186A (en)* | 2012-11-30 | 2013-04-03 | 广东欧珀移动通信有限公司 | File searching method, device and equipment based on embedded device |
| CN101676906B (en)* | 2008-09-18 | 2013-06-05 | 中兴通讯股份有限公司 | Method for managing memory database space by using bitmap |
| CN103440204A (en)* | 2013-08-28 | 2013-12-11 | 华为技术有限公司 | Method for updating file system and storage device |
| CN103577470A (en)* | 2012-08-03 | 2014-02-12 | 上海交通大学 | File system and method for improving performances of web server |
| CN104102708A (en)* | 2014-07-14 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Method and device for realizing small file access |
| CN104346357A (en)* | 2013-07-29 | 2015-02-11 | 中国科学院声学研究所 | File accessing method and system for embedded terminal |
| CN104484427A (en)* | 2014-12-19 | 2015-04-01 | 武汉长江通信智联技术有限公司 | Video file storage device and video file storage method |
| CN106021466A (en)* | 2016-05-17 | 2016-10-12 | 浙江大华技术股份有限公司 | Data storage method and apparatus |
| US9778845B2 (en) | 2015-02-02 | 2017-10-03 | Western Digital Technologies, Inc. | File management system |
| CN109992202A (en)* | 2018-01-03 | 2019-07-09 | 爱思开海力士有限公司 | Data storage device, method of operating the same, and data processing system including the same |
| CN110569218A (en)* | 2019-08-01 | 2019-12-13 | 厦门市美亚柏科信息股份有限公司 | offline modification method and device for EXT file system and storage medium |
| US10635633B2 (en) | 2015-06-01 | 2020-04-28 | SZ DJI Technology Co., Ltd. | Systems and methods for memory architecture |
| CN111190869A (en)* | 2019-12-27 | 2020-05-22 | 深圳市恒扬数据股份有限公司 | File storage method and terminal |
| CN112667171A (en)* | 2021-01-14 | 2021-04-16 | 武汉极目智能技术有限公司 | Circular coverage file system based on disk naked writing and read-write method |
| CN114327290A (en)* | 2021-12-31 | 2022-04-12 | 科东(广州)软件科技有限公司 | Structure, formatting method and access method of disk partition |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020090087A1 (en)* | 2001-01-11 | 2002-07-11 | Yuriko Tamura | External memory for PVR |
| CA3011846C (en)* | 2001-02-21 | 2021-02-16 | Rovi Guides, Inc. | Systems and methods for interactive program guides with personal video recording features |
| KR100887166B1 (en)* | 2001-03-22 | 2009-03-10 | 코닌클리케 필립스 일렉트로닉스 엔.브이. | Memory control method for personal video recording system |
| US6901603B2 (en)* | 2001-07-10 | 2005-05-31 | General Instrument Corportion | Methods and apparatus for advanced recording options on a personal versatile recorder |
| WO2003043321A1 (en)* | 2001-11-10 | 2003-05-22 | Thomson Licensing S.A. | Video recording system and method for a plurality of individual users and categories of users |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006084417A1 (en)* | 2005-01-05 | 2006-08-17 | Huawei Technologies Co., Ltd. | A buffer management method based on a bitmap table |
| US7733892B2 (en) | 2005-01-05 | 2010-06-08 | Huawei Technologies Co., Ltd. | Buffer management method based on a bitmap table |
| CN101676906B (en)* | 2008-09-18 | 2013-06-05 | 中兴通讯股份有限公司 | Method for managing memory database space by using bitmap |
| CN101673289B (en)* | 2009-10-10 | 2012-08-08 | 成都市华为赛门铁克科技有限公司 | Method and device for constructing distributed file storage framework |
| CN101740072B (en)* | 2009-12-17 | 2011-08-17 | 深圳市万兴软件有限公司 | DVD (digital video disk) backup method, DVD backup device and DVD playing device |
| CN102623033A (en)* | 2011-01-31 | 2012-08-01 | 苏州科达科技有限公司 | Control method of file system based on rapid video data storage and apparatus |
| CN102136290A (en)* | 2011-04-21 | 2011-07-27 | 北京联合大学 | Method for storing embedded real-time video files |
| WO2012149884A1 (en)* | 2011-05-03 | 2012-11-08 | 成都市华为赛门铁克科技有限公司 | File system, and method and device for retrieving, writing, modifying or deleting file |
| CN102495777A (en)* | 2011-12-13 | 2012-06-13 | 百度在线网络技术(北京)有限公司 | Hard disc failure processing method and processing device |
| CN102495777B (en)* | 2011-12-13 | 2014-10-22 | 百度在线网络技术(北京)有限公司 | Hard disc failure processing method and processing device |
| CN103577470B (en)* | 2012-08-03 | 2017-11-21 | 上海交通大学 | A kind of file system and method for lifting web server performance |
| CN103577470A (en)* | 2012-08-03 | 2014-02-12 | 上海交通大学 | File system and method for improving performances of web server |
| CN103020186A (en)* | 2012-11-30 | 2013-04-03 | 广东欧珀移动通信有限公司 | File searching method, device and equipment based on embedded device |
| CN103020186B (en)* | 2012-11-30 | 2016-04-13 | 广东欧珀移动通信有限公司 | A kind of document retrieval method based on embedded device, device and equipment |
| CN104346357B (en)* | 2013-07-29 | 2018-02-13 | 中国科学院声学研究所 | The file access method and system of a kind of built-in terminal |
| CN104346357A (en)* | 2013-07-29 | 2015-02-11 | 中国科学院声学研究所 | File accessing method and system for embedded terminal |
| CN103440204B (en)* | 2013-08-28 | 2016-01-27 | 华为技术有限公司 | A kind of method of updating file system and memory device |
| CN103440204A (en)* | 2013-08-28 | 2013-12-11 | 华为技术有限公司 | Method for updating file system and storage device |
| CN104102708A (en)* | 2014-07-14 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Method and device for realizing small file access |
| CN104484427B (en)* | 2014-12-19 | 2017-12-29 | 武汉长江通信智联技术有限公司 | A kind of video file storage device and method |
| CN104484427A (en)* | 2014-12-19 | 2015-04-01 | 武汉长江通信智联技术有限公司 | Video file storage device and video file storage method |
| US9778845B2 (en) | 2015-02-02 | 2017-10-03 | Western Digital Technologies, Inc. | File management system |
| US10635633B2 (en) | 2015-06-01 | 2020-04-28 | SZ DJI Technology Co., Ltd. | Systems and methods for memory architecture |
| CN106021466A (en)* | 2016-05-17 | 2016-10-12 | 浙江大华技术股份有限公司 | Data storage method and apparatus |
| CN109992202A (en)* | 2018-01-03 | 2019-07-09 | 爱思开海力士有限公司 | Data storage device, method of operating the same, and data processing system including the same |
| CN109992202B (en)* | 2018-01-03 | 2022-06-17 | 爱思开海力士有限公司 | Data storage device, method of operating the same, and data processing system including the same |
| CN110569218A (en)* | 2019-08-01 | 2019-12-13 | 厦门市美亚柏科信息股份有限公司 | offline modification method and device for EXT file system and storage medium |
| CN110569218B (en)* | 2019-08-01 | 2021-11-23 | 厦门市美亚柏科信息股份有限公司 | Offline modification method and device for EXT file system and storage medium |
| CN111190869A (en)* | 2019-12-27 | 2020-05-22 | 深圳市恒扬数据股份有限公司 | File storage method and terminal |
| CN112667171A (en)* | 2021-01-14 | 2021-04-16 | 武汉极目智能技术有限公司 | Circular coverage file system based on disk naked writing and read-write method |
| CN114327290A (en)* | 2021-12-31 | 2022-04-12 | 科东(广州)软件科技有限公司 | Structure, formatting method and access method of disk partition |
| CN114327290B (en)* | 2021-12-31 | 2022-12-02 | 科东(广州)软件科技有限公司 | Structure, formatting method and access method of disk partition |
| Publication number | Publication date |
|---|---|
| CN100440171C (en) | 2008-12-03 |
| Publication | Publication Date | Title |
|---|---|---|
| CN100440171C (en) | A method for file organization and management of audio-video recording and playback devices in an embedded environment | |
| JP5242686B2 (en) | Direct mass storage file indexing | |
| WO2007115492A1 (en) | A method of storing files in a data storage device and data storage device thereof | |
| JP2004013276A (en) | Filesystem and recording medium | |
| CN102136289B (en) | Methods, devices and systems for storing and reading media contents | |
| US20060015473A1 (en) | Dynamic partitioning of storage media for mixed applications | |
| CN101425310B (en) | Method to reserve index storage space during audio video interleaved recording | |
| JP4502375B2 (en) | File system and control method thereof | |
| CN111831423B (en) | A method and system for implementing Redis in-memory database on non-volatile memory | |
| CN100359592C (en) | Data storage method for hard disk for camera-shooting and recording device | |
| US20070223875A1 (en) | Storage device and method of accessing storage device | |
| CN100418071C (en) | Method for establishing a media file system | |
| US20120078930A1 (en) | Framework for extremely large complex objects (xlcos) | |
| CN1215412C (en) | Disc medium managing method | |
| US8743669B2 (en) | Optical disc drive and method of accessing optical disc | |
| JP2003296156A (en) | Information recording management device, data recording and regenerating device, information recording management method and file management method | |
| CN102157175B (en) | Digital dumping method of audio/video data and system thereof | |
| CN102272710A (en) | Method and apparatus for creating files in a file system | |
| CN1395246A (en) | Method for implementing virtual image optical disk and and its system hardware structure | |
| US8565584B2 (en) | Editing apparatus and editing method | |
| JP2008171311A (en) | Data storage device | |
| CN112433673B (en) | Method and device for storing data in solid state disk | |
| CN1577568A (en) | Recording medium and file management system | |
| CN102467941A (en) | File navigation method based on D9 disc and storage medium | |
| KR100497365B1 (en) | Improved file system and recording media and file access method therefor |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20081203 Termination date:20120224 |