Movatterモバイル変換


[0]ホーム

URL:


CN110008176A - A kind of file creating method and relevant apparatus - Google Patents

A kind of file creating method and relevant apparatus
Download PDF

Info

Publication number
CN110008176A
CN110008176ACN201910290922.3ACN201910290922ACN110008176ACN 110008176 ACN110008176 ACN 110008176ACN 201910290922 ACN201910290922 ACN 201910290922ACN 110008176 ACN110008176 ACN 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
Application number
CN201910290922.3A
Other languages
Chinese (zh)
Inventor
刘成达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co LtdfiledCriticalSuzhou Wave Intelligent Technology Co Ltd
Priority to CN201910290922.3ApriorityCriticalpatent/CN110008176A/en
Publication of CN110008176ApublicationCriticalpatent/CN110008176A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

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

A kind of file creating method and relevant apparatus
Technical field
The present invention relates to file system, more specifically to a kind of file creating method, system, device and computerReadable 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;ExistThe 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 pipeReason system, abbreviation file system.Specifically, it, which is responsible for user, establishes file, deposit is read, modification, dump file, controlThe 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) responseThe iNode of one corresponding request, iNode include the metamessage of file, such as creation time, access time, file size, fileThe position etc. of data, these information are initial information after creating file, file size, number of files when file is written into dataAccording 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 moreWhen, 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, withINode 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 packetInclude 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 fileWhen, 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 targetWhen 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 iNodeThe 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;ItsIn, 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 originatorWhen with the read-write operation of file, the target iNode is renamed, so that the target iNode is corresponding to complete read-write behaviourCurrent 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 correspondingINode 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 mediumIt is stored with computer program in matter, the step such as the file creating method is realized when the computer program is executed by processorSuddenly.
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 advanceThe backup file built and corresponding iNode;When document creation request originator is completed using the target iNode to the targetWhen the read-write operation of backup file, the target iNode is renamed, so that the target iNode is corresponding to complete read-writeCurrent 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 correspondingINode, receive document creation request after, no longer need to re-create iNode, it is only necessary to by a file with it is correspondingINode returns to client, can save the time of iNode creation, can also be with even if having heap file request to createThe creation of file is rapidly completed, saves the plenty of time, improves the performance of file system.Present invention also provides a kind of filesAbove-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 belowThere 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 thisSome embodiments of invention for those of ordinary skill in the art without creative efforts, can be withIt 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, completeSite 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 onEmbodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment 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 solutionINode 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 systemRequest 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 standbyIt 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 filesIt is stored in standby pool with corresponding iNode.
After receiving document creation request, mds determined directly in standby pool file being pre-created andINode, 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 fileBefore, all rigid files for completing creation be it is identical, after the completion of file is created, then modify in the file information and iNodeMetadata information.
S103 completes the read-write to the backup file using the target iNode when document creation request originator and graspsWhen 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 intoRow renaming.It should be noted that renaming is that mds modifies iNode attribute, renaming operation here only carries out rename and refers toIt enables, in iNode, executes the attribute informations such as rename instruction and modification filename, file address, make current target iNodeFor the file after corresponding completion read-write operation.
In a specific embodiment, described when document creation request originator is completed using the target iNodeWhen 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 iNodeThe standby pool.
In order to avoid the iNode being pre-created has been assigned in this programme, after receiving new document creation requestThe creation for needing to wait iNode as the prior art, in the present solution, whenever there is backup file to be divided with corresponding iNodeAfter matching, new backup file and corresponding iNode are just re-created, is saved in standby pool.It should be noted that thinking standby poolThe operation of the new backup file and corresponding iNode of middle creation and from standby pool taking-up target backup file with it is correspondingINode, 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 iNodeIn 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, noRule operation is carried out, the speed for reading backup file and iNode in the buffer can faster, therefore be completion document creation requestTime 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 withFamily operating mistake, standby pool is stored under collapse directories, makes client i.e. requesting party that can not directly find the meshIt 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 rightThe 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 correspondingINode returns to client, can save the time of iNode creation, can also be with even if having heap file request to createThe 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 belowBuilding 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 originatorWhen the read-write operation of backup file, the target iNode is renamed, so that the target iNode is corresponding to complete read-writeCurrent 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 correspondingINode be added to the standby pool.
In a specific embodiment, the backup file in the standby pool is stored in slow with corresponding iNodeIn 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 systemThe embodiment part of the visible file creating method hereinbefore of specific embodiment, for example, receiving module 201, distribution module202, renamer module 203 is respectively used to realize step S101, S102, S103 in above-mentioned file creating method, so, toolBody 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 inventionThe 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 storageThere are operating system and computer-readable instruction, which is that the operating system and computer in non-volatile memory medium canThe operation of reading instruction provides environment.Processor 200 provides calculating and control ability for document creation device, may be implemented above-mentionedStep 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 importingInto memory.The input interface 300 can be connected with input unit, receive parameter or instruction that user is manually entered.This is defeatedEntering 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 machineScreen, 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 connectionArt 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 computerStep provided by above-described embodiment may be implemented when program is executed by processor.The storage medium may include: USB flash disk, movementHard 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 otherThe 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 hereinGeneral Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the inventionIt 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 oneThe widest scope of cause.

