CN110008176A - A kind of file creating method and relevant apparatus - Google Patents
A kind of file creating method and relevant apparatus Download PDFInfo
- Publication number
- CN110008176A CN110008176A CN201910290922.3A CN201910290922A CN110008176A CN 110008176 A CN110008176 A CN 110008176A CN 201910290922 A CN201910290922 A CN 201910290922A CN 110008176 A CN110008176 A CN 110008176A
- Authority
- CN
- China
- Prior art keywords
- inode
- file
- target
- backup file
- standby pool
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1435—Saving, restoring, recovering or retrying at system level using file system or storage system metadata
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- 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/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/164—File meta data generation
- G06F16/166—File name conversion
Abstract
The invention discloses a kind of file creating methods, multiple backup files and corresponding iNode are pre-created, after receiving document creation request, it no longer needs to re-create iNode, it is only necessary to a file be returned to client with corresponding iNode, the time of iNode creation can be saved, even if having heap file request to create, the creation of file can also be rapidly completed, save the plenty of time, improve the performance of file system.Present invention also provides a kind of file creating system, device and computer readable storage mediums, and above-mentioned technical effect equally may be implemented.
Description
Technical field
The present invention relates to file system, more specifically to a kind of file creating method, system, device and computer
Readable storage medium storing program for executing.
Background technique
File system is operating system for clearly storing the method and data structure of equipment or the file on subregion;Exist
The method for storing constituent act in equipment.It is responsible for management in operating system and the software mechanism of storage file information is known as file pipe
Reason system, abbreviation file system.Specifically, it, which is responsible for user, establishes file, deposit is read, modification, dump file, control
The access of file processed cancels file etc. when user does not use.
When creating file in file system, client can initiate request to create, distribute after mds (Metadata Service) response
The iNode of one corresponding request, iNode include the metamessage of file, such as creation time, access time, file size, file
The position etc. of data, these information are initial information after creating file, file size, number of files when file is written into data
According to position can just change.
It is that iNode distributes the operation such as address that the process of distribution iNode, which needs waiting system, if document creation request is more
When, the time of waiting also will be very long.
Therefore, iNode distributes the time when how to reduce document creation, is those skilled in the art's problem to be solved.
Summary of the invention
The purpose of the present invention is to provide a kind of file creating method, system, device and computer readable storage medium, with
INode distributes the time when solving the problems, such as how to reduce document creation.
To achieve the above object, the embodiment of the invention provides following technical solutions:
A kind of file creating method, comprising:
Receive document creation request;
Target backup file and target iNode are distributed in standby pool for the request to create;Wherein, the standby pool packet
Include the backup file that is pre-created and corresponding iNode;
When document creation request originator utilizes the target iNode to complete the read-write operation to the target backup file
When, the target iNode is renamed, so that the corresponding current file completed after read-write operation of the target iNode.
Optionally, described when document creation request originator is completed using the target iNode to the spare text of the target
When the read-write operation of part, after being renamed to the target iNode, further includes:
New backup file and corresponding iNode are created, and the new backup file is added to corresponding iNode
The standby pool.
Optionally, the backup file in the standby pool is stored in caching with corresponding iNode.
Optionally, the backup file in the standby pool is under collapse directories.
Present invention also provides a kind of file creating systems, comprising:
Receiving module, for receiving document creation request;
Distribution module, for distributing target backup file and target iNode in standby pool for the request to create;Its
In, the standby pool includes the backup file that is pre-created and corresponding iNode;
Renamer module, for utilizing target iNode completion standby to the target when document creation request originator
When with the read-write operation of file, the target iNode is renamed, so that the target iNode is corresponding to complete read-write behaviour
Current file after work.
Optionally, the system also includes:
Creation module, for creating new backup file and corresponding iNode, and by the new backup file with it is corresponding
INode be added to the standby pool.
Optionally, the backup file in the standby pool is stored in caching with corresponding iNode.
Optionally, the backup file in the standby pool is under collapse directories.
Present invention also provides a kind of document creation devices, comprising:
Memory, for storing computer program;
Processor is realized when for executing the computer program such as the step of the file creating method.
Present invention also provides a kind of computer readable storage mediums, which is characterized in that the computer-readable storage medium
It is stored with computer program in matter, the step such as the file creating method is realized when the computer program is executed by processor
Suddenly.
By above scheme it is found that a kind of file creating method provided by the invention, comprising: receive document creation request;
Target backup file and target iNode are distributed in standby pool for the request to create;Wherein, the standby pool includes creating in advance
The backup file built and corresponding iNode;When document creation request originator is completed using the target iNode to the target
When the read-write operation of backup file, the target iNode is renamed, so that the target iNode is corresponding to complete read-write
Current file after operation.
It can be seen that a kind of file creating method provided by the present application, be pre-created multiple backup files with it is corresponding
INode, receive document creation request after, no longer need to re-create iNode, it is only necessary to by a file with it is corresponding
INode returns to client, can save the time of iNode creation, can also be with even if having heap file request to create
The creation of file is rapidly completed, saves the plenty of time, improves the performance of file system.Present invention also provides a kind of files
Above-mentioned technical effect equally may be implemented in creation system, device and computer readable storage medium.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, 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 invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of file creating method flow chart disclosed by the embodiments of the present invention;
Fig. 2 is a kind of file creating system structural schematic diagram disclosed by the embodiments of the present invention;
Fig. 3 is a kind of document creation apparatus structure schematic diagram disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of file creating method, system, device and computer readable storage mediums, with solution
INode distributes the problem of time when certainly how to reduce document creation.
Referring to Fig. 1, a kind of file creating method provided in an embodiment of the present invention is specifically included:
S101 receives document creation request.
Specifically, when client needs to create a file to file system, file wound can be sent by mds into file system
Request is built, mds receives this document request to create.
S102 distributes target backup file and target iNode for the request to create in standby pool;Wherein, described standby
It include the backup file that is pre-created and corresponding iNode with pond.
In the present solution, the file of preset quantity is pre-created as spare, and iNode is distributed in advance.These files
It is stored in standby pool with corresponding iNode.
After receiving document creation request, mds determined directly in standby pool file being pre-created and
INode, and return to request to create initiator the operation such as is written and read to file.It should be noted that being read and write in file
Before, all rigid files for completing creation be it is identical, after the completion of file is created, then modify in the file information and iNode
Metadata information.
S103 completes the read-write to the backup file using the target iNode when document creation request originator and grasps
When making, the target iNode is renamed, so that the corresponding current file completed after read-write operation of the target iNode.
Specifically, when document creation request originator to target backup file complete read-write operation after, to target iNode into
Row renaming.It should be noted that renaming is that mds modifies iNode attribute, renaming operation here only carries out rename and refers to
It enables, in iNode, executes the attribute informations such as rename instruction and modification filename, file address, make current target iNode
For the file after corresponding completion read-write operation.
In a specific embodiment, described when document creation request originator is completed using the target iNode
When to the read-write operation of the target backup file, after being renamed to the target iNode, further includes:
New backup file and corresponding iNode are created, and the new backup file is added to corresponding iNode
The standby pool.
In order to avoid the iNode being pre-created has been assigned in this programme, after receiving new document creation request
The creation for needing to wait iNode as the prior art, in the present solution, whenever there is backup file to be divided with corresponding iNode
After matching, new backup file and corresponding iNode are just re-created, is saved in standby pool.It should be noted that thinking standby pool
The operation of the new backup file and corresponding iNode of middle creation and from standby pool taking-up target backup file with it is corresponding
INode, the operation for distributing to requesting party can carry out simultaneously.
In a specific embodiment, the backup file in the standby pool is stored in slow with corresponding iNode
In depositing.
In the present solution, in order to complete the distribution of backup file and iNode as early as possible, in the buffer by standby pool storage, no
Rule operation is carried out, the speed for reading backup file and iNode in the buffer can faster, therefore be completion document creation request
Time is also just faster.
In a specific embodiment, the backup file in the standby pool is under collapse directories.
It should be noted that due to the data in standby pool be not user creation file and iNode, in order to avoid with
Family operating mistake, standby pool is stored under collapse directories, makes client i.e. requesting party that can not directly find the mesh
It records and gets corresponding file and iNode.
It can be seen that a kind of file creating method provided by the embodiments of the present application, be pre-created multiple backup files with it is right
The iNode answered, receive document creation request after, no longer need to re-create iNode, it is only necessary to by a file with it is corresponding
INode returns to client, can save the time of iNode creation, can also be with even if having heap file request to create
The creation of file is rapidly completed, saves the plenty of time, improves the performance of file system.
A kind of file creating system provided by the embodiments of the present application is introduced below, a kind of file wound described below
Building system can be cross-referenced with above-described embodiment.
Referring to fig. 2, a kind of file creating system provided by the embodiments of the present application, specifically includes:
Receiving module 201, for receiving document creation request.
Distribution module 202, for distributing target backup file and target iNode in standby pool for the request to create;
Wherein, the standby pool includes the backup file that is pre-created and corresponding iNode.
Renamer module 203, for being completed using the target iNode to the target when document creation request originator
When the read-write operation of backup file, the target iNode is renamed, so that the target iNode is corresponding to complete read-write
Current file after operation.
In a specific embodiment, the system also includes:
Creation module, for creating new backup file and corresponding iNode, and by the new backup file with it is corresponding
INode be added to the standby pool.
In a specific embodiment, the backup file in the standby pool is stored in slow with corresponding iNode
In depositing.
In a specific embodiment, the backup file in the standby pool is under collapse directories.
The file creating system of the present embodiment is for realizing file creating method above-mentioned, therefore in file creating system
The embodiment part of the visible file creating method hereinbefore of specific embodiment, for example, receiving module 201, distribution module
202, renamer module 203 is respectively used to realize step S101, S102, S103 in above-mentioned file creating method, so, tool
Body embodiment is referred to the description of corresponding various pieces embodiment, and details are not described herein.
Present invention also provides a kind of document creation devices, referring to Fig. 3, a kind of document creation provided in an embodiment of the present invention
The structure chart of device, as shown in Figure 3, comprising:
Memory 100, for storing computer program;
Step provided by above-described embodiment may be implemented in processor 200 when for executing the computer program.
Specifically, memory 100 includes non-volatile memory medium, built-in storage.Non-volatile memory medium storage
There are operating system and computer-readable instruction, which is that the operating system and computer in non-volatile memory medium can
The operation of reading instruction provides environment.Processor 200 provides calculating and control ability for document creation device, may be implemented above-mentioned
Step provided by one file creating method embodiment.
On the basis of the above embodiments, preferably, the data acquisition equipment further include:
Input interface 300 is controlled through processor and is saved for obtaining computer program, parameter and the instruction of external importing
Into memory.The input interface 300 can be connected with input unit, receive parameter or instruction that user is manually entered.This is defeated
Entering device can be the touch layer covered on display screen, be also possible to the key being arranged in terminal enclosure, trace ball or Trackpad,
It is also possible to keyboard, Trackpad or mouse etc..
Display unit 400, the data sent for video-stream processor.The display unit 400 can be the display in PC machine
Screen, liquid crystal display or electric ink display screen etc..
The network port 500, for being communicatively coupled with external each terminal device.Skill is communicated used by the communication connection
Art can be cable communicating technology or wireless communication technique, as mobile high definition chained technology (MHL), universal serial bus (USB),
High-definition media interface (HDMI), Bluetooth Communication Technology, the low-power consumption bluetooth communication technology, is based on adopting wireless fidelity technology (WiFi)
The communication technology etc. of IEEE802.11s.
Present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer
Step provided by above-described embodiment may be implemented when program is executed by processor.The storage medium may include: USB flash disk, movement
Hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), the various media that can store program code such as magnetic or disk.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of file creating method characterized by comprising
Receive document creation request;
Target backup file and target iNode are distributed in standby pool for the request to create;Wherein, the standby pool includes pre-
The backup file first created and corresponding iNode;
When document creation request originator completes the read-write operation to the target backup file using the target iNode,
The target iNode is renamed, so that the corresponding current file completed after read-write operation of the target iNode.
2. the method according to claim 1, wherein described when document creation request originator utilizes the target
When iNode completes the read-write operation to the target backup file, after being renamed to the target iNode, further includes:
New backup file and corresponding iNode are created, and the new backup file is added to corresponding iNode described
Standby pool.
3. the method according to claim 1, wherein backup file in the standby pool and corresponding iNode
It is stored in caching.
4. the method according to claim 1, wherein the backup file in the standby pool is in collapse directories
Under.
5. a kind of file creating system characterized by comprising
Receiving module, for receiving document creation request;
Distribution module, for distributing target backup file and target iNode in standby pool for the request to create;Wherein, institute
Stating standby pool includes the backup file that is pre-created and corresponding iNode;
Renamer module, for being completed using the target iNode to the spare text of the target when document creation request originator
When the read-write operation of part, the target iNode is renamed, so that after the corresponding completion read-write operation of the target iNode
Current file.
6. system according to claim 5, which is characterized in that the system also includes:
Creation module, for creating new backup file and corresponding iNode, and by the new backup file with it is corresponding
INode is added to the standby pool.
7. system according to claim 5, which is characterized in that backup file in the standby pool and corresponding iNode
It is stored in caching.
8. system according to claim 5, which is characterized in that the backup file in the standby pool is in collapse directories
Under.
9. a kind of document creation device characterized by comprising
Memory, for storing computer program;
Processor, realizing the file creating method as described in any one of Claims 1-4 when for executing the computer program
Step.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program is realized as described in 1 to 4 any one of right when the computer program is executed by processor the step of file creating method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910290922.3A CN110008176A (en) | 2019-04-11 | 2019-04-11 | A kind of file creating method and relevant apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910290922.3A CN110008176A (en) | 2019-04-11 | 2019-04-11 | A kind of file creating method and relevant apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110008176A true CN110008176A (en) | 2019-07-12 |
Family
ID=67171229
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910290922.3A Pending CN110008176A (en) | 2019-04-11 | 2019-04-11 | A kind of file creating method and relevant apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110008176A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111400101A (en) * | 2020-03-18 | 2020-07-10 | 北京北亚宸星科技有限公司 | Data recovery method and system for deleting JFS2 file system data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106202492A (en) * | 2016-07-19 | 2016-12-07 | 浪潮(北京)电子信息产业有限公司 | The Metadata Service optimization method of a kind of NFS and system |
CN107391669A (en) * | 2017-07-20 | 2017-11-24 | 郑州云海信息技术有限公司 | A kind of multi version file management method and device based on file system |
CN108932236A (en) * | 2017-05-22 | 2018-12-04 | 北京金山云网络技术有限公司 | A kind of file management method, scratch file delet method and device |
CN109325000A (en) * | 2018-07-24 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of method and apparatus of document creation |
CN109491980A (en) * | 2018-11-02 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of remote replication method of file system, device, equipment and storage medium |
-
2019
- 2019-04-11 CN CN201910290922.3A patent/CN110008176A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106202492A (en) * | 2016-07-19 | 2016-12-07 | 浪潮(北京)电子信息产业有限公司 | The Metadata Service optimization method of a kind of NFS and system |
CN108932236A (en) * | 2017-05-22 | 2018-12-04 | 北京金山云网络技术有限公司 | A kind of file management method, scratch file delet method and device |
CN107391669A (en) * | 2017-07-20 | 2017-11-24 | 郑州云海信息技术有限公司 | A kind of multi version file management method and device based on file system |
CN109325000A (en) * | 2018-07-24 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of method and apparatus of document creation |
CN109491980A (en) * | 2018-11-02 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of remote replication method of file system, device, equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111400101A (en) * | 2020-03-18 | 2020-07-10 | 北京北亚宸星科技有限公司 | Data recovery method and system for deleting JFS2 file system data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2557494B1 (en) | Storage apparatus and data copy method between thin-provisioning virtual volumes | |
CN103095686B (en) | Focus metadata access control method and service device | |
US20140095767A1 (en) | Storage device trimming | |
TWI571749B (en) | Backup system and backup method thereof | |
CN103544153A (en) | Data updating method and system based on database | |
CN103412822A (en) | Operation method of non-volatile RAM, data operation method and relevant device | |
CN103677674A (en) | Data processing method and device | |
CN109271110A (en) | The wiring method of storing data, writing system and relevant apparatus in storage system | |
CN109902034A (en) | Snapshot creation method, device, electronic equipment and machine readable storage medium | |
CN109992566A (en) | A kind of file access method, device, equipment and readable storage medium storing program for executing | |
CN107391050A (en) | A kind of data migration method, system, device and computer-readable recording medium | |
CN109491605A (en) | A kind of date storage method based on COW, device and medium | |
US20140129524A1 (en) | Restoring method and computer system | |
CN108897822A (en) | A kind of data-updating method, device, equipment and readable storage medium storing program for executing | |
CN111007985A (en) | Compatible processing method, system and equipment for space recovery of storage system | |
CN104272273A (en) | Dynamic memory allocation | |
CN102290033B (en) | Method and device for refreshing image | |
CN110008176A (en) | A kind of file creating method and relevant apparatus | |
US9645946B2 (en) | Encryption for solid state drives (SSDs) | |
US11176089B2 (en) | Systems and methods for implementing dynamic file systems | |
CN103823634A (en) | Data processing method and system supporting non-random write mode | |
CN108132759A (en) | A kind of method and apparatus that data are managed in file system | |
JP2014038551A (en) | Data storage device, method for controlling data storage device, and control program of data storage device | |
CN110032340A (en) | A kind of data in magnetic disk management method and relevant apparatus | |
CN109324929A (en) | A kind of snapshot creation method, device, equipment and readable storage medium storing program for executing |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |