CN105630692A - File storage system storing file directory by using MRAM - Google Patents
File storage system storing file directory by using MRAM Download PDFInfo
- Publication number
- CN105630692A CN105630692A CN201510268543.6A CN201510268543A CN105630692A CN 105630692 A CN105630692 A CN 105630692A CN 201510268543 A CN201510268543 A CN 201510268543A CN 105630692 A CN105630692 A CN 105630692A
- Authority
- CN
- China
- Prior art keywords
- mram
- file
- directory
- file directory
- storage system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a file storage system storing a file directory by using an MRAM. The system comprises an MRAM and a block storage device. The MRAM comprises a file system directory area, which is used for storing a file directory; and the block storage device is used for storing file data. Because the MRAM is a random access memory and it is faster to query a file in the MRAM than search for a directory in an NAND, the file storage system storing the file directory by using the MRAM, which is provided by the present invention, is capable of managing the file directory with high performance; and because the MRAM is a non-volatile memory and will not lose kernel data in a file system due to sudden power-off, the system is capable of securely managing the file directory; the file system directory area often needs to be rewritten, thus by storing the file system directory area into the MRAM where the directory area can be written into for infinite number of times, the number of times of writing into the NAND is reduced, and the service life of the system is prolonged; and different lengths of records are adopted in the file system directory area, which is capable of effectively improving utilization of storage space.
Description
Technical field
The present invention relates to document storage system, particularly relate to a kind of document storage system utilizing MRAM file directory.
Background technology
In present computer, smart mobile phone, panel computer, user data, file are stored in hard disk, or in the solid state hard disc formed in nand flash memory chip and by nand flash memory. NAND and solid state hard disc replace the main trend that traditional mechanical hard disk is again an industry development.
Nand flash memory in hard disk and solid state hard disc is all the block device (blockdevice) of monoblock read-write, the unit that minimum readable takes is page (page), minimum erasable unit is block (block), one block is often made up of a lot of pages, and after block erasing, the page of the inside can carry out independent write operation.
One problem of nand flash memory is that NAND has the limited life-span. The inside each page through certain number of times erasable after, will permanent failure can not be continuing with. The current trend of industry development is the capacity of NAND and packing density increases very fast, but to reduce the life-span for cost. Erasable number of times is reduced to about current 3000 time from initial 100,000 times.
As it is shown in figure 1, mobile phone is as follows with the file operation mode of computer:
(1) application software send to operating system open, close, reading and writing file instruction;
(2) file system portion in operating system is the instruction morphing instruction for reading and writing memory block of reading and writing file;
(3) NAND drives and manages software and accepts the instruction in read-write memory block district, carries out buffer memory, writes the optimizations such as equilibrium, sends to chip and read page, write the instructions such as block.
In mobile phone, NAND drives with management software usually used as the software module being closely related with operating system, runs on host chip; In a computer, NAND drives and generally runs on the main control chip of solid state hard disc with management software.
File system is a pith in operating system software, is responsible for solving the storage problem of file. It can be divided into block one by one file, and generally each block is corresponding with a page in nand flash memory.
One basic task of file system is, allows user and application program can pass through a filename/pathname, finds file data address in memory. But in a lot of file system, this step is more complicated. In order to facilitate user's locating file, file system is got up by the multistage form of catalogue. Computer must start to search for the address at next stage catalogue place from root. And in a lot of file system, such as start from the FAT in Windows operating system and start from ext2, ext3 of Liux operating system, catalogue is the one as file, and what ordinary file stored in an identical manner. If file is stored in NAND or based on, in the solid state hard disc of NAND, searching catalogue each time and will read a NAND, possibly even to read twice NAND for ext2, ext3. When buffer memory does not hit, it is all very consuming time for reading NAND each time, because NAND must read on whole page ground, it is possible to also need to debugging error correction. If file is in the catalogue of a deep layer, then be switched on a lot of NAND page before finding its data.
The mode of such storage catalogue have a further problem in that the total bytes in a catalogue is usually little, it is stored as a file, just at least to take the space of a whole page. In the NAND chip that some are new, one page is likely up to 16K. Such storage efficiency is very low.
Some newer file system, such as YAFFS, start the catalogue of All Files to make the data structure compacted, concentrate in together, leave in some NAND page, upload in RAM during start during shutdown. So, the speed of locating file is drastically increased. But bring another one problem: if system generation accident power-off, such as user mobile phone falls to the ground, and battery falls de-, the loss of data in RAM, cause that the catalogue in NAND is not inconsistent with practical situation. Not bad YAFFS with the addition of accessory information in each NAND page. Now have to start the scanning to all NAND page very consuming time, it is possible to recover the major part form of catalogue, but or some files not having name can be produced.
Another one problem, it is simply that the catalogue in file system is usually fairly frequently modified. User can increase file, deletes file, renaming, file is moved on to another catalogue from a catalogue. And some are also often modified with the data that catalogue is relevant. Such as one file of some file system record last time read. So when a file is simply read, the directory entry that this file is associated will be written over, moreover, searching for the passed catalogue of this file because being all previously opened, corresponding record to be also written over. Owing to NAND chip can only bear the erasable of limited number of time, extend its service life, it should set about from catalogue.
Those skilled in the art are devoted to provide a kind of document storage system, can either high-performance, manage file directory safely, the service life of system can be extended again.
Summary of the invention
Because the drawbacks described above of prior art, the technical problem to be solved is to provide a kind of document storage system, can either high-performance, manage file directory safely, the service life of system can be extended again.
The important background of the present invention is the development of MRAM technology. MRAM is a kind of new internal memory and memory technology, it is possible to quick random read-write as RAM, it is also possible to forever retain data as nand flash memory after a loss of power. Can be erasable infinitely in multiple times unlike NAND, MRAM. It is contemplated that in following significant period of time, the Capacity Ratio NAND of MRAM is low, and cost is higher than NAND.
In the present invention, making full use of MRAM is the non-volatile memorizer of a kind of random read-write, and it can also be unlimitedly erasable. Adopt MRAM and NAND to be combined into document storage system, and file directory is to be suitable for store in very much in MRAM.
The present invention provides a kind of and utilizes the MRAM document storage system storing file directory, and including MRAM and block storage device, MRAM includes file system directories district, is used for storing file directory, and block storage device is used for storing file data.
File system directories district is made up of the record of a rule, and each catalogue and file correspond to a record, stores the relevant information of this catalogue or file in this record. The record of the file under catalogue and subdirectory can be found by the record of a catalogue.
Owing to MRAM is the memorizer of random read-write, inquiry file is faster than search catalogue in NAND in a mram, it is thus possible to high-performance ground management file directory.
Due to the memorizer that MRAM is non-volatile, the core data in file system will not be lost because of unexpected power-off, it is thus possible to manage file directory safely.
File system directories district needs often to be written over, and is stored in and in the MRAM of unlimited write, can reduce the write number of times of NAND, extends the service life of system.
Further, MRAM is connected with the main control chip of mobile phone or the CPU of computer by DDRDRAM interface.
Further, block storage device is NAND chip, mechanical hard disk, solid state hard disc, eMMC, SD storage card or microSD storage card.
For mobile phone, block storage device is NAND chip, eMMC, SD storage card or microSD storage card; For computer, block storage device is mechanical hard disk or solid state hard disc.
Further, MRAM is integrated in solid state hard disc, eMMC, SD storage card or microSD storage card, and the CPU of computer can file system directories district in direct read/write MRAM.
Further, MRAM is connected with the main control chip of solid state hard disc, eMMC, SD storage card or microSD storage card by DDRDRAM interface.
Further, MRAM is integrated in the main control chip of solid state hard disc, eMMC, SD storage card or microSD storage card.
Further, file system directories district is continuum or discontinuity zone.
File system directories district can be continuum, it is also possible to be discontinuity zone, utilizes pointer to object to find subobject step by step, eventually finds any one catalogue or file.
Further, in file system directories district, all record lengths are identical, and this scheme is easy to storage area management.
Further, the record in file system directories district has different length, deletion and increase catalogue or file can be undertaken by malloc and free mechanism, it is possible to be effectively improved the utilization rate of memory space.
Further, in catalogue record, the root record of logical partition leaves appointed position in.
Compared with prior art, the document storage system of the MRAM of utilization provided by the invention storage file directory has the advantages that
(1) due to the memorizer that MRAM is random read-write, inquiry file is faster than search catalogue in NAND in a mram, it is thus possible to high-performance ground management file directory.
(2) due to the memorizer that MRAM is non-volatile, the core data in file system will not be lost because of unexpected power-off, it is thus possible to manage file directory safely.
(3) file system directories district needs often to be written over, and is stored in and in the MRAM of unlimited write, can reduce the write number of times of NAND, extends the service life of system.
(4) file system directories district adopts the record of different length, it is possible to be effectively improved the utilization rate of memory space.
Below with reference to accompanying drawing, the technique effect of the design of the present invention, concrete structure and generation is described further, to be fully understood from the purpose of the present invention, feature and effect.
Accompanying drawing explanation
Fig. 1 is prior art file operational flowchart;
Fig. 2 is the schematic diagram of the document storage system utilizing MRAM storage file directory of one embodiment of the present of invention;
Fig. 3 is the schematic diagram of the document storage system utilizing MRAM storage file directory of an alternative embodiment of the invention;
Fig. 4 is the schematic diagram of the document storage system utilizing MRAM storage file directory of another embodiment of the present invention.
Detailed description of the invention
As shown in Figure 2, the MRAM that utilizes of one embodiment of the present of invention stores the document storage system of file directory, this document storage system is used for moving equipment, such as mobile phone, including MRAM and NAND chip, MRAM includes file system directories district, is used for storing file directory, and NAND chip is used for storing file data.
MRAM is connected with the main control chip of mobile phone by DDRDRAM interface.
Adopt MRAM to process file system directories, can either high-performance, management file directory improves safely the utilization ratio of memory space, the service life of system can be extended again.
For mobile phone, block storage device can also be eMMC, SD storage card or microSD storage card, and MRAM is connected with the main control chip of mobile phone by DDRDRAM interface. MRAM can also be integrated in eMMC, SD storage card or microSD storage card, it is connected by the main control chip of DDRDRAM interface with eMMC, SD storage card or microSD storage card, or is integrated in the main control chip of eMMC, SD storage card or microSD storage card.
As shown in Figure 3, the MRAM that utilizes of an alternative embodiment of the invention stores the document storage system of file directory, this document storage system is for computer, including MRAM and mechanical hard disk or solid state hard disc, MRAM includes file system directories district, for storing file directory, mechanical hard disk or solid state hard disc are used for storing file data.
MRAM is by the CPU of DDRDRAM interface with computer.
For computer, block storage device is mechanical hard disk or solid state hard disc.
As shown in Figure 4, the MRAM that utilizes of another embodiment of the present invention stores the document storage system of file directory, and this document storage system is for computer, including MRAM and solid state hard disc, MRAM includes file system directories district, is used for storing file directory, and NAND chip is used for storing file data.
MRAM is integrated in solid state hard disc, and the CPU of computer can file system directories district in direct read/write MRAM.
MRAM is integrated in solid state hard disc different implementations, for instance, it is possible to it is connected with the main control chip of solid state hard disc by DDRDRAM interface; Can also be integrated in the main control chip of solid state hard disc by MRAM.
Object in document storage system, including catalogue and all types of files, each object sets up a record, is recorded as catalogue record or file record in file system directories district, and record includes but not limited to following information:
Object oriented;
Object type: be such as catalogue or file, whether can perform etc.;
Object properties: the such as time of read-write last time, owner, access limit etc.;
Pointer to object: if catalogue, point to subobject, including subdirectory and/or file; If file, point to its data.
It should be noted that and how to find all of subobject by a sub-object pointer. There are many methods it is achieved that simplest one described herein: increasing " brother " pointer in each object, for root, this pointer is 0; First file (" eldest brother ") in subobject pointed catalogue in directory object. Second file of " brother " pointed of this file, goes down successively, and the fraternal pointer of last file is set to 0.
In this manner it is possible to from a directory search to all of subobject. Utilize this linked list data structure, increase, to delete file all very simple.
The pointer of its data is pointed to, it is possible to allowing it point to the data structure of an agreement, this structure provides the information of all of NAND page of file data as data file. Such data structure has a variety of design way, and common software engineer just can complete design.
If there being enough spaces in MRAM, these data also should preserve in a mram.
Total bytes in one record is generally little, it is stored in NAND chip as a file, just at least needs to take the space of a whole page, and the utilization rate causing memory space is extremely low; And catalogue is stored in as a record file system directories district of MRAM, it is possible to it is effectively improved the utilization rate of memory space.
In file system directories district, the position setting symbol of unappropriated record is demarcated as the free time. If an object is deleted, its record is demarcated as the free time; When an object is created, look for its record of idle position storage.
File system directories district can be continuum, it is also possible to be discontinuity zone, utilizes pointer to object to find subobject step by step, eventually finds any one catalogue or file.
The length of all records in file system directories district can be identical, and this scheme is easy to storage area management.
Record in file system directories district has different length, deletion and increase catalogue or file can be undertaken by malloc and free mechanism, it is possible to be effectively improved the utilization rate of memory space.
In catalogue record, the root record of logical partition leaves appointed position in.
The document storage system utilizing MRAM storage file directory provided by the invention, owing to MRAM is the memorizer of random read-write, inquiry file is faster than search catalogue in NAND in a mram, it is thus possible to high-performance ground management file directory; Due to the memorizer that MRAM is non-volatile, the core data in file system will not be lost because of unexpected power-off, it is thus possible to manage file directory safely; File system directories district needs often to be written over, and is stored in and in the MRAM of unlimited write, can reduce the write number of times of NAND, extends the service life of system; File system directories district adopts the record of different length, it is possible to be effectively improved the utilization rate of memory space.
The preferred embodiment of the present invention described in detail above. Should be appreciated that those of ordinary skill in the art just can make many modifications and variations according to the design of the present invention without creative work. Therefore, all technical staff in the art, all should in the protection domain being defined in the patent claims under this invention's idea on the basis of existing technology by the available technical scheme of logical analysis, reasoning, or a limited experiment.
Claims (10)
1. one kind utilizes the MRAM document storage system storing file directory, it is characterized in that, the described MRAM of utilization stores the document storage system of file directory and includes MRAM and block storage device, described MRAM includes file system directories district, for storing file directory, described piece of storage device is used for storing file data.
2. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that described MRAM is connected with the main control chip of mobile phone or the CPU of computer by DDRDRAM interface.
3. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that described piece of storage device is NAND chip, mechanical hard disk, solid state hard disc, eMMC, SD storage card or microSD storage card.
4. utilize MRAM to store the document storage system of file directory as claimed in claim 3, it is characterized in that, described MRAM is integrated in solid state hard disc, eMMC, SD storage card or microSD storage card, and the CPU of computer can file system directories district in MRAM described in direct read/write.
5. utilize MRAM to store the document storage system of file directory as claimed in claim 4, it is characterised in that described MRAM is connected with the main control chip of solid state hard disc, eMMC, SD storage card or microSD storage card by DDRDRAM interface.
6. utilize MRAM to store the document storage system of file directory as claimed in claim 4, it is characterised in that described MRAM is integrated in the main control chip of solid state hard disc, eMMC, SD storage card or microSD storage card.
7. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that described file system directories district is continuum or discontinuity zone.
8. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that in described file system directories district, all record lengths are identical.
9. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that the record in described file system directories district has different length.
10. utilize MRAM to store the document storage system of file directory as claimed in claim 1, it is characterised in that in described catalogue record, the root record of logical partition leaves appointed position in.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510268543.6A CN105630692A (en) | 2015-05-22 | 2015-05-22 | File storage system storing file directory by using MRAM |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510268543.6A CN105630692A (en) | 2015-05-22 | 2015-05-22 | File storage system storing file directory by using MRAM |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105630692A true CN105630692A (en) | 2016-06-01 |
Family
ID=56045661
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510268543.6A Pending CN105630692A (en) | 2015-05-22 | 2015-05-22 | File storage system storing file directory by using MRAM |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105630692A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109669621A (en) * | 2017-10-13 | 2019-04-23 | 杭州海康威视系统技术有限公司 | A kind of file management method, file management system, electronic equipment and storage medium |
| CN114442960A (en) * | 2022-01-27 | 2022-05-06 | 新拓尼克科技(成都)有限公司 | Solid-state storage scheme free of fear abnormal power failure and capable of prolonging service life |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102955787A (en) * | 2011-08-22 | 2013-03-06 | 陈思达 | Using method for file directory table, file writing method and main circuit board, CPU (central processing unit) and external storage applying same |
| CN103902669A (en) * | 2014-03-17 | 2014-07-02 | 华中科技大学 | Separating type file system based on different storage media |
| CN105630697A (en) * | 2015-04-15 | 2016-06-01 | 上海磁宇信息科技有限公司 | Storage structure for storing small file by MRAM |
-
2015
- 2015-05-22 CN CN201510268543.6A patent/CN105630692A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102955787A (en) * | 2011-08-22 | 2013-03-06 | 陈思达 | Using method for file directory table, file writing method and main circuit board, CPU (central processing unit) and external storage applying same |
| CN103902669A (en) * | 2014-03-17 | 2014-07-02 | 华中科技大学 | Separating type file system based on different storage media |
| CN105630697A (en) * | 2015-04-15 | 2016-06-01 | 上海磁宇信息科技有限公司 | Storage structure for storing small file by MRAM |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109669621A (en) * | 2017-10-13 | 2019-04-23 | 杭州海康威视系统技术有限公司 | A kind of file management method, file management system, electronic equipment and storage medium |
| CN114442960A (en) * | 2022-01-27 | 2022-05-06 | 新拓尼克科技(成都)有限公司 | Solid-state storage scheme free of fear abnormal power failure and capable of prolonging service life |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101447188B1 (en) | Method and apparatus for controlling I/O to optimize flash memory | |
| KR100484147B1 (en) | Flash memory management method | |
| US9489297B2 (en) | Pregroomer for storage array | |
| US8612719B2 (en) | Methods for optimizing data movement in solid state devices | |
| CN107391774B (en) | Garbage Collection Method for Log File System Based on Data Deduplication | |
| US10956071B2 (en) | Container key value store for data storage devices | |
| JP4415356B2 (en) | Double journaling storage method and storage medium thereof | |
| WO2018171296A1 (en) | File merging method and controller | |
| CN102968381A (en) | Method for improving snapshot performance by using solid state disk | |
| CN103617097A (en) | File recovery method and file recovery device | |
| CN102053879A (en) | Self-recovery real-time file system based on FLASH | |
| CN104376099A (en) | Flash-memory-based file system implementation method and device | |
| CN102323907A (en) | Embedded ARM processor stores and deletes NANDFLASH data | |
| CN102375781B (en) | Data protection method, memory controller and portable memory storage device | |
| CN102955787A (en) | Using method for file directory table, file writing method and main circuit board, CPU (central processing unit) and external storage applying same | |
| US10089348B2 (en) | Computer device and storage device | |
| KR100987320B1 (en) | Data processing device and data processing method using FAT file system capable of high speed file recovery | |
| CN120144053B (en) | Data processing methods, devices and electronic equipment | |
| CN105630692A (en) | File storage system storing file directory by using MRAM | |
| US20080250189A1 (en) | Circuit and Method for Improving Operation Life of Memory | |
| Lee et al. | Efficient logging of metadata using NVRAM for NAND flash based file system | |
| KR101413985B1 (en) | Method for file management using file system adapted to non-volatile memory | |
| Lee et al. | RMSS: an efficient recovery management scheme on NAND flash memory based solid state disk | |
| CN105630406A (en) | Storage system using MRAM as editing buffer and editing buffer method | |
| KR101077500B1 (en) | Log Data Storage Method for Journaling FAT File System |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160601 |