Claims (10)

CN201910290922.3A2019-04-112019-04-11A kind of file creating method and relevant apparatusPendingCN110008176A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910290922.3ACN110008176A (en)2019-04-112019-04-11A kind of file creating method and relevant apparatus

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910290922.3ACN110008176A (en)2019-04-112019-04-11A kind of file creating method and relevant apparatus

Publications (1)

Publication NumberPublication Date
CN110008176Atrue CN110008176A (en)2019-07-12

Family

ID=67171229

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910290922.3APendingCN110008176A (en)2019-04-112019-04-11A kind of file creating method and relevant apparatus

Country Status (1)

CountryLink
CN (1)CN110008176A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111400101A (en)*2020-03-182020-07-10北京北亚宸星科技有限公司Data recovery method and system for deleting JFS2 file system data
CN119759858A (en)*2025-03-052025-04-04京东科技信息技术有限公司 Cache file management method and device, storage medium and computer program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106202492A (en)*2016-07-192016-12-07浪潮(北京)电子信息产业有限公司The Metadata Service optimization method of a kind of NFS and system
CN107391669A (en)*2017-07-202017-11-24郑州云海信息技术有限公司A kind of multi version file management method and device based on file system
CN108932236A (en)*2017-05-222018-12-04北京金山云网络技术有限公司A kind of file management method, scratch file delet method and device
CN109325000A (en)*2018-07-242019-02-12郑州云海信息技术有限公司 A method and apparatus for creating a file
CN109491980A (en)*2018-11-022019-03-19郑州云海信息技术有限公司A kind of remote replication method of file system, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106202492A (en)*2016-07-192016-12-07浪潮(北京)电子信息产业有限公司The Metadata Service optimization method of a kind of NFS and system
CN108932236A (en)*2017-05-222018-12-04北京金山云网络技术有限公司A kind of file management method, scratch file delet method and device
CN107391669A (en)*2017-07-202017-11-24郑州云海信息技术有限公司A kind of multi version file management method and device based on file system
CN109325000A (en)*2018-07-242019-02-12郑州云海信息技术有限公司 A method and apparatus for creating a file
CN109491980A (en)*2018-11-022019-03-19郑州云海信息技术有限公司A kind of remote replication method of file system, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111400101A (en)*2020-03-182020-07-10北京北亚宸星科技有限公司Data recovery method and system for deleting JFS2 file system data
CN119759858A (en)*2025-03-052025-04-04京东科技信息技术有限公司 Cache file management method and device, storage medium and computer program product

Similar Documents

PublicationPublication DateTitle
CN102929748B (en)Data back up method and device
EP2557494B1 (en)Storage apparatus and data copy method between thin-provisioning virtual volumes
JP4464378B2 (en) Computer system, storage system and control method for saving storage area by collecting the same data
CN103412822B (en)Operation Nonvolatile memory and the method and relevant apparatus of data manipulation
CN103544153A (en)Data updating method and system based on database
TWI571749B (en)Backup system and backup method thereof
CN102831069A (en)Memory processing method and memory management equipment
CN107589916A (en)A kind of entangling based on correcting and eleting codes deletes the creation method and relevant apparatus in pond
CN112784188B (en)Page rendering method and device
CN101968755A (en)Application load change adaptive snapshot generating method
CN109271110A (en)The wiring method of storing data, writing system and relevant apparatus in storage system
CN109992566A (en)A kind of file access 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
CN109902034A (en)Snapshot creation method, device, electronic equipment and machine readable storage medium
CN107391050A (en)A kind of data migration method, system, device and computer-readable recording medium
US20140129524A1 (en)Restoring method and computer system
CN110008176A (en)A kind of file creating method and relevant apparatus
US9645946B2 (en)Encryption for solid state drives (SSDs)
CN102290033B (en)Method and device for refreshing image
CN107391312B (en)Data cloud backup method and system
US11176089B2 (en)Systems and methods for implementing dynamic file systems
CN108984124A (en)Reduce the method, apparatus, computer equipment and storage medium for writing amplification
JP2014038551A (en)Data storage device, method for controlling data storage device, and control program of data storage device
CN106202262A (en)A kind of information processing method and electronic equipment
CN112685438B (en)Data processing system, method, device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20190712


[8]ページ先頭

©2009-2025 Movatter.jp