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, those skilled in the art's every other implementation obtained without creative effortsExample, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of method file system metadata isolation and repaired, to realize in file systemThe isolation and reparation of the metadata of mistake occurs, reduce metadata error influences caused by business, improves the industry of file systemBusiness continuity, and reduce the time of metadata reparation.
The present invention also provides corresponding file system metadata isolating devices, are described in detail separately below.
To facilitate understanding of the present embodiment of the invention, the concept that can be introduced in description of the embodiment of the present invention is introduced herein first.
Isolable metadata: as described in background technique, in some scenes, the metadata of file system can be damagedAnd lead to mistake.Classification analysis discovery is carried out to file system metadata, the damage of most metadata can not influenceThe whole business of file system, the i.e. corresponding data of other normal metadata can all continue to provide normal service.CauseThis, metadata can be classified, and will will not be impacted to the whole business of file system after above-mentioned appearance mistake, i.e., literaryThe meta data category that part system can continue to provide service is isolable metadata.Correspondingly, there is mistake in a part of metadataAfter accidentally, will lead to file system integrally cannot normally provide service, these metadata errors are generally mistake of overall importance, such as spaceAssignment bit map etc..For this kind of metadata, not isolable metadata can be classified as.It lists in table 1 in linux systemIn, classification that the metadata of some types is carried out according to the classification method.It should be understood that in different operating system,And under different types of file system, metadata has different type classification.Therefore, the type of metadata with whether can be everyIt will be different under specific operating system and file system from the corresponding relationship of reparation.
| Metadata type | Whether reparation can isolate |
| SuperBlock | Reparation can be isolated |
| GlobalBitmap | Reparation can not be isolated |
| Extent Block | Reparation can be isolated |
| Extent | Reparation can be isolated |
| Chain List | Reparation can not be isolated |
| Chain Group | Reparation can not be isolated |
| Inode Alloc | Reparation can be isolated |
| Local Alloc | Reparation can be isolated |
| Truncate Log | Reparation can be isolated |
| Journal | Reparation can be isolated |
| Inline Data | Reparation can be isolated |
| Inode | Reparation can be isolated |
Table 1
It is a kind of system architecture diagram of file system maintenance device in the embodiment of the present application in conjunction with Fig. 1.This system framework withFor Linux system, it is to be understood that, the thought according to provided by the present embodiment can the present invention is applied in othersIn operating system.Hardware layer contains system and runs relied on hardware device, including processor, memory, network interface etc..Client layer (also referred to as user's space or User space) and inner nuclear layer (also referred to as kernel sky are marked off on hardware layerBetween or kernel state).Application program in user's operation client layer, is called by system, and user asks the operation of file systemIt asks and (such as opens, reads and writes and close) and be transmitted to inner nuclear layer.Virtual File System is the abstract of file system, is responsible for passing requestGive specific file system.File system can there are many types, such as the third generation to extend file system (ThirdExtended filesystem, abbreviation Ext3), forth generation extension file system (Fourth extended filesystem,Abbreviation Ext4), second generation Oracle cluster file system (Oracle Cluster File System2, abbreviation OCFS2) etc.,The operation requests of User space application program are actually completed by these specific file system.File system and file system pipeThe data of reason are stored in the memory of hardware layer.In embodiments of the present invention, it may include in file system as shown in the figureAll or part of module, these modules can be used as new module and are integrated in file system, be also possible to existing file systemHave in itself in the functional module of system or it is transformed it is made to have mould described in the embodiment of the present inventionThe function of block.Wherein, metadata detection module is used to detect the metadata that mistake occurs in operation for file system;MetadataIsolation module is used to for the metadata that mistake occurs being isolated;Metadata repair module passes through for responding user in client layerThe reparation order that metadata fix tool initiates metadata, and metadata is repaired according to order is repaired;File systemFreeze module for responding the file system freeze request of user and freezing to file system;Information reporting module is used for willThe metadata error information reporting detected is informed the user that client layer.In the embodiment of the present application, it is also mentioned in client layerMetadata fix tool has been supplied, user can initiate to repair order by metadata fix tool to the metadata that mistake occurs,To call the repair module of the metadata in inner nuclear layer to repair the metadata that mistake occurs.
It should be noted that the embodiment of the present invention can be adapted for the computer equipment under general computer architecture, it can alsoTo be suitable for applying other processing equipments or smart machine that file system principle carries out data management, for example, embeddedEquipment, mobile device, private server, intelligent terminal, Intelligent Network Element, intelligent things equipment, intelligent storage equipment etc..
Referring to Fig.2, being the flow diagram of the method for the first file system maintenance provided in an embodiment of the present invention.This hairThe method of bright embodiment is applied to the computer equipment under a kind of general computer architecture, also can be applied to apply file systemPrinciple of uniting carries out other processing equipments or smart machine of data management.The equipment includes processor and storage equipment,The data in storage equipment are managed by file system.System architecture cited by the present embodiment combination Fig. 1, by first numberThe method in the present embodiment is executed according to wrong isolation module, the metadata that mistake occurs in file system is isolated.Certainly,It should be understood that the thought based on the present embodiment, the method in the present embodiment can also be used as the function being attached in file systemCan, it is executed by file system itself, to achieve the effect that identical or similar as the present embodiment.
The method of the embodiment of the present invention may include following steps:
S101, when detecting that mistake occurs for metadata in the file system, determine that the metadata of the mistake isNo to belong to isolable metadata, the isolable metadata is after mistake occurs, and file system still can continue to provideThe metadata of partial service.
After metadata detection module detects that mistake occurs for metadata, different from directly file system is set in the prior artTo be read-only or inaccessible, the type for the metadata that mistake occurs can be judged in embodiments of the present invention.According to precedingMetadata can be divided into isolable metadata and not isolable metadata, according to this classification, of the invention real in statingIt applies in example, judges whether the metadata that mistake occurs belongs to isolable metadata.
It detects that mistake occurs for metadata, can be believing to metadata error of receiving that file system other modules reportBreath, i.e. file system are in the process of running, it was found that the metadata error information reported after metadata error, for example, file systemWhen specific a certain metadata is accessed in system, the failure of metadata access is caused since mistake occurs for metadata, thus onThe error message is reported.It may include the metadata mark, metadata type or metadata mistake that mistake occurs in error messageType of error accidentally.
In another case, file system can dispatch metadata detection module or other have the mould of corresponding functionBlock carries out active detecting to metadata.For example, be scanned to metadata, thus find the metadata of generation mistake, and onIt is reporting the wrong metadata with aforementioned similar error message.
Optionally, in one implementation, whether the metadata for judging the generation mistake belongs to isolableMetadata includes: according to the data type that wrong metadata and metadata occurs and whether isolable correspondence is closedSystem, determines whether the metadata that mistake occurs belongs to isolable metadata.
Specifically, the data type that the metadata of mistake occurs is obtained, according to the data of the metadata that mistake occursType and the preset meta data category table determine whether the metadata that mistake occurs can be isolated, the meta data categoryTable include metadata data type and whether isolable corresponding relationship.
In another concrete implementation mode, the data type of the available metadata that mistake occurs;According toThe data type of the metadata that mistake occurs and preset meta data category table determine that the metadata that mistake occurs isIt is no to be isolated, the meta data category table include metadata data type and whether isolable corresponding relationship.
Preset meta data category table can be comprising different types of metadata respectively whether can occur mistake after canWith the classification information of isolation, i.e., after determining the data type of a metadata, which can be obtained according to the classification chartWhether the metadata of type belongs to isolable metadata;Alternatively, preset meta data category table can be and contain different mistakesThe accidentally classification information that can type be isolated, that is, after determining the wrong type of error that a metadata is occurred, according to thisWhether the metadata that classification chart can obtain the generation type of error belongs to isolable metadata.
S102, when determine it is described occur mistake metadata belong to isolable metadata when, by it is described occur mistakeMetadata is set as read-only or inaccessible.
When metadata is isolable metadata, i.e., when mistake occurs for the metadata, file system still canOffer service is enough provided.Therefore, and in the prior art, read-only mode difference is set by entire file system, the present invention is realIt applies in example and only to set read-only or inaccessible for isolable metadata, i.e., for other metadata in file system,Service is still normally provided, and for isolable metadata, then it is set to read-only or inaccessible.When can be isolatedMetadata when being set as read-only, user can access to the metadata, but can only carry out reading behaviour to the metadataMake, and write operation cannot be carried out to the metadata;When setting inaccessible for isolable metadata, user cannotIt accesses to the metadata, i.e., the user's operation including read operation and write operation is not allowed to.
Specifically, when setting read-only for metadata, can be asked if it is reading by the way that isolated marks are arranged to metadataIt asks, i.e. the operation will not bring any update, then be allowed to;Otherwise, error message is directly returned to, i.e. User space application program existsIsolation metadata can not be updated operation before being repaired.When setting inaccessible for metadata, User space application journeySequence accesses segregate metadata, can return to error message, i.e., User space application program is before isolation metadata is repairedIt can not access to the metadata.
As it can be seen that can make to occur in file system by setting read-only or inaccessible for isolable metadataWhen the metadata of mistake is isolable metadata, file system will not be integrally set as read-only, the file system work of guaranteeContinuity, improve the fault tolerant ability of system, improve the continuity of whole business.
It is the flow diagram of the method for second of metadata isolation provided in an embodiment of the present invention refering to Fig. 3.The present inventionEmbodiment is illustrated in the first aforementioned embodiment, the method for the present embodiment contain S101 in the first embodiment,S102 step, thus with the same or similar description of the step, repeat no more in the present embodiment.
In embodiments of the present invention, further include step S103:
The error message of the mistake is added in error message list, the error message list will be for that will occur mistakeMetadata accidentally is reported to user.
After mistake occurs for metadata, the error message of metadata can be added in error message list.Error messageIt can include but is not limited to the position of the relevant information such as metadata of metadata itself, data type of metadata etc. and first numberAccording to such as wrong type of the relevant information of mistake.Error message notifies user to carry out mistake and repair after can be used for report of user stateMultiple, user can repair one by one the metadata that mistake occurs according to error message list.
As it can be seen that since error message to be added in error message list, the related letter of the metadata since mistake occursThe relevant information of breath and mistake passes through error message list and returns to User space, and User space is when carrying out errors repair, nothingNeed to again to file system carry out error scanning, and can directly according to error listing in list generation mistake metadata intoRow is repaired.Meanwhile before the metadata of the generation mistake in file system is not isolable metadata, in file systemThe isolable metadata that mistake occurs can be added in error listing, therefore user can be disposably to multiple metadataIt is repaired, improves remediation efficiency.
It is the flow diagram of the method for the third metadata isolation provided in an embodiment of the present invention refering to Fig. 4.The present inventionEmbodiment is illustrated in the first aforementioned embodiment, the method for the present embodiment contain S101 in the first embodiment,S102 step, and may include the S103 step in second of embodiment, thus with the same or similar description of the step,It is repeated no more in the present embodiment.
In embodiments of the present invention further include: S104, determine it is described occur mistake metadata type of error whether beRelevance mistake, after the relevance misrepresentation mistake occurs, metadata relevant to the metadata of the mistake also occursMistake;When determining that the type of error is relevance mistake, then by the metadata relevant to the metadata of the mistakeAlso it is set as read-only or inaccessible.
Relevance mistake, refer to generation mistake often as caused by multiple metadata, or when mistake generation after,It will lead to multiple metadata and mistake occur.That is, when there is relevance mistake, generation mistake relevant to the mistakeMetadata is greater than one.Therefore, when the type of error of metadata is relevance mistake, the generation for not only needing will test is wrongMetadata accidentally is isolated, and should will be also isolated in the relevant metadata of relevance mistake.
Specifically, can will be set as read-only or inaccessible in metadata relevant to the relevance mistake, specificallyImplementation is similar with method described in previous embodiment, and details are not described herein.
In one implementation, according to type of error and type of error with whether be that the corresponding relationship of relevance mistake obtainsIt whether is relevance mistake to the type of error.Specifically, according to type of error and type of error and whether being relevance mistakeCorresponding relationship accidentally determines whether the type of error is relevance mistake.It is similar with preceding method in one in implementation, the corresponding relationship can be realized by meta data category table.Whether meta data category table can belong to query metadataThe meta data category table used in isolable metadata is same table, available according to the meta data category tableThe data type of the metadata of mistake occurs, or obtains occurring the dislocation type of mistake, so that it is determined that the mistake that metadata occursAccidentally whether type is relevance mistake.Also it can be used alone the classification chart different from meta data category table above-mentioned, judgeMethod with it is aforementioned similar.
In one implementation, the metadata relevant to the metadata of the mistake is also set as read-only or can notWhen access, the metadata relevant to the metadata of the mistake includes the metadata of the metadata dependent on the mistake.For example, in linux system, the metadata error of Extent block or Extent type, the metadata and phase of the typeThere are dependences between the metadata of pass, therefore when mistake occurs for the metadata for finding this type, associated therewithMistake can equally occur for metadata.Therefore, it is necessary to the associated metadata dependent on wrong metadata is isolated.
As it can be seen that in the present embodiment, since the relevant metadata of relevance mistake is set as read-only or inaccessible,It can guarantee that the associated metadata of relevance mistake is isolated, and then file system can be allow to continue offer service, togetherWhen increase the comprehensive of reparation.
It is a kind of flow diagram of the restorative procedure of file system metadata provided in an embodiment of the present invention refering to Fig. 5.The method of this method combination aforementioned metadata isolation is described, and on the basis of preceding method, increases response User space pairThe reparation of metadata operates.Therefore, there is same or similar step in the aforementioned embodiment, in the present embodiment no longer into oneStep is described.
The step of cut-off rule is executed the above are User space in figure, it can initiated by user, or by being in User spaceApplication program is initiated.Cut-off rule is once the step of kernel state executes, and is initiated by kernel and is executed.Specific step is as follows:
S501, after detecting that metadata is wrong, judge occur mistake metadata whether be isolable metadata,Preferably, can be judged by tabling look-up.It can be set as read-only with segregate metadata.It optionally, can be to this yuanIsolated marks are arranged in data, the chained list of an isolation metadata are added, and the metadata that mistake occurs is reported to client layer.
When accessing segregate metadata, if it is read request, i.e., the operation will not bring any update, then permittedPerhaps;Otherwise, direct return-EIO, i.e. User space application program can not be updated operation before isolation metadata is repaired.
File system instruction is freezed in the segregate list of meta data that S502, user report according to kernel, initiation, and one by oneSegregate metadata is initiated to repair instruction, is completed after all repairing, the instruction of defrosting operating system is initiated.Wherein, reparation refers toIt enables and calls the metadata repair module of inner nuclear layer to repair metadata by the metadata fix tool of client layer.For notSame metadata, the mode of reparation is not exactly the same, since the present invention is not related to the specific restorative procedure of metadata,Details are not described herein.
S503, the instruction for freezing file system that user sends after determining metadata generation mistake is received, and according to instituteIt states and freezes the instruction of file system and freeze file system, keep the coherency state of file system in repair process.
The freeze operation of file system is intended to write all dirty file system metadatas and data disk, generates oneWith the almost consistent disk image of file system.The operation of any modification file system must just can be carried out after defrosting.PhaseFor unloading operation, unloading of file system closes all openings firstly the need of the business for stopping all operations in file systemHandle, by dirty data brush return disk.And freeze be a kind of temporary suspension operation, therefore the duration freezed is shorter, butBe restore file system time it is also shorter.In the case where having obtained the list that the metadata of mistake occurs, according to listTime used in progress metadata reparation greatly shortens compared with the existing technology, so being more conducive to by the way of freezingQuick reparation to file system.
The metadata that mistake occurs is repaired in S504, the metadata reparation instruction sent according to user, if can be withIt is single to repair, directly repair;If being related to the metadata of relevance mistake, need to repair simultaneously and relevance mistakeRelevant metadata.
S505, the instruction for receiving the defrosting file system that user sends, and according to the instruction solution of the defrosting file systemFreeze the file system.
As it can be seen that in the present embodiment, the metadata for the generation mistake that user can be reported according to kernel be isolatedList, state by freezing file system, to occur mistake metadata repair.Due to having been obtained for that mistake occursThe list of metadata carries out error scanning to file system in the prior art without picture, therefore can shorten repair time, reducesThe time that file system is hung up, improve the efficiency of system.
It is a kind of structural schematic diagram of file system maintenance device provided in an embodiment of the present invention refering to Fig. 6.Described deviceIt can be performed or for executing the method provided in preceding method embodiment.Therefore it combines same or similar in previous embodimentDescription, repeat no more in the present embodiment.Described device can be the computer under general computer architecture or be integrated inModule or equipment in computer, other processing for being readily applicable to apply the progress data management of file system principle are setStandby or smart machine or integrated module or equipment in the apparatus.It is a kind of file in the present embodiment in conjunction with Fig. 2The possible system architecture diagram of system metadata isolating device, it is aforementioned in the system architecture of the computer equipment is carried outIllustrate, repeats no more here.
The 603 file system maintenance device includes:
601 metadata detection modules, for judging institute when detecting that mistake occurs for the metadata in the file systemState occur mistake metadata whether belong to can segregate metadata, the isolable metadata be occur mistake after, textPart system still can continue to provide the metadata of partial service;
602 metadata isolation modules will if belonging to isolable metadata for the metadata that mistake occursThe metadata that mistake occurs is set as read-only or inaccessible.
Optionally, the metadata detection module is also used to: judging the type of error of the metadata that mistake occurs isNo is relevance mistake, after the relevance misrepresentation mistake occurs, metadata relevant to the metadata of the mistakeMistake has occurred;The metadata isolation module is also used to:, will described and institute if the type of error is relevance mistakeThe relevant metadata of metadata for stating mistake is also set as read-only or inaccessible.
Optionally, whether the metadata detection module can also judge the type of error that wrong metadata occursFor relevance mistake, specifically, for judging whether the type of error of the metadata that mistake occurs is relevance mistakeWhen, according to type of error and type of error with whether be that the corresponding relationship of relevance mistake determines whether the type of error is passConnection property mistake.
Optionally, the metadata isolation module is specifically used for, by first number relevant to the metadata of the mistakeWhen according to being also set as read-only or inaccessible, the metadata relevant to the metadata of the mistake includes depending on the mistakeThe metadata of metadata accidentally.
Optionally, it can also include that module is collected in error message according to device of calculating in the present embodiment, be used for the mistakeError message be added in error message list.
In the present embodiment, the device can be to execute the side in aforementioned S101, S102, S103 and S104Method and its corresponding specific or optional implementation.It therefore, can be in conjunction in previous embodiment for described deviceThe description of method is understood.
In one implementation, equipment is stored in computer be stored with the program generation that above-mentioned each functions of modules can be achievedCode, computer processor reads said program code, to realize the concrete function of above-mentioned each module.
As it can be seen that in the present embodiment file system metadata isolating device by by isolable metadata be set as it is read-only orPerson is inaccessible, and when can make to occur in file system the isolable metadata of metadata of mistake, file system will not be byEntirety is set as read-only, and the continuity of the file system work of guarantee improves the fault tolerant ability of system, improves whole businessContinuity.
Simultaneously as error message is added in error message list, the related letter of the metadata due to sending mistakeThe relevant information of breath and mistake passes through error message list and returns to User space, and User space is when carrying out errors repair, nothingNeed to again to file system carry out error scanning, and can directly according to error listing in list generation mistake metadata intoRow is repaired.Meanwhile before the metadata of the generation mistake in file system is not isolable metadata, in file systemThe isolable metadata that mistake occurs can be added in error listing, therefore user can be disposably to multiple metadataIt is repaired, improves remediation efficiency.
Simultaneously as the relevant metadata of relevance mistake is set as read-only or inaccessible, it is ensured that associationThe associated metadata of property mistake is isolated, and then file system can be allow to continue offer service, while increasing reparationIt is comprehensive.
It is a kind of structural schematic diagram of computer system 700 provided in an embodiment of the present invention with reference to Fig. 7.The computerSystem can execute the method in preceding method embodiment, specifically, the computer system includes:
Processor 701, and the memory 702 being connected with the processor;
Wherein, the processor calls the instruction stored in the memory to be used for:
When detecting that mistake occurs for the metadata in the file system, determine whether the metadata of the mistake belongs toIsolable metadata, the isolable metadata are that file system, which still can continue to provide, partially to be taken after mistake occursThe metadata of business;
If the metadata that mistake occurs belongs to isolable metadata, the metadata that mistake occurs is setIt is set to read-only or inaccessible.
It should be understood that memory 702 may include read-only memory and random access memory, and at sensorIt manages device 702 and instruction and data is provided.The a part of of memory 702 can also include nonvolatile RAM(NVRAM)。
A kind of system architecture in conjunction with provided in earlier figures 1, in a kind of implementation of the present embodiment, file system withAnd the data that file system is managed are stored in memory 702, it will of course be understood that, the file system and fileThe data that system is managed, which also can store, to be in other storage equipment that processor 701 is connected.
In some embodiments, memory 702 stores following element, executable modules or data structures, orTheir subset of person or their superset: operating system, include various system programs, such as communication layers, sensor tubeReason system, driving layer etc., for realizing various basic businesses and the hardware based task of processing;And types of applications program.
In an implementation mode, when determining whether the metadata that mistake occurs belongs to isolable metadata,Whether the processor is specifically used for according to the metadata that mistake occurs and the data type of metadata and isolableCorresponding relationship, determines whether the metadata that mistake occurs belongs to isolable metadata.Optionally, determine that the generation is wrongWhether metadata accidentally when belonging to isolable metadata, can be according to the data type of the metadata that mistake occurs and pre-If meta data category table determine it is described occur mistake metadata whether can be isolated, the meta data category table includes metadataData type and whether isolable corresponding relationship
In an implementation mode, it is described by it is described occur mistake metadata be set as it is read-only or it is inaccessible itAfterwards, the processor is also used to determine whether the type of error of the metadata that mistake occurs is relevance mistake, the passAfter connection property misrepresentation mistake occurs, mistake is also had occurred in metadata relevant to the metadata of the mistake;If the mistakeAccidentally type is relevance mistake, then the metadata relevant to the metadata of the mistake is also set as read-only or can not visitedIt asks.Optionally, when whether the type of error for judging the metadata that mistake occurs is relevance mistake, according to mistakeType and type of error with whether be that the corresponding relationship of relevance mistake determines whether the type of error is relevance mistake.It canChoosing, the metadata relevant to the metadata of the mistake includes the metadata of the metadata dependent on the mistake.
In one implementation, the processor is also used to for the error message of the mistake being added to error message columnIn table, the error message list is used to the metadata that mistake occurs being reported to user.
In the present embodiment, the computer system can be to execute aforementioned S101, S102, S103 and S104In method and its corresponding specific or optional implementation.Therefore, before being combined for the computer systemThe description for stating the method in embodiment is understood.
As it can be seen that in the present embodiment file system metadata isolating device by by isolable metadata be set as it is read-only orPerson is inaccessible, and when can make to occur in file system the isolable metadata of metadata of mistake, file system will not be byEntirety is set as read-only, and the continuity of the file system work of guarantee improves the fault tolerant ability of system, improves whole businessContinuity.
Simultaneously as error message is added in error message list, the related letter of the metadata due to sending mistakeThe relevant information of breath and mistake passes through error message list and returns to User space, and User space is when carrying out errors repair, nothingNeed to again to file system carry out error scanning, and can directly according to error listing in list generation mistake metadata intoRow is repaired.Meanwhile before the metadata of the generation mistake in file system is not isolable metadata, in file systemThe isolable metadata that mistake occurs can be added in error listing, therefore user can be disposably to multiple metadataIt is repaired, improves remediation efficiency.
Simultaneously as the relevant metadata of relevance mistake is set as read-only or inaccessible, it is ensured that associationThe associated metadata of property mistake is isolated, and then file system can be allow to continue offer service, while increasing reparationIt is comprehensive.
A kind of file system prosthetic device 800 provided in an embodiment of the present invention refering to Fig. 8, described device it is executable orPerson is for executing the method provided in preceding method embodiment.Therefore description same or similar in previous embodiment is combined,It repeats no more in the present embodiment.Described device can be the computer under general computer architecture or integrate in a computerModule perhaps equipment is readily applicable to apply other processing equipments or intelligence that file system principle carries out data managementIt can equipment or integrated module or equipment in the apparatus.It is a kind of file system member number in the present embodiment in conjunction with Fig. 2According to the possible system architecture diagram of isolating device, it is aforementioned in the system architecture of the computer equipment is illustrated,Details are not described herein again.
The file system maintenance device includes:
File system freezes module 801, for receive user determine metadata occur mistake after send freeze fileThe instruction of system, and file system is freezed according to the instruction for freezing file system, and receive the defrosting text that user sendsThe instruction of part system, and according to the instruction of the defrosting file system defrosting file system;
Metadata repair module 802, the metadata reparation instruction for being occurred according to user is to the metadata that mistake occursIt is repaired.
Optionally, described device can also include information reporting module, for reporting of user error message list so as toThe metadata that mistake occurs is determined in user, the error message list includes that the error message of the metadata of mistake occurs.
The file system, which freezes module, can be used for executing method described in aforementioned S503, S505;The metadata reparationModule can execute method described in aforementioned S502, S504.Therefore it can refer to the aforementioned description in embodiment of the method to this dressIt sets and is understood.
As it can be seen that in the present embodiment, the metadata for the generation mistake that user can be reported according to kernel be isolatedList, state by freezing file system, to occur mistake metadata repair.Due to having been obtained for that mistake occursThe list of metadata carries out error scanning to file system in the prior art without picture, therefore can shorten repair time, reducesThe time that file system is hung up, improve the efficiency of system
It is a kind of structural schematic diagram of computer system 900 provided in an embodiment of the present invention with reference to Fig. 9.The computerSystem can execute the method in preceding method embodiment, specifically, the computer system includes:
Processor, and the memory being connected with the processor;
Wherein, the processor calls the instruction stored in the memory to be used for:
The instruction for freezing file system that user sends after determining metadata generation mistake is received, and is freezed according to describedFile system is freezed in the instruction of file system;
The metadata that mistake occurs is repaired in the metadata reparation instruction sent according to user;
The instruction for the defrosting file system that user sends is received, and according to the instruction of defrosting file system defrostingFile system.
Optionally, the processor is also used to:
The metadata of mistake, the error message list occurs in order to which user determines to reporting of user error message listError message comprising the metadata of mistake occurs.
Computer system described in the present embodiment is same or similar with the structure of computer system described in Fig. 7, therefore, canTo understand the framework of the computer system in the present embodiment in reference Fig. 7 the associated description of the computer system.
The computer system can be used for executing method described in aforementioned S502, S503, S504, S505, therefore can refer toThe aforementioned description in embodiment of the method understands the present apparatus.
As it can be seen that in the present embodiment, the metadata for the generation mistake that user can be reported according to kernel be isolatedList, state by freezing file system, to occur mistake metadata repair.Due to having been obtained for that mistake occursThe list of metadata carries out error scanning to file system in the prior art without picture, therefore can shorten repair time, reducesThe time that file system is hung up, improve the efficiency of system
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation memberIt is physically separated with being or may not be, component shown as a unit may or may not be physics listMember, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needsIn some or all of the modules achieve the purpose of the solution of this embodiment.In addition, Installation practice attached drawing provided by the inventionIn, the connection relationship between module indicates there is communication connection between them, and it is total specifically to can be implemented as one or more communicationLine or signal wire.Those of ordinary skill in the art can understand and implement without creative efforts.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention is implementedPlotting unit described in example can add the mode of required common hardware to realize by software, naturally it is also possible to pass through specialized hardwareIt is realized including specific integrated circuit, dedicated cpu, private memory, special components and parts etc..Under normal circumstances, all by computerThe function that program is completed can be realized easily with corresponding hardware, moreover, being used to realize the specific hard of same functionPart structure is also possible to diversified, such as analog circuit, digital circuit or special circuit etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, anyThose familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all containLid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.