CN110018998A - A kind of file management method, system and electronic equipment and storage medium - Google Patents
A kind of file management method, system and electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110018998A CN110018998A CN201910295315.6A CN201910295315A CN110018998A CN 110018998 A CN110018998 A CN 110018998A CN 201910295315 A CN201910295315 A CN 201910295315A CN 110018998 A CN110018998 A CN 110018998A
- Authority
- CN
- China
- Prior art keywords
- address
- file
- access
- mapping relation
- index
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses a kind of file management method, system and a kind of electronic equipment and computer readable storage mediums, this method comprises: obtaining the index value of the access address and the file destination in the access request when receiving the access request of file destination;Wherein, the file destination is the ordinary file;Index node table is searched for according to the index value and obtains the corresponding index node of the file destination, and the corresponding index field of the access address is determined in the index node;The corresponding address mapping relation item of the access address is determined according to the index field, and the physical address of the corresponding data block of the access address is determined in the address mapping relation item, to respond the access request according to the physical address, the performance of file system management slicing files is improved.
Description
Technical field
This application involves technical field of memory, more specifically to a kind of file management method, system and a kind of electronics
Equipment and a kind of computer readable storage medium.
Background technique
Storage for fragment data, the prior art be directly adopt universal document system, such as EXT4 (Chinese name:
Forth generation extends file system, full name in English: Fourth extended filesystem).One fragment is equivalent to and is stored in
An ordinary file in universal document system.
Universal document system is powerful, includes not only file read-write function, further comprises other function such as catalogue, link
Energy.However, storage fragment data has only used file read-write function therein, the function utilization rate of universal document system is low,
Performance is poor.
Therefore, how to improve the performance of file system management slicing files is the technology that those skilled in the art need to solve
Problem.
Summary of the invention
The application be designed to provide a kind of file management method, system and a kind of electronic equipment and a kind of computer can
Storage medium is read, the performance of file system management slicing files is improved.
To achieve the above object, this application provides a kind of file management methods, are applied to file system, the file system
System is the file system of ordinary file in management universal document system, which comprises
When receiving the access request of file destination, the access address and target text in the access request are obtained
The index value of part;Wherein, the file destination is the ordinary file;
Index node table is searched for according to the index value and obtains the corresponding index node of the file destination, and in the rope
Draw and determines the corresponding index field of the access address in node;
The corresponding address mapping relation item of the access address is determined according to the index field, and in the address of cache
The physical address of the corresponding data block of the access address is determined in relational term, to respond the visit according to the physical address
Ask request.
It is wherein, described that the corresponding address mapping relation item of the access address is determined according to the index field, comprising:
The index field is searched in red-black tree construction in memory obtains the corresponding address of cache of the access address
Relational term.
Wherein, if the corresponding address mapping relation item of the access address is not present in the red and black tree construction, in institute
It states in address mapping relation item before the physical address of the determining data block, further includes:
The index field is searched in the corresponding address mapping table of the index node obtains the access address correspondence
Address mapping relation item, and the address mapping relation item is loaded onto the red-black tree construction.
Wherein, after the address mapping relation item being loaded onto the red-black tree construction, further includes:
The address mapping relation item is loaded onto global LRU table.
Wherein, the management granularity of metadata area is at least 4KB in the file system, and the management granularity of data area is extremely
It is less 1MB.
Wherein, determined in the address mapping relation item the corresponding data block of the access address physical address it
Before, further includes:
Judge that the corresponding data block of the access address whether there is according to the aiming field in the location mapping relations item
Data are written;
The corresponding data block of the access address is determined in the address mapping relation item physically if so, executing
The step of location.
Wherein, if the access request is read request, further include:
When the corresponding data block of the access address is there is no when write-in data, it is empty for directly returning to the data block.
Wherein, if the access request is write request, further include:
For the data allocated physical address to be written in the write request, and the address is written into the physical address and is reflected
It penetrates in relational term;
The data to be written are written in the corresponding data block of the physical address.
To achieve the above object, this application provides a kind of file management system,
Applied to file system, the file system is to manage the file system of ordinary file in universal document system, institute
The system of stating includes:
Module is obtained, for obtaining the access in the access request when receiving the access request of file destination
The index value of location and the file destination;Wherein, the file destination is the ordinary file;
Determining module obtains the corresponding index section of the file destination for searching for index node table according to the index value
Point, and the corresponding index field of the access address is determined in the index node;
Respond module, for determining the corresponding address mapping relation item of the access address according to the index field, and
Determine the physical address of the corresponding data block of the access address, in the address mapping relation item so as to according to the physics
Access request described in address response.
To achieve the above object, this application provides a kind of electronic equipment, comprising:
Memory, for storing computer program;
Processor is realized when for executing the computer program such as the step of above-mentioned file management method.
To achieve the above object, this application provides a kind of computer readable storage medium, the computer-readable storages
It is stored with computer program on medium, the step such as above-mentioned file management method is realized when the computer program is executed by processor
Suddenly.
By above scheme it is found that a kind of file management method provided by the present application, comprising: when receiving file destination
When access request, the index value of the access address and the file destination in the access request is obtained;Wherein, the target text
Part is the ordinary file;Index node table, which is searched for, according to the index value obtains the corresponding index node of the file destination,
And the corresponding index field of the access address is determined in the index node;The access is determined according to the index field
The corresponding address mapping relation item in address, and the corresponding data block of the access address is determined in the address mapping relation item
Physical address, to respond the access request according to the physical address.
File management method provided by the present application is applied to file system, and this document system is for managing universal document system
In ordinary file, i.e. the metadata metadata that only includes ordinary file passes through index node and address mapping relation item realized
The data management function of file in universal document system, a file fragmentation are a common text being stored in file system
Part eliminates functions, the designs of entire file system such as catalogue in universal document system, soft or hard link, special file and simplifies, function
Energy utilization rate is high, and then improves the performance of file system management slicing files.Disclosed herein as well is a kind of file management systems
System and a kind of electronic equipment and a kind of computer readable storage medium, are equally able to achieve above-mentioned technical effect.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
Application.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.Attached drawing is and to constitute specification for providing further understanding of the disclosure
A part, be used to explain the disclosure together with following specific embodiment, but do not constitute the limitation to the disclosure.Attached
In figure:
Fig. 1 is a kind of flow chart of file management method provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram of metadata provided by the embodiments of the present application;
Fig. 3 is a kind of division schematic diagram of physical space provided by the embodiments of the present application;
Fig. 4 is the flow chart of another file management method provided by the embodiments of the present application;
Fig. 5 is the flow chart of another file management method provided by the embodiments of the present application;
Fig. 6 is a kind of structure chart of file management system provided by the embodiments of the present application;
Fig. 7 is the structure chart of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The embodiment of the present application discloses a kind of file management method, is applied to file system, and the file system is management
The file system of ordinary file in universal document system, improves the performance of file system management slicing files.
Referring to Fig. 1, a kind of flow chart of file management method shown according to an exemplary embodiment, as shown in Figure 1, packet
It includes:
S101: when receiving the access request of file destination, access address in the access request and described is obtained
The index value of file destination;Wherein, the file destination is the ordinary file;
The executing subject of the present embodiment is file system, and this document system runs on user's space, can be used for slicing files
Management, compared with the prior art in universal document system run on the scheme of inner nuclear layer, the maintenance and property of this document system
Energy tuning is more convenient.The file system of the present embodiment can externally provide institute by way of C language API upwards and functional connect
Mouthful, such as (full name in English: Gluster File System, a kind of free software are mainly used in group system to Glusterfs
In, with good scalability) host program of server-side can be realized by these functional interfaces the creation of slicing files,
The logics such as deletion, read-write, can directly access logic block device or disk, each fragment by the block device file of Linux downwards
File is stored in the data block of logic block device or disk.One slicing files is that is, common text in this document system
Part, ordinary file are one of linux system file type, refer to the file on common meaning, such as data file, executable text
Part etc..Therefore the present embodiment file system unlike universal document system, this document system only realize file creation,
The logics such as deletion, read-write, do not realize other functions such as catalogue, soft or hard link, special file.
This document system divides the region of regular length for storing slicing files when formatting, on the head of block device
Metadata, metadata only includes the metadata of ordinary file in universal document system, include at least be used for storage file system
The index node table of the essential information of middle All Files and address mapping table for storage address mapping relations.
Specifically, index node table (such as Inode table), including multiple index nodes (such as inode), each rope
Draw the essential information that a file is stored in node, such as file size, modification time, address mapping table is as Inode table
Supplement, the address mapping relation of the physical address of the data block of the access address of storage file and storage this document, such as Fig. 2 institute
Show, each inode has recorded the metadata of a file, may include i_chechsum field (check field), i_mode word
Section (file type and access authority), i_flags field (file mark), i_uid field (file owners ID), i_gid word
Section (user group ID) and multiple i_extent fields etc..As seen from Figure 1, check bit is not present in data block (data block),
Therefore, all metadata have self checking ability in the present embodiment, but do not verify to the file data of storage, can take into account text
The reliability and performance of part system.
I_extent field has been directed toward the data block (extent i.e. in figure of a special 1MB in each inode
Block), the address mapping relation of this document is stored.It include multiple address mapping relation items in the data block (i.e. in figure
Extent item), may include in each address mapping relation item check bit (crc), be directed toward data block physical address word
Section (block) and reserved place (reserved) can also include characterizing in each data block with the presence or absence of write-in data
Aiming field (the bitmap field i.e. in figure), which is mainly used for realizing the sparse file of smaller particle size, and is promoted
Readwrite performance will describe in detail in subsequent embodiment.
It is, of course, also possible to include for the superblock of the global information of storage file system, for recording all data blocks
The bitmap block etc. of physical space service condition, herein without specifically limiting.Wherein, position block figure can be according to above-mentioned all addresses
Aiming field in mapping relations item obtains.
The physical space of logic block device or disk is divided into metadata area and data area.As shown in figure 3, preceding
1058MB is used as metadata area, and remaining part is then used as data area.Above-mentioned superblock (super
Block), index node table (Inode table) and position block figure (block bitmap) can store in metadata area, figure
Two superblocks be used for redundancy backup.And the address mapping table as Inode table supplement can be stored in data by algorithm
Region.
Preferably, the management granularity of metadata area is at least 4KB, i.e., various metadata are cached by least 4KB,
Read-write and self checking, the management granularity of data area are at least 1MB, i.e. the partition size of data block is at least 1MB.General file
The data block size that system divides is generally 512 bytes, but the data block size of file system provided in this embodiment is at least
1MB, i.e. the management granularity of data area are much larger than universal document system, so that required metadata space is smaller, it might even be possible to
It allows the metadata of the overwhelming majority to reside in memory, ensure that the performance of data access.The management of metadata in universal document system
Granularity is also generally 512 bytes, and the management granularity of the metadata of file system provided in this embodiment is at least 4KB, long-range
In universal document system, the efficiency of management of metadata is improved.
In this step, access request can may be write request for read request, including at least the index of file destination
The access address of value and this access, which can be suite number or a UUID (Chinese name: general unique identification
Code, full name in English: Universally Unique Identifier), herein without specifically limiting.If the access request is
Write request should also include data to be written.
S102: searching for index node table according to the index value and obtain the corresponding index node of the file destination, and
The corresponding index field of the access address is determined in the index node;
In specific implementation, when file system starts, index node table is loaded into memory Hash table.When receiving
When access request, the index value for the file destination that the index node table search previous step in memory Hash table obtains is obtained
The corresponding index node of the file destination determines the corresponding address mapping relation of access address access address in the index node
The index field of item, such as the extent0 in Fig. 2.
S103: the corresponding address mapping relation item of the access address is determined according to the index field, and describedly
The physical address of the corresponding data block of the access address is determined in the mapping relations item of location, to respond according to the physical address
The access request.
In this step, the corresponding relationship of the index field and address mapping relation item that are determined according to previous step can be true
Determine the corresponding address mapping relation item of access address, such as the extent item in Fig. 2.Preferably, since red-black tree construction can
To accelerate search efficiency, therefore, when accessing some address mapping relation item for the first time, red-black tree construction can be loaded into
In, subsequent that index field is searched in the red and black tree construction, i.e. this step may include: to search in red-black tree construction in memory
Suo Suoshu index field obtains the corresponding address mapping relation item of the access address.If institute is not present in the red and black tree construction
The corresponding address mapping relation item of access address is stated, then searches for the index in the corresponding address mapping table of the index node
Field obtains the corresponding address mapping relation item of the access address, and the address mapping relation item is loaded onto the red and black
In tree construction.
When searching for address mapping relation item corresponding less than the index field in red-black table structure, illustrate to access for the first time
When the data of the access address, the index field is searched in the address mapping table in metadata area and obtains the access address pair
The address mapping relation item answered, and be loaded into memory red and black tree construction.It preferably, can also be by the address mapping relation
Item is loaded onto global LRU (full name in English: Least Recently Used, a kind of page replacement algorithm of memory management) table
In.If since a data are not accessed in nearest a period of time, a possibility that it is accessed in the future also very
It is small.This step may be implemented to eliminate the data not being accessed at most when the space of restriction has been filled with data, improve into
The execution efficiency of journey, and then improve the response efficiency of access request.When the corresponding data of the access address are not to access for the first time,
The index field then is searched in the red-black tree construction of memory, obtains the corresponding mapping relations item of access address.
After obtaining address mapping relation item, the physical address of the corresponding data block of access request can be determined, and according to this
Physical address responds the access request.If access request is read request, the data in the object data block are returned to, if access request
For write request, then the data block is written into the data to be written in write request.
File management method provided by the embodiments of the present application is applied to file system, and this document system is for managing general text
Ordinary file in part system, i.e. metadata only include the metadata of ordinary file, pass through index node and address mapping relation
Item realizes the data management function of file in universal document system, and a file fragmentation is one be stored in file system
Ordinary file eliminates the functions such as catalogue in universal document system, soft or hard link, special file, the design of entire file system
It simplifies, function utilization rate is high, and then improves the performance of file system management slicing files.
When above-mentioned access request is read request, referring to fig. 4, another kind file pipe shown according to an exemplary embodiment
The flow chart of reason method, as shown in Figure 4, comprising:
S201: when receiving the read request of file destination, the reading address in the read request and the target are obtained
The index value of file;
In the present embodiment, access request is limited to read request, in the read request including file destination index value and
This requests corresponding reading address.
S202: searching for index node table according to the index value and obtain the corresponding index node of the file destination, and
The index field of the corresponding address mapping relation item in the reading address is obtained in the index node;
S203: the index field is searched in red-black tree construction in memory and obtains the corresponding address in the reading address
Mapping relations item;
S204: judge the data block with the presence or absence of write-in number according to the aiming field in the address mapping relation item
According to if so, into S205;If it is not, returning to the data block directly then as sky;
Sparse file characteristic can be provided by file system in this present embodiment, it is understood that there may be write-in data are empty number
According to block, therefore before determining physical address, it can judge that the data block is by the aiming field in address mapping relation item
It is no to there are write-in data, if so, the write-in data are returned to, if it is not, then directly returning to the data block for sky, after not needing progress
Continuous the step of determining physical address, improve the reading performance of file system.
S205: determining the physical address of the data block in the address mapping relation item, and according to it is described physically
Location returns to the write-in data in the data block.
As it can be seen that in the present embodiment, if access request is read request, before determining physical address, increasing judgement and reading
The corresponding data block in address simplifies data read process if otherwise directly returning to sky with the presence or absence of write-in data step, improves
The reading performance of file system.
When above-mentioned access request is write request, referring to Fig. 5, another file pipe shown according to an exemplary embodiment
The flow chart of reason method, as shown in Figure 5, comprising:
S301: when receiving the write request of file destination, the writing address in the write request and the target are obtained
The index value of file;
In the present embodiment, access request is limited to write request, index value, sheet in the read request including file destination
The corresponding writing address of secondary request and data to be written.
S302: searching for index node table according to the index value and obtain the corresponding index node of the file destination, and
The index field of the corresponding address mapping relation item in said write address is obtained in the index node;
S303: the index field is searched in red-black tree construction in memory and obtains the corresponding address in said write address
Mapping relations item;
S304: judge the data block with the presence or absence of write-in number according to the aiming field in the address mapping relation item
According to if so, into S305;If it is not, then entering S306;
S305: the physical address of the data block is determined in the address mapping relation item, and enters S307;
S306: for the data allocated physical address to be written in the write request, and will be described in physical address write-in
In address mapping relation item, and enter S307;
S307: the data to be written are written in the corresponding data block of the physical address.
In the present embodiment, judge data block with the presence or absence of write-in number according to the aiming field in address mapping relation item
According to, if so, determining the physical address of the data block, data are written into such a way that covering is write, the data block is written, if
It is no, then illustrate that the physical address field in address mapping relation item is first the data allocated physical address to be written for sky, it will
It is added to physical address field, and is written into data and the corresponding data block of the physical address is written.
A kind of file management system provided by the embodiments of the present application is introduced below, a kind of file pipe described below
Reason system can be cross-referenced with a kind of above-described file management method.
Referring to Fig. 6, a kind of structure chart of file management system shown according to an exemplary embodiment, as shown in fig. 6, packet
It includes:
Module 601 is obtained, for obtaining the access in the access request when receiving the access request of file destination
The index value of address and the file destination;Wherein, the file destination is the ordinary file;
Determining module 602 obtains the corresponding rope of the file destination for searching for index node table according to the index value
Draw node, and determines the corresponding index field of the access address in the index node;
Respond module 603, for determining the corresponding address mapping relation item of the access address according to the index field,
And the physical address of the corresponding data block of the access address is determined in the address mapping relation item, so as to according to the object
Manage access request described in address response.
File management system provided by the embodiments of the present application is applied to file system, and this document system is for managing general text
Ordinary file in part system, i.e. metadata only include the metadata of ordinary file, pass through index node and address mapping relation
Item realizes the data management function of file in universal document system, and a file fragmentation is one be stored in file system
Ordinary file eliminates the functions such as catalogue in universal document system, soft or hard link, special file, the design of entire file system
It simplifies, function utilization rate is high, and then improves the performance of file system management slicing files.
On the basis of the above embodiments, the respond module 603 includes: as a preferred implementation manner,
First search unit obtains the access for searching for the index field in red-black tree construction in memory
The corresponding address mapping relation item in location;
Response unit, for determining the physics of the corresponding data block of the access address in the address mapping relation item
Address, to respond the access request according to the physical address.
On the basis of the above embodiments, if institute is not present in the red-black tree construction as a preferred implementation manner,
The corresponding address mapping relation item of access address is stated, then the respond module 603 further include:
Second search unit is obtained for searching for the index field in the corresponding address mapping table of the index node
The corresponding address mapping relation item of the access address, and the address mapping relation item is loaded onto the red-black tree construction
In.
On the basis of the above embodiments, the respond module 603 as a preferred implementation manner, further include:
Loading unit, for the address mapping relation item to be loaded onto global LRU table.
On the basis of the above embodiments, metadata area in the file system as a preferred implementation manner,
Management granularity is at least 4KB, and the management granularity of data area is at least 1MB.
On the basis of the above embodiments, the respond module 603 as a preferred implementation manner, further include:
Judging unit, for judging the corresponding number of the access address according to the aiming field in the location mapping relations item
According to block with the presence or absence of write-in data;If so, starting the workflow of the response unit;
On the basis of the above embodiments, if the access request is read request, institute as a preferred implementation manner,
State respond module 603 further include:
Return unit, described in directly returning when the corresponding data block of the access address is there is no data are written
Data block is sky.
On the basis of the above embodiments, if the access request is write request, institute as a preferred implementation manner,
State respond module 603 further include:
Allocation unit, for for the data allocated physical address to be written in the write request, and by the physical address
It is written in the address mapping relation item;
Writing unit, for the data to be written to be written in the corresponding data block of the physical address.
About the system in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Present invention also provides a kind of electronic equipment, referring to Fig. 7, a kind of electronic equipment 700 provided by the embodiments of the present application
Structure chart, as shown in fig. 7, may include processor 11 and memory 12.The electronic equipment 700 can also include multimedia group
Part 13, one or more of input/output (I/O) interface 14 and communication component 15.
Wherein, processor 11 is used to control the integrated operation of the electronic equipment 700, to complete above-mentioned file management method
In all or part of the steps.Memory 12 is used to store various types of data to support the operation in the electronic equipment 700,
These data for example may include the instruction of any application or method for operating on the electronic equipment 700, and
The relevant data of application program, such as contact data, the message of transmitting-receiving, picture, audio, video etc..The memory 12 can
By any kind of volatibility or non-volatile memory device or their combination realization, such as static random access memory
Device (Static Random Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory
(Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), erasable programmable
Read-only memory (Erasable Programmable Read-Only Memory, abbreviation EPROM), programmable read only memory
(Programmable Read-Only Memory, abbreviation PROM), and read-only memory (Read-Only Memory, referred to as
ROM), magnetic memory, flash memory, disk or CD.Multimedia component 13 may include screen and audio component.Wherein shield
Curtain for example can be touch screen, and audio component is used for output and/or input audio signal.For example, audio component may include one
A microphone, microphone is for receiving external audio signal.The received audio signal can be further stored in memory
It 12 or is sent by communication component 15.Audio component further includes at least one loudspeaker, is used for output audio signal.I/O interface
14 provide interface between processor 11 and other interface modules, other above-mentioned interface modules can be keyboard, mouse, button
Deng.These buttons can be virtual push button or entity button.Communication component 15 for the electronic equipment 700 and other equipment it
Between carry out wired or wireless communication.Wireless communication, such as Wi-Fi, bluetooth, near-field communication (Near Field
Communication, abbreviation NFC), 2G, 3G or 4G or they one or more of combination, therefore corresponding communication
Component 15 may include: Wi-Fi module, bluetooth module, NFC module.
In one exemplary embodiment, electronic equipment 700 can be by one or more application specific integrated circuit
(Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital
Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device,
Abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field programmable gate array
(Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member
Part is realized, for executing above-mentioned file management method.
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it should
The step of above-mentioned file management method is realized when program instruction is executed by processor.For example, the computer readable storage medium can
Think the above-mentioned memory 12 including program instruction, above procedure instruction can be executed by the processor 11 of electronic equipment 700 with complete
At above-mentioned file management method.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For system disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.It should be pointed out that for those skilled in the art, under the premise of not departing from the application principle, also
Can to the application, some improvement and modification can also be carried out, these improvement and modification also fall into the protection scope of the claim of this application
It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Claims (11)
1. a kind of file management method, which is characterized in that be applied to file system, the file system is management general file system
The file system of ordinary file in system, which comprises
When receiving the access request of file destination, access address in the access request and the file destination are obtained
Index value;Wherein, the file destination is the ordinary file;
Index node table is searched for according to the index value and obtains the corresponding index node of the file destination, and is saved in the index
The corresponding index field of the access address is determined in point;
The corresponding address mapping relation item of the access address is determined according to the index field, and in the address mapping relation
The physical address of the corresponding data block of the access address is determined in, is asked to respond the access according to the physical address
It asks.
2. file management method according to claim 1, which is characterized in that described to determine the visit according to the index field
Ask address corresponding address mapping relation item, comprising:
The index field is searched in red-black tree construction in memory obtains the corresponding address mapping relation of the access address
?.
3. file management method according to claim 2, which is characterized in that if the visit is not present in the red and black tree construction
Ask address corresponding address mapping relation item, then determined in the address mapping relation item data block physical address it
Before, further includes:
The index field, which is searched for, in the corresponding address mapping table of the index node obtains the access address correspondingly
Location mapping relations item, and the address mapping relation item is loaded onto the red-black tree construction.
4. file management method according to claim 3, which is characterized in that be loaded onto the address mapping relation item described
After in red-black tree construction, further includes:
The address mapping relation item is loaded onto global LRU table.
5. file management method according to claim 1, which is characterized in that the management of metadata area in the file system
Granularity is at least 4KB, and the management granularity of data area is at least 1MB.
6. according to claim 1 to file management method described in any one of 5, which is characterized in that in the address mapping relation
Before the physical address for determining the corresponding data block of the access address in, further includes:
Judge the corresponding data block of the access address with the presence or absence of write-in according to the aiming field in the location mapping relations item
Data;
If so, executing the physical address for determining the corresponding data block of the access address in the address mapping relation item
Step.
7. file management method according to claim 6, which is characterized in that if the access request is read request, also wrap
It includes:
When the corresponding data block of the access address is there is no when write-in data, it is empty for directly returning to the data block.
8. file management method according to claim 6, which is characterized in that if the access request is write request, also wrap
It includes:
For the data allocated physical address to be written in the write request, and the address of cache is written into the physical address and is closed
In set entry;
The data to be written are written in the corresponding data block of the physical address.
9. a kind of file management system, which is characterized in that be applied to file system, the file system is management general file system
The file system of ordinary file in system, the system comprises:
Obtain module, for when receiving the access request of file destination, obtain the access address in the access request and
The index value of the file destination;Wherein, the file destination is the ordinary file;
Determining module obtains the corresponding index node of the file destination for searching for index node table according to the index value,
And the corresponding index field of the access address is determined in the index node;
Respond module, for determining the corresponding address mapping relation item of the access address according to the index field, and in institute
The physical address that the corresponding data block of the access address is determined in address mapping relation item is stated, so as to according to the physical address
Respond the access request.
10. a kind of electronic equipment characterized by comprising
Memory, for storing computer program;
Processor realizes the slicing files management as described in any one of claims 1 to 8 when for executing the computer program
The step of method.
11. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program realizes the slicing files manager as described in any one of claims 1 to 8 when the computer program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910295315.6A CN110018998B (en) | 2019-04-12 | 2019-04-12 | File management method and system, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910295315.6A CN110018998B (en) | 2019-04-12 | 2019-04-12 | File management method and system, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110018998A true CN110018998A (en) | 2019-07-16 |
CN110018998B CN110018998B (en) | 2023-05-12 |
Family
ID=67191280
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910295315.6A Active CN110018998B (en) | 2019-04-12 | 2019-04-12 | File management method and system, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110018998B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795626A (en) * | 2019-10-28 | 2020-02-14 | 南京弹跳力信息技术有限公司 | Big data processing method and system |
CN111274051A (en) * | 2020-01-19 | 2020-06-12 | 中信银行股份有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN111309376A (en) * | 2020-02-13 | 2020-06-19 | 无锡华云数据技术服务有限公司 | Data processing method, device, equipment and storage medium |
CN111881466A (en) * | 2020-08-06 | 2020-11-03 | 成都卫士通信息产业股份有限公司 | File output method and device, electronic equipment and storage medium |
CN112380176A (en) * | 2020-11-17 | 2021-02-19 | 浙江大华技术股份有限公司 | Method and device for monitoring file system abnormity in real time and storage medium |
CN112559485A (en) * | 2019-09-26 | 2021-03-26 | 伊姆西Ip控股有限责任公司 | Method, apparatus and computer program product for managing a storage system |
CN112650477A (en) * | 2020-12-31 | 2021-04-13 | 深圳软牛科技有限公司 | Project data batch transfer method and device and electronic equipment |
CN113656078A (en) * | 2021-07-28 | 2021-11-16 | 北京车和家信息技术有限公司 | Equipment starting method and device, storage medium and electronic equipment |
CN116820787A (en) * | 2023-08-31 | 2023-09-29 | 湖北芯擎科技有限公司 | Load balancing method, load balancing device, electronic equipment and computer readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5557674A (en) * | 1993-07-22 | 1996-09-17 | Kok-Wah Yeow | Absolute static lock of files and directories on magnetic disk storage media in single machine personal microcomputers |
WO1998022890A1 (en) * | 1996-11-22 | 1998-05-28 | Mangosoft Corporation | System for tracking data |
CN103019953A (en) * | 2012-12-28 | 2013-04-03 | 华为技术有限公司 | Construction system and construction method for metadata |
US20150249618A1 (en) * | 2014-03-02 | 2015-09-03 | Plexistor Ltd. | Peer to peer ownership negotiation |
WO2015131403A1 (en) * | 2014-03-07 | 2015-09-11 | 华为技术有限公司 | File accessing method and related device |
WO2016082196A1 (en) * | 2014-11-28 | 2016-06-02 | 华为技术有限公司 | File access method and apparatus and storage device |
US9471595B1 (en) * | 2013-09-30 | 2016-10-18 | Emc Corporation | Recovering file mapping information in file systems |
US20170168953A1 (en) * | 2014-09-01 | 2017-06-15 | Huawei Technologies Co., Ltd. | File access method and apparatus, and storage system |
CN109376122A (en) * | 2018-09-25 | 2019-02-22 | 深圳市元征科技股份有限公司 | A kind of file management method, system and block chain node device and storage medium |
-
2019
- 2019-04-12 CN CN201910295315.6A patent/CN110018998B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5557674A (en) * | 1993-07-22 | 1996-09-17 | Kok-Wah Yeow | Absolute static lock of files and directories on magnetic disk storage media in single machine personal microcomputers |
WO1998022890A1 (en) * | 1996-11-22 | 1998-05-28 | Mangosoft Corporation | System for tracking data |
CN103019953A (en) * | 2012-12-28 | 2013-04-03 | 华为技术有限公司 | Construction system and construction method for metadata |
US9471595B1 (en) * | 2013-09-30 | 2016-10-18 | Emc Corporation | Recovering file mapping information in file systems |
US20150249618A1 (en) * | 2014-03-02 | 2015-09-03 | Plexistor Ltd. | Peer to peer ownership negotiation |
WO2015131403A1 (en) * | 2014-03-07 | 2015-09-11 | 华为技术有限公司 | File accessing method and related device |
US20170168953A1 (en) * | 2014-09-01 | 2017-06-15 | Huawei Technologies Co., Ltd. | File access method and apparatus, and storage system |
WO2016082196A1 (en) * | 2014-11-28 | 2016-06-02 | 华为技术有限公司 | File access method and apparatus and storage device |
US20170262172A1 (en) * | 2014-11-28 | 2017-09-14 | Huawei Technologies Co., Ltd. | File Access Method and Apparatus, and Storage Device |
CN109376122A (en) * | 2018-09-25 | 2019-02-22 | 深圳市元征科技股份有限公司 | A kind of file management method, system and block chain node device and storage medium |
Non-Patent Citations (1)
Title |
---|
童维勤等: "《数据密集型计算和模型》", 31 January 2015 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112559485A (en) * | 2019-09-26 | 2021-03-26 | 伊姆西Ip控股有限责任公司 | Method, apparatus and computer program product for managing a storage system |
CN110795626A (en) * | 2019-10-28 | 2020-02-14 | 南京弹跳力信息技术有限公司 | Big data processing method and system |
CN111274051A (en) * | 2020-01-19 | 2020-06-12 | 中信银行股份有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN111274051B (en) * | 2020-01-19 | 2023-08-22 | 中信银行股份有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN111309376A (en) * | 2020-02-13 | 2020-06-19 | 无锡华云数据技术服务有限公司 | Data processing method, device, equipment and storage medium |
CN111309376B (en) * | 2020-02-13 | 2024-04-30 | 无锡华云数据技术服务有限公司 | Data processing method, device, equipment and storage medium |
CN111881466A (en) * | 2020-08-06 | 2020-11-03 | 成都卫士通信息产业股份有限公司 | File output method and device, electronic equipment and storage medium |
CN112380176A (en) * | 2020-11-17 | 2021-02-19 | 浙江大华技术股份有限公司 | Method and device for monitoring file system abnormity in real time and storage medium |
CN112650477A (en) * | 2020-12-31 | 2021-04-13 | 深圳软牛科技有限公司 | Project data batch transfer method and device and electronic equipment |
CN113656078A (en) * | 2021-07-28 | 2021-11-16 | 北京车和家信息技术有限公司 | Equipment starting method and device, storage medium and electronic equipment |
CN116820787A (en) * | 2023-08-31 | 2023-09-29 | 湖北芯擎科技有限公司 | Load balancing method, load balancing device, electronic equipment and computer readable storage medium |
CN116820787B (en) * | 2023-08-31 | 2023-12-15 | 湖北芯擎科技有限公司 | Load balancing method, load balancing device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110018998B (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110018998A (en) | A kind of file management method, system and electronic equipment and storage medium | |
KR101977575B1 (en) | Apparatus and method for directory entry look up, and recording medium recording the directory entry look up program thereof | |
US11782632B2 (en) | Selective erasure of data in a SSD | |
CN102782683B (en) | Buffer pool extension for database server | |
CN109086388B (en) | Block chain data storage method, device, equipment and medium | |
US8234317B1 (en) | Auto-committing files to immutable status based on a change log of file system activity | |
CN108121813B (en) | Data management method, device, system, storage medium and electronic equipment | |
KR20200122994A (en) | Key Value Append | |
CN109804359A (en) | For the system and method by write back data to storage equipment | |
CN113568582B (en) | Data management method, device and storage equipment | |
CN111177143B (en) | Key value data storage method and device, storage medium and electronic equipment | |
CN109918380A (en) | Data processing method, device, storage medium and electronic equipment | |
US10509767B2 (en) | Systems and methods for managing snapshots of a file system volume | |
CN114253908A (en) | Data management method and device of key value storage system | |
CN112799595A (en) | Data processing method, device and storage medium | |
US10289345B1 (en) | Contention and metadata write amplification reduction in log structured data storage mapping | |
CN113835639A (en) | I/O request processing method, device, equipment and readable storage medium | |
CN118051179A (en) | Techniques for partition namespace storage using multiple partitions | |
US9817837B2 (en) | Method and system for file storage and access | |
CN111930684A (en) | Small file processing method, device and equipment based on HDFS (Hadoop distributed File System) and storage medium | |
CN115904255A (en) | Data request method, device, equipment and storage medium | |
CN116303267A (en) | Data access method, device, equipment and storage medium | |
US10209909B1 (en) | Storage element cloning in presence of data storage pre-mapper | |
CN115934002A (en) | Solid state disk access method, solid state disk, storage system and cloud server | |
CN111488128B (en) | Method, device, equipment and medium for updating metadata |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |