A file system management model and system
By dividing the file system into file management, object management, and flash media management modules, the combination of storage and computing is optimized, solving the problem of underutilization of multimedia and archived data performance on SSDs. This achieves efficient storage and computing integration and improves the overall performance of the storage system.
Patent Information
- Application Number
- CN202211734149.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing file systems fail to fully utilize the characteristics of multimedia and archived data on SSDs, resulting in a failure to leverage their performance advantages. Furthermore, the separation of compute storage and data storage increases system overhead.
The file system is divided into a file management module, an object management module, and a flash media management module. The object management module unifies the storage granularity and computing unit, eliminates the dual mapping logic, optimizes the combination of storage and computing, and supports variable-length object storage.
Simplify I/O paths, reduce write amplification, improve storage system performance, enable near-data computation, accelerate file operations, reduce garbage collection overhead, and improve the overall performance of the storage system.
Smart Images

Figure CN115964350B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a file system design method, in particular to a file system based on a flash memory storage medium. BACKGROUND
[0002] In the context of the big data era, the types and quantities of data information are increasing dramatically, which brings new challenges to the design of storage systems. In the current technology, file systems provide storage, query, and processing functions for various mixed data, such as multimedia data, record data, and archival data. These data are usually written only once during storage and are not modified thereafter, while management data need to support read and write. The current file systems do not distinguish between these two cases in their design.
[0003] With the popularization and application of SSDs, file systems generally adopt the method of merging random writes and converting them into sequential log records to accelerate the performance of storage systems. However, with the increasing degree of data mixing and the influence of file system garbage collection, the effective data distribution inside the SSD tends to be scattered. For file systems, the space arrangement and garbage collection of the file system itself also incur additional overhead. The current file systems built on SSDs cannot take advantage of the characteristics of multimedia data, record data, and archival data to maximize the performance of flash media.
[0004] On the other hand, with the application of computing storage technology, storage systems can provide more computing functions. However, computing requirements are usually related to the application scenario itself. Existing technical solutions build computing storage systems through file systems and block management technology. The data storage granularity is fixed-length logical blocks, while the application scenario computing is based on the file level. Therefore, the storage end can only complete the computation acceleration based on the data block level, and the computing module of the application scenario needs to be deployed on the host end in combination with the file system, resulting in the separation of data storage and computing, which cannot fully utilize the advantages of computing storage in reducing system overhead. SUMMARY
[0005] The present application provides a technical solution that can reduce the write amplification of flash storage systems, a file system model and system that are specifically optimized for one-time write files and computing storage application scenarios.
[0006] The present application provides a file system model, which at least includes a file management module first sub-model, an object management second sub-model, and a flash media management module third sub-model.
[0007] The file management module first sub-model is configured to receive a user's file access request, and a file management strategy processes the file access request and converts it into an object access request for the object management second sub-model.
[0008] The object management second sub-model is configured to provide a continuous logical object area to the file management module first sub-model, receive the object access request from the file management module first sub-model, process the object access request according to a logical object management strategy, and convert the object access request into a flash read / write / erase operation request for the flash media management module third sub-model;
[0009] The flash media management module third sub-model provides a read, write, and erase interface to the object management second sub-model, receives the flash read, write, or erase operation request from the second sub-model, completes the read / write / erase operation on the flash media, and records flash operation state information and invalid media information;
[0010] The file management module first sub-model divides the continuous logical object area provided by the object management second sub-model into at least a management area, a read / write file area, and a one-time file area; and the object management second sub-model divides the continuous physical address partition into at least a fixed-length logical area and a variable-length logical area.
[0011] Further, the fixed-length logical area is configured to store data from the management area and data from the read / write file area of the file system, and the object data size in the fixed-length logical area is fixed; and the variable-length logical area is configured to store data from the one-time file area of the file system, and the fixed-length logical area and the variable-length logical area determine the actual occupied physical Zone partition size and whether to share the physical Zone partition according to a user configuration strategy.
[0012] Further, the file management strategy is configured to record the occupied logical object ID for a one-time file in an upper directory file, the directory file records address mappings of all one-time files, each mapping table entry contains three fields of a file name, a logical object ID, and a size, wherein the file name is used for indexing, the logical object ID points to the actually stored logical object, and the size represents the file size.
[0013] Further, the processing of the object access request by the logical object management strategy includes: mapping a logical object to a continuous physical storage space according to a logical object mapping table, the logical object mapping table includes a plurality of mapping table entries; each of the mapping table entries contains at least two fields of a physical address PBA and a logical object size Size, the logical object mapping table is indexed according to the logical object ID number; and the physical address PBA is divided into two parts of Zone encoding and Zone internal offset.
[0014] Furthermore, the second sub-model of object management also includes an object storage optimization unit, which is used to obtain the ID and size information of the logical object to form a size information pool; and to combine and sum the size information in the size information pool according to a predetermined rule and compare and match it with the size of the Zone partition.
[0015] Furthermore, the Size information in the Size information pool has sizes A1, A2, ..., A m A N The Zone partition size is 2 K The predetermined rule is configured to include the following steps: 1) summing the Size of any number of the logical objects; 2) if the summation result is less than 2... K Then, the corresponding logical object is defined as a virtual logical object; and the one-time files corresponding to the objects in the virtual object are stored in the same Zone partition; if the summation result is greater than 2 K Then return to step 1); 3) return the result to the second sub-model of object management, and perform an update operation on the corresponding logical object mapping table; where k is a positive integer and satisfies 2 K Greater than max(A1, A2, ..., A m A N ).
[0016] Furthermore, the flash memory media management module organizes the physical addresses of the same operation into consecutive Zone partitions based on the physical rules of flash memory page read / write, block erase, and sequential writing within a block. The erase operation is performed according to Zone partitions, and the write operation must be within a Zone partition and the addresses must be consecutive.
[0017] Furthermore, the Zone partitions are arranged in ascending order, and adjacent Zone partitions have different sizes.
[0018] Furthermore, the user configuration policy includes at least the following steps: 1) reading the data of the Zone partition corresponding to the readable and writable file into the system memory, and performing read, write, delete or overwrite operations on the readable and writable file in the memory; 2) overwriting the data of the Zone partition corresponding to the readable and writable file in the fixed-length logical area with the latest readable and writable file in the memory within a preset time interval.
[0019] Meanwhile, this invention provides a system applying the aforementioned file system model, the system comprising a file management module, a logical object management module, and a flash media management module; the system responds to user requests and completes corresponding operations; the operations include:
[0020] When receiving a new write-once file request from a user, first, the file management module allocates a variable-length logical object according to the current available object state, then the logical object management module converts the object ID into a new physical address according to the current write point state, then the flash media management module initiates file data transmission and writes the one-time file data into the converted physical address, after the writing is completed, the result is fed back to the file management module, the file management module modifies the management area data, records the file name, the allocated corresponding logical object number and the file length to the management area data, and completes the write file operation;
[0021] When receiving a read-once file request from a user, first, the file management module indexes to the corresponding logical object number of the file through the management area data, converts into an object read request, and sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation and transmits the read data back to the application to complete the read operation;
[0022] When receiving a rewrite-once file request from a user, first, the file management module indexes to the corresponding logical object number of the file through the management area data, converts into an object write request, then the logical object management module converts the object ID into a new physical address according to the current write point state and invalidates the old physical address, then the flash media management module initiates file data transmission and writes the one-time file data into the converted physical address, after the writing is completed, the result is fed back to the file management module, the file management module modifies the management area data, records the modified file length and attributes to the management area data, and completes the rewrite file operation;
[0023] When receiving a delete-once file request from a user, first, the file management module indexes to the corresponding logical object number of the file through the management area data, converts into an object recycling request, and sends the object recycling request to the logical object management module, the logical object management module invalidates the physical address occupied by the object, and the background garbage collection is started when the available space is insufficient, the invalid physical address is recycled for subsequent file writing operation, after the deletion is completed, the result is fed back to the file management module, the file management module modifies the management area data, deletes the management data corresponding to the file, and completes the delete file operation.
[0024] Compared with the background art, the present application has the beneficial effect that: by dividing the file storage system into three sub-models, removing the double mapping logic of the file system and the block management module, simplifying the IO path, eliminating the double write amplification inside the file system and inside the block management module, by assigning all attributes of the file to the object, the file-based calculation acceleration can be directly completed through the object, achieving the function of completing near-data calculation at the storage device end, at the same time, the object storage management module can also use the inherited file itself attribute characteristics to do storage optimization, such as cold and hot data, different application data stored separately, reducing the garbage collection overhead caused by mixed storage of different mode data, the same file continuous storage plays the performance advantage of sequential access of the medium, and improves the overall performance of the storage system. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only the embodiments of the present application, and for those skilled in the art, without creative labor, other drawings can also be obtained according to the drawings provided.
[0026] The structure, proportion, size and the like shown in the drawings of the specification are only used to cooperate with the content disclosed in the specification, so that those skilled in the art can understand and read, and are not used to limit the conditions that can be implemented by the present application. Therefore, any modification of the structure, change of the proportion relationship or adjustment of the size, which does not affect the effect and purpose that can be achieved by the present application, should still fall within the scope of the technical content disclosed by the present application.
[0027] Figure 1 File system model structure diagram of the present application
[0028] Figure 2 File storage system hierarchical architecture diagram of the present application
[0029] Figure 3 One-time file storage address mapping diagram of the present application
[0030] Figure 4 Logical object storage address mapping diagram of the present application
[0031] Figure 5 Flash memory physical address composition diagram of the present application
[0032] Figure 6 File writing flowchart of the present application
[0033] Figure 7 File reading flowchart of the present application
[0034] Figure 8 Flow chart for rewriting file of the present application
[0035] Figure 9 Flow chart for deleting file of the present application DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0037] The present application provides a file system model and system which can reduce the write amplification of flash memory storage system and is specially optimized for the application scenario of one-time write file and computing storage.
[0038] The present application is a file system model and system which divides the file storage system into three sub-models, a file management module first sub-model, an object management second sub-model and a flash medium management third sub-model, a storage object concept is virtually outputted, the storage granularity and the computing unit are unified into objects, and variable-length objects are supported, the file system is constructed based on objects instead of logical blocks, the double mapping logic of the file system and the block management module is removed, the size of the file itself is equivalent to the size of the object, therefore, the attributes of the object inherit all the attributes of the file.
[0039] The file management module first sub-model is responsible for file storage, access control and retrieval of the stored files, and organization and allocation of the storage space, wherein the file system metadata, directory files and readable and writable files are stored in fixed-length objects as storage units, the management method of the traditional file system can be adopted, for example, the streaming file method, the record file method or the tree file method or the memory management method, and the memory management method is further preferred, by loading the metadata, directory files and readable and writable files which need to be frequently accessed and modified into the memory, the corresponding data can be directly read, written, erased or rewritten in the memory, the whole block does not need to be operated, the multiple erasing and writing of the storage device is avoided, the wear of the storage device is reduced, and it is beneficial to reduce the write amplification. At the same time, since the file system data is located in the memory, the access speed is fast, and it is beneficial to improve the efficiency of file operation. For one-time write file, variable-length objects are used as storage units, file data is completely stored in an object unit, file and object are one-to-one corresponding, the complex logical block mapping table in the file index node is removed, the logical order and the physical order of the data in the file are kept unified, the rewriting, deleting and recycling of the file correspond to the corresponding operation of the object, therefore, the file management module first sub-model only needs to maintain a current available object bitmap.
[0040] The object management second sub-model organizes the storage space into variable-length objects, is especially suitable for flash media requiring ex situ update, realizes data access by mapping the objects to a piece of physical storage area, allocates new physical space in sequence each time the object is written, and records the corresponding physical address and storage size of each object. When the storage space is insufficient, garbage collection is started, the effective objects are stored in a concentrated manner, and then a whole piece of continuous physical space is released for subsequent object writing. The size of the continuous physical space is adjusted based on the characteristics of the flash media module and the actual situation, and a typical value is several flash block sizes.
[0041] The flash media management third sub-model is responsible for flash failure management, operates the flash to perform actual flash page reading, flash page writing and flash block erasing operations, and provides reading, writing and erasing interfaces to the object management second sub-model. The actual physical space of the flash media is organized according to the flash block size in Zone blocks, is erased in units of Zone, supports random reading, and supports sequential writing operations within the Zone block.
[0042] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0043] Embodiment 1
[0044] A file system model, as shown in Figure 1 The file system model includes at least three sub-models, namely a file management module first sub-model, an object management module second sub-model and a flash media management module third sub-model;
[0045] The file management module first sub-model is configured to receive a file access request of a user, process the file request through a file management strategy, and convert the file request into an object operation of the second sub-model;
[0046] The object management module second sub-model receives an object access request from the file management module first sub-model, processes the object request through a logical object management strategy, and converts the object request into a flash reading, writing and erasing operation of the third sub-model;
[0047] The flash media management module third sub-model receives a flash operation request from the second sub-model, completes the reading, writing and erasing operation of the flash media, and is responsible for recording the flash running state information and managing the failure media information.
[0048] As shown in Figure 2As shown, the file management module divides the continuous logical object area provided by the object management module into three areas: a management area, a read / write file area, and a disposable file area. The management area or the read / write file area is managed using memory. The file system reads the management area or the read / write file area into memory. When data in the management area or the read / write file area needs to be modified, the modification operation can be performed directly at the original location of the data, without needing to operate on the entire block. This avoids multiple writes and erases on the storage device, reduces storage device wear, and helps reduce write speed. Simultaneously, since the file system data resides in memory, access speed is fast, which helps improve the efficiency of file operations. The management area is used to store file system metadata, the read / write file area is used to store directory files and read / write files from users, and the disposable file area is used to manage users' disposable files. The logical objects of each of the three areas are configured according to user needs.
[0049] The logical object management module divides the contiguous physical address partition into two zones: a fixed-length logical zone and a variable-length logical zone. The fixed-length logical zone contains objects of fixed size and is used to store management area data from the file system and readable / writable file data. The variable-length logical zone stores one-time files from the file system. The actual physical zone size occupied by the fixed-length and variable-length logical zones, and whether they share a physical zone, are determined by the user's configuration policy. The flash memory media management module organizes the flash memory into contiguous zone partitions based on the physical characteristics of flash memory: page-based read / write, block-based erase, and sequential writing within a block.
[0050] Furthermore, for one-time documents, such as Figure 3 As shown, the file management strategy is configured as follows: for one-time files, the logical object ID occupied is recorded in the upper-level directory file. The directory file records the address mapping of all one-time files. Each mapping table entry contains three fields: filename, logical object ID, and size. The filename is used for indexing, the logical object ID points to the actual stored logical object, and the size represents the file size.
[0051] Furthermore, the logical object management strategy processes the object access request by: mapping a logical object to a contiguous physical storage space according to a logical object mapping table, wherein the logical object mapping table includes multiple mapping table entries; each mapping table entry contains at least two fields: a physical address (PBA) and a logical object size (Size); the logical object mapping table is indexed according to the logical object ID number; the physical address (PBA) is divided into two parts: Zone encoding and Zone offset, such as... Figure 4 , Figure 5 As shown.
[0052] The second sub-model for object management may further include an object storage optimization unit, which is used to obtain the ID and Size information of the logical object to form a Size information pool; the Size information in the Size information pool has sizes A1, A2, ..., A... m A N The Zone partition size is 2 K The Size information in the Size information pool is combined according to predetermined rules and compared with the Zone partition size for matching, and then stored in categories. Through this operation, the storage status of one-time files of different sizes can be optimized. Based on the Zone partition size, at least one one-time file is stored in the largest possible capacity, improving the utilization efficiency of Zone partition space, reducing the overhead of garbage collection, and improving system execution efficiency.
[0053] The predetermined rule includes the following steps: 1) summing the Size of any number of the logical objects; 2) if the summation result is less than 2... K Then, the corresponding logical object is defined as a virtual logical object; and the one-time files corresponding to the objects in the virtual object are stored in the same Zone partition; if the summation result is greater than 2 K Then return to step 1); 3) return the result to the second sub-model of object management, and perform an update operation on the corresponding logical object mapping table; where k is a positive integer and satisfies 2 K Greater than max(A1, A2, ..., A m A N ).
[0054] When using this file system model, the system includes a file management module, a logical object management module, and a flash media management module; the system responds to user requests and completes corresponding operations. These operations include: requests to write a one-time file, requests to read a one-time file, requests to rewrite a one-time file, and requests to delete a one-time file.
[0055] like Figure 6 As shown, when a user requests a new one-time file, the file management module first allocates a variable-length write logical object based on the current available object status. Then, the logical object management module converts the object ID to a new physical address based on the current write point status. Next, the file data is transmitted and written to the converted physical address. Finally, the management area data is modified to record the file name, the corresponding allocated logical object number, and the file length in the management area data, thus completing the file writing operation.
[0056] like Figure 7As shown, when receiving a read-once file request from a user, the file management module first indexes the file corresponding logical object number through the management area data, converts it into an object read request, sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation to transmit the read data back to the application, completing the read operation.
[0057] As shown, when receiving a read-once file request from a user, the file management module first indexes the file corresponding logical object number through the management area data, converts it into an object read request, sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation to transmit the read data back to the application, completing the read operation. Figure 8 As shown, when receiving a read-once file request from a user, the file management module first indexes the file corresponding logical object number through the management area data, converts it into an object read request, sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation to transmit the read data back to the application, completing the read operation.
[0058] As shown, when receiving a read-once file request from a user, the file management module first indexes the file corresponding logical object number through the management area data, converts it into an object read request, sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation to transmit the read data back to the application, completing the read operation. Figure 9 As shown, when receiving a read-once file request from a user, the file management module first indexes the file corresponding logical object number through the management area data, converts it into an object read request, sends the corresponding read request to the logical object management module, then the logical object management module looks up the object address mapping table to obtain the flash physical address corresponding to the read request, initiates a flash read operation, and finally the flash media management module initiates a flash read operation to transmit the read data back to the application, completing the read operation.
[0059] By dividing the file storage system into three sub-models, removing the double mapping logic of the file system and the block management module, simplifying the IO path, eliminating the double write amplification inside the file system and the block management module, by assigning all file attributes to the object, completing the file-based calculation directly through the object, achieving the function of completing the near-data calculation at the storage device end, at the same time, the object storage management module can also use the inherited file itself attribute characteristics to do storage optimization, such as cold and hot data, different application data stored separately, reducing the garbage collection overhead caused by mixed storage of different mode data, the same file continuous storage plays the performance advantage of sequential access of the medium, and improves the overall performance of the storage system.
[0060] The various embodiments in the specification are described in a progressive, or parallel, or progressive and parallel combination manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between the various embodiments can be mutually referred to.
[0061] It should be noted that, in the description of the present application, it is to be understood that the terms "upper", "lower", "top", "bottom", "inner", "outer", and the like are terms of reference and are made only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore should not be understood as limiting the present application. When a component is considered to be "connected" to another component, it can be directly connected to the other component or there can be a component disposed therebetween.
[0062] It should also be noted that, in this document, the terms of relationship such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such article or device. Without more limitation, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the article or device including the above-mentioned element.
[0063] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for constructing a file system model, the file system model comprising at least a first sub-model of a file management module, a second sub-model of an object management module, and a third sub-model of a flash memory medium management module; wherein the first sub-model of the file management module is configured to receive a file access request of a user, a file management strategy processes the file access request, and converts the file access request into an object access request for the second sub-model of the object management module; the second sub-model of the object management module is configured to provide a continuous logical object area to the first sub-model of the file management module, and receives the object access request from the first sub-model of the file management module, a logical object management strategy processes the object access request, and converts the object access request into a flash read / write / erase operation request for the third sub-model of the flash memory medium management module; the third sub-model of the flash memory medium management module provides a read, write, and erase interface to the second sub-model of the object management module, and receives the flash read, write, or erase operation request from the second sub-model, completes a read / write / erase operation on the flash memory medium, and records flash operation state information and invalid medium information; the first sub-model of the file management module divides the continuous logical object area provided by the second sub-model of the object management module into at least a management area, a read / write file area, and a one-time file area; and the second sub-model of the object management module divides a continuous physical address partition into at least a fixed-length logical area and a variable-length logical area; the file management strategy is configured to record a logical object ID of a one-time file in an upper directory file, the directory file records address mapping of all one-time files, each mapping table entry in the address mapping includes a file name, a logical object ID, and a Size, wherein the file name is used for indexing, the logical object ID points to an actually stored logical object, and the Size represents a file size; processing the object access request by the logical object management strategy includes mapping a logical object to a continuous physical storage space according to a logical object mapping table, the logical object mapping table includes a plurality of mapping table entries; each mapping table entry includes at least two fields of a physical address PBA and a logical object size Size, the logical object mapping table is indexed according to the logical object ID number; and the physical address PBA is divided into a Zone code and a Zone internal offset.
2. The method of claim 1, wherein: the fixed-length logical area is configured to store data of the management area and data of the read / write file area from the file system, and the object data size in the fixed-length logical area is fixed; and the variable-length logical area is configured to store data of the one-time file area from the file system, and the fixed-length logical area and the variable-length logical area determine an actual physical Zone partition size and whether to share the physical Zone partition according to a user configuration strategy.
3. The method of claim 1, wherein: the second sub-model of the object management module further includes an object storage optimization unit, the object storage optimization unit is used to obtain ID and Size information of the logical object, and form a Size information pool. And the Size information in the Size information pool is combined and summed by a predetermined rule, and then matched with the target Zone partition.
4. The method of claim 3, wherein: The size of the size information in the size information pool is A1, A2, A3,..., Ak respectively m , A N , A K , the size of the target zone partition is 2 K ; the predetermined rule is configured to include the following steps: 1) summing the size of any number of the logical objects, 2) if the sum is less than 2 K , defining the corresponding logical object as a virtual logical object; and storing the one-time file corresponding to the object in the virtual logical object in the same zone partition; if the sum is greater than 2 K , returning to step 1); 3) returning the result to the object management second sub-model, and updating the mapping table of the corresponding logical object; wherein k is a positive integer and satisfies 2 m > max (A1, A2,..., Ak-1, Ak) N .
5. The method of claim 1, wherein: The flash media management module organizes the physical addresses of the same operation into continuous Zone partitions according to the physical rule characteristics of flash page reading and writing, block erasing, and sequential writing of pages in a block, wherein the erasing operation is performed by Zone partition, and the writing operation must be in a Zone partition and address continuous.
6. The method of claim 5, wherein: The Zone partitions are arranged in order from small to large, and the sizes of adjacent Zone partitions are different.
7. The method of claim 2, wherein: The user configuration strategy at least includes the following steps: 1) reading the data of the Zone partition corresponding to the read-write file into the system memory, and performing reading, writing, deleting or covering operation on the read-write file in the memory; 2) performing covering operation on the data of the Zone partition corresponding to the read-write file of the fixed-length logical area in the memory at a preset fixed time interval.
8. A system for constructing a file system model according to any one of claims 1-7, the system comprising a file management module, a logical object management module, and a flash media management module; the system responds to user requests to complete corresponding operations; the operations include: When receiving a user's new write-once file request, first, the file management module allocates a variable-length write logical object according to the current available object state, then the logical object management module converts the object ID into a new physical address according to the current write point state, and then the flash media management module initiates file data transmission to write the one-time file data to the converted physical address, and after the writing is completed, the result is fed back to the file management module, which modifies the management area data and records the file name, the allocated corresponding logical object number and the file length to the management area data, and completes the write file operation; When receiving a user's read-once file request, first, the file management module indexes to the file corresponding logical object number through the management area data, converts it into an object read request, and sends the corresponding read request to the logical object management module, then the logical object management module finds the object address mapping table to get the flash physical address corresponding to the read request, initiates the flash read operation, and finally the flash media management module initiates the flash read operation to transmit the read data back to the application, and completes the read operation; When receiving a user's rewrite-once file request, first, the file management module indexes to the file corresponding logical object number through the management area data, converts it into an object write request, then the logical object management module converts the object ID into a new physical address according to the current write point state, and invalidates the old physical address, and then the flash media management module initiates file data transmission to write the one-time file data to the converted physical address, and after the writing is completed, the result is fed back to the file management module, which modifies the management area data and records the modified file length and attributes to the management area data, and completes the rewrite file operation; When receiving the user's request for deleting the one-time file, the file management module first indexes the file corresponding logical object number through the management area data, converts into an object recycling request, and sends it to the logical object management module. The logical object management module invalidates the physical address occupied by the object. The background garbage collection is started when the available space is insufficient, and the invalid physical address is recycled for subsequent file writing operation. After the deletion is completed, the result is fed back to the file management module. The file management module modifies the management area data, deletes the management data corresponding to the file, and completes the deletion of the writing file operation.
Citation Information
Patent Citations
Intelligent write allocation method and device based on ZNS solid state disk
CN114546295A
Device for implementing file system on nandflash of mobile terminal
WO2009103181A1