CN103631915A - Hybrid system file data processing method and system - Google Patents

Hybrid system file data processing method and system Download PDF

Info

Publication number
CN103631915A
CN103631915A CN201310628992.8A CN201310628992A CN103631915A CN 103631915 A CN103631915 A CN 103631915A CN 201310628992 A CN201310628992 A CN 201310628992A CN 103631915 A CN103631915 A CN 103631915A
Authority
CN
China
Prior art keywords
file
filename
directory
processing pattern
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310628992.8A
Other languages
Chinese (zh)
Other versions
CN103631915B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310628992.8A priority Critical patent/CN103631915B/en
Priority claimed from CN201310628992.8A external-priority patent/CN103631915B/en
Publication of CN103631915A publication Critical patent/CN103631915A/en
Application granted granted Critical
Publication of CN103631915B publication Critical patent/CN103631915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion

Abstract

The invention relates to the technical field of information, in particular to a hybrid system file data processing method and system. The method includes the steps that when a file adding request is received, file processing modes are determined, wherein the file processing modes at least include a first file processing mode and a second file processing mode which correspond to a first file protocol and a second file protocol respectively; when the first file processing mode is started, whether a file name conflicting with a first file name corresponding to a file needing adding exist in a first file directory or a second file directory or not is judged; when it is judged that the file conflicting with the first file name corresponding to the file needing adding does not exist in the first file directory but exists in the second file directory, the first file name is stored in the first file directory, a second file name obtained after the first file name is converted and processed is stored in the second file category, and the mapping relation between the first file name and the second file name is saved.

Description

A kind of commingled system file data processing method and system
Technical field
The present invention relates to areas of information technology, particularly relate to a kind of commingled system file data processing method and system.
Background technology
Existing file system, supports NFS(Network File System, network file system(NFS) mostly) therefore agreement, because NFS agreement is to filename case sensitive, is only that character boundary is write two different filenames and can in NFS agreement, be existed simultaneously.Some file system are also supported CIFS(Common Internet File System, universal network file system) agreement, CIFS agreement is insensitive to filename capital and small letter, is only that character boundary is write two different filenames and can be considered to identical filename.Because whether responsive NFS agreement is different to the processing of filename capital and small letter with CIFS agreement, if identical file storage directory is shared by NFS client and CIFS client simultaneously, the file of not bearing the same name in NFS client is in the next possibility that has duplication of name of CIFS client, and the file of bearing the same name can not correctly be accessed.For example, in NFS client identical file catalogue, may exist filename to be respectively two files of aa and Aa simultaneously, if this document catalogue by CIFS agreement carry in CIFS client, although aa and Aa all can correctly be shown, Aa file can not correctly be opened.The selection file of aa by name still select the to open file file of Aa by name that opens file no matter, the file that system is opened is always aa.Therefore, the filename of conflict can cause the inconsistent problem of CIFS client data, and the file data of CIFS client can not normally be accessed.
The file access collision problem different disposal of case sensitive being caused in order to solve NFS agreement and CIFS agreement, there is a kind of method in prior art, at NAS(Network Attached Storage, network attached storage) between file system and client, increased a storing virtual system, by storing virtual system, the file system of support multi-protocols is scanned, then to the scanning result processing that conflicts, it can solve the file access collision problem that NFS agreement and CIFS agreement cause the different disposal of case sensitive to a certain extent
Inventor finds in realizing process of the present invention, and the method that prior art exists need to increase a Virtual File System between client and file system, by it, carry out file scanning and conflict processing, increase system complexity, increased system overhead, and reduced operating efficiency.
Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present invention provides a kind of commingled system file data processing method and system, by increasing file directory corresponding to insensitive agreement, and to there being the file of conflict to carry out rename processing, with less system overhead, solve file access conflict, improved operating efficiency.
According to the first aspect of the embodiment of the present invention, a kind of commingled system file data processing method is disclosed, described commingled system is at least supported the first file protocol and the second file protocol, wherein, described the first file protocol is to filename case sensitive, described the second file protocol is insensitive to filename capital and small letter, and described method comprises:
When receiving file interpolation request, according to described file, add the protocol-identifier comprising in request and determine file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol;
When definite file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
When judgement needs first filename corresponding to file of interpolation not have the filename of conflict in described the first file directory and have the filename of conflict in described the second file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
In conjunction with a first aspect of the present invention, the present invention also has the first possibility, and wherein, the mapping relations of described the first filename of described preservation and described the second filename comprise:
In the first mapping table, create with the first file key by name, with the second file key-value pair being worth by name;
In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name;
Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
In conjunction with a first aspect of the present invention, the present invention also has the second possibility, and wherein, when definite file processing pattern is the first file processing pattern, described method also comprises:
When judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
In conjunction with a first aspect of the present invention, the present invention also has the third possibility, and wherein, when definite file processing pattern is the second file processing pattern, described method also comprises:
When judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
In conjunction with a first aspect of the present invention, the present invention also has the 4th kind of possibility, and wherein, when definite file processing pattern is the second file processing pattern, described method also comprises:
The first filename corresponding to the file that need to add when judgement when there is the filename of conflict or have the filename of conflict in described the second file directory in described the first file directory, backspace file name duplication of name error messages.
In conjunction with a first aspect of the present invention, the present invention also has the 5th kind of possibility, and wherein, described method also comprises:
When receiving file deletion requests, determine the file processing pattern corresponding with described file deletion requests;
According to definite file processing pattern, in the file directory corresponding with described file processing pattern, search the filename that whether exists file to be deleted corresponding;
When determining while there is filename corresponding to file to be deleted, in the first file directory and the second file directory, delete respectively described file to be deleted.
In conjunction with a first aspect of the present invention and the 5th kind of possibility of the present invention, the present invention also has the 6th kind may, wherein, after determining and having the filename that file to be deleted is corresponding, before deleting described file to be deleted respectively in the first file directory and the second file directory, described method also comprises:
Judge whether to exist the mapping relations corresponding with the filename of file to be deleted;
Describedly in the first file directory and the second file directory, delete described file respectively and comprise:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations;
When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
In conjunction with a first aspect of the present invention, the present invention also has the 7th kind of possibility, and wherein, described method also comprises:
When receiving ff request, determine the file processing pattern corresponding with described ff request;
When described file processing pattern is the first file processing pattern, in the first file directory, search the file corresponding with described ff request;
When described file processing pattern is the second file processing pattern, in the second file directory, search the file corresponding with described ff request.
According to the second aspect of the embodiment of the present invention, a kind of commingled system is disclosed, described commingled system is at least supported the first file protocol and the second file protocol, wherein, described the first file protocol is to filename case sensitive, described the second file protocol is insensitive to filename capital and small letter, and described system comprises:
The first determining unit, for when receiving file interpolation request, adds according to described file the protocol-identifier comprising in request and determines file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol;
The first judging unit, be used for when the result of the described determining unit receiving shows that described file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory, obtains the first judged result; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
The first adding device, for receiving the judged result of described the first judging unit, when described judged result shows that first filename corresponding to file of needs interpolation do not exist the filename of conflict and have the filename of conflict in described the second file directory in described the first file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
According to the second aspect of the embodiment of the present invention, the present invention also has the 8th kind may, wherein, described the first adding device comprises the first storage unit, the second storage unit and the 3rd storage unit, wherein, described the 3rd storage unit specifically for: in the first mapping table, create with the first file key by name, with the key-value pair of the second file value by name; In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name; Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
In conjunction with a second aspect of the present invention, the present invention also has the 9th kind of possibility, and wherein, described system also comprises:
The second adding device, for when determining that file processing pattern is that the first file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
In conjunction with a second aspect of the present invention, the present invention also has the tenth kind of possibility, and wherein, described system also comprises:
The 3rd adding device, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
In conjunction with a second aspect of the present invention, the present invention also has the 11 kind of possibility, and wherein, described system also comprises:
Unit reports an error, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file that adds is corresponding to have the filename of conflict or when described the second file directory exists the filename conflicting in described the first file directory, backspace file name duplication of name error messages.
In conjunction with a second aspect of the present invention, the present invention also has the 12 kind of possibility, and wherein, described system also comprises:
The second determining unit, for when receiving file deletion requests, determines the file processing pattern corresponding with described file deletion requests;
First searches unit, for according to definite file processing pattern, in the file directory corresponding with described file processing pattern, searches the filename that whether exists file to be deleted corresponding;
The first delete cells for when determining while there is filename corresponding to file to be deleted, is deleted respectively described file to be deleted in the first file directory and the second file directory.
In conjunction with a second aspect of the present invention and the 12 kind of possibility of the present invention, the present invention also has the 13 kind of possibility, and wherein, described system also comprises:
The second judging unit, for judging whether to exist the mapping relations corresponding with the filename of file to be deleted;
Described the first delete cells specifically for:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations; When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
In conjunction with a second aspect of the present invention, the present invention also has the 14 kind of possibility, and wherein, described system also comprises:
The 3rd determining unit, for when receiving ff request, determines the file processing pattern corresponding with described ff request;
Second searches unit, for when described file processing pattern is the first file processing pattern, searches the file corresponding with described ff request in the first file directory;
The 3rd searches unit, for when described file processing pattern is the second file processing pattern, searches the file corresponding with described ff request in the second file directory.
The beneficial effect that an aspect of the embodiment of the present invention can reach is: in embodiments of the present invention, support at the same time to the first file protocol of case sensitive and in the commingled system of insensitive the second file protocol of capital and small letter, first file directory corresponding with the first file protocol and second file directory corresponding with the second file protocol have been created, when needs add file, in the first file directory and the second file directory, search the filename that whether has conflict respectively, while there is the filename of conflict if there is not the filename of conflict in to the first file directory of case sensitive in insensitive the second file directory to capital and small letter, by filename is carried out to conversion process, and the corresponding relation of the filename before preservation conversion and the filename after conversion, thereby solved the problem that file data that the filename conflict that exists in multi-protocols file system causes can not normally be accessed, and to filename, conflict is processed in file system inside, complexity and the expense of system have been reduced, and effectively promoted operating efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, the accompanying drawing the following describes is only some embodiment that record in the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Commingled system file data processing method the first embodiment schematic diagram that Fig. 1 provides for the embodiment of the present invention;
The application scenarios schematic diagram that Fig. 2 provides for the embodiment of the present invention;
Commingled system file data processing method the second embodiment schematic diagram that Fig. 3 provides for the embodiment of the present invention;
Commingled system file data processing method the 3rd embodiment schematic diagram that Fig. 4 provides for the embodiment of the present invention;
Commingled system file data processing method the 4th embodiment schematic diagram that Fig. 5 provides for the embodiment of the present invention;
Commingled system file data processing method the 5th embodiment schematic diagram that Fig. 6 provides for the embodiment of the present invention;
Commingled system file data processing method the 6th embodiment schematic diagram that Fig. 7 provides for the embodiment of the present invention;
Commingled system the first embodiment schematic diagram that Fig. 8 provides for the embodiment of the present invention;
Commingled system the second embodiment schematic diagram that Fig. 9 provides for the embodiment of the present invention;
Embodiment
First thought of the present invention is set forth.Inventor finds in realizing process of the present invention, because NFS agreement is different to the processing of filename case sensitive with CIFS agreement, cause the file of not bearing the same name under NFS client likely to be born the same name under CIFS client, and duplication of name file can not correctly be accessed.For instance, under NFS client, in same catalogue, can there is aa and Aa file simultaneously, if this catalogue is passed through CIFS agreement carry in windows client, although aa and Aa can correctly show, but Aa can not correctly be opened, no matter which file selection opens, and the file that system is opened is always aa.So easy initiation ambiguity also causes maloperation, has a strong impact on user and experiences.Inventor finds through research, the main cause that this problem produces is in general file system, as shown in table 1, file directory only has an entry table to preserve son file name wherein, which kind of no matter by agreement end, accessed, the object of operation is always this entry table, if NFS and CIFS agreement are accessed this entry table simultaneously, is easy to cause above-mentioned duplication of name collision problem.And the method that prior art provides need to increase a Virtual File System between client and file system, by it, carry out file scanning and conflict processing, increased system complexity, increase system overhead, and reduced operating efficiency.
Table 1 parent directory
Key (filename) Value (document number)
aa 4
Aa 6
For solving the problems of the technologies described above, the embodiment of the present invention provides a kind of commingled system file data processing method and system, by increasing file directory corresponding to insensitive agreement, and to there being the file of conflict to carry out rename processing, and preserved the corresponding relation of conflict filename, with less system overhead, solve file access conflict, improved operating efficiency.
In order to make those skilled in the art person understand better the technical scheme in the present invention, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
Embodiment mono-
Referring to Fig. 1, commingled system file data processing method the first embodiment schematic diagram providing for the embodiment of the present invention.Embodiment shown in Fig. 1 is applied in commingled system, and described commingled system is at least supported the first file protocol and the second file protocol, and wherein, described the first file protocol is to filename case sensitive, and described the second file protocol is insensitive to filename capital and small letter.Wherein, the first file protocol includes but not limited to the agreement to filename case sensitive such as NFS, and the second file protocol includes but not limited to that CIFS etc. is to the insensitive agreement of filename capital and small letter.Described commingled system can also be supported various protocols, for example, support three kinds or three kinds of above different agreements.Described commingled system can be mixed file system, can be also the system of other types, for example, can comprise that needs externally provide the network system of case sensitive and the insensitive operation of capital and small letter simultaneously, and the present invention does not limit this.Commingled system take below as mixed file system, support the agreement of case sensitive simultaneously and be that example describes to the insensitive agreement of capital and small letter.As shown in Figure 2, be embodiment of the present invention application scenarios schematic diagram, NFS client and CIFS client can be accessed commingled system simultaneously, and commingled system is supported two kinds of different file protocols simultaneously.
S101, when receiving file interpolation request, adds according to described file the protocol-identifier comprising in request and determines file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol.
S102, when definite file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol.
S103, when judgement needs first filename corresponding to file of interpolation not have the filename of conflict in described the first file directory and have the filename of conflict in described the second file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
It should be noted that, commingled system can receive file and add request, and described file adds request can, from data access end, include but not limited to NFS client, CIFS client etc.At file, add in request, carry protocol-identifier, for showing supported different agreement.For example, at file, add in request and carry the first protocol-identifier, for showing to support the first file protocol, the first file protocol is to filename case sensitive.And for example, at file, add in request and carry second protocol sign, for showing to support the second file protocol, second agreement is insensitive to filename capital and small letter.Correspondingly, commingled system can comprise multiple file processing pattern, and described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol.Wherein, the first file processing pattern is the tupe to filename case sensitive, and the second file processing pattern is to the insensitive tupe of filename capital and small letter.When commingled system is supported various protocols, it can also comprise the alternative document tupe corresponding with each agreement.
It should be noted that, in a kind of implementation of the present invention, in creating file process, according to definite file processing pattern, preserve the corresponding relation of file and file processing pattern, when needs, file is carried out search, deletion etc. is when operate, can in file operation requests, not carry protocol-identifier, but according to the file of preserving and the corresponding relation of file processing pattern, determine the file processing pattern corresponding with described file, to carry out corresponding operation.
It should be noted that, when specific implementation of the present invention, created the first file directory and the second file directory, wherein, corresponding the first file protocol of the first file directory, for the first file protocol provides directory index; Corresponding the second file protocol of the second file directory, for the second file protocol provides directory index.Particularly, the first file directory can be referred to as again CSDIR(case sensitive directory, responsive catalogue).Meanwhile, another file directory of introducing in the attribute of parent directory (the second file directory) can be referred to as again CIDIR(case insensitive directory, insensitive catalogue), both provide different directory index for different agreements.For duplication of name file, after filename is revised, (as: AA~1) is stored in CIDIR.As shown in table 2 and table 3, it is the example of responsive catalogue and insensitive catalogue.
The responsive catalogue CSDIR of table 2
Key (filename) Value (object number)
aa 4
Aa 6
The insensitive catalogue CIDIR of table 3
Key (filename) Value (object number)
aa 4
AA-1 6
When determining that file processing pattern be the first file processing pattern to filename case sensitive, judgement needs first filename corresponding to file of interpolation whether to have conflict filename in the first file directory and the second file directory.When judgement needs first filename corresponding to file of interpolation not have the filename of conflict in described the first file directory and have the filename of conflict in described the second file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename.The filename of conflict generally refers to the filename that occurs duplication of name.
Further, described method also comprises: when definite file processing pattern is the first file processing pattern, and when judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
During specific implementation, when determining that file processing pattern is the first file processing pattern to filename case sensitive, first will be in the first file directory locating file whether there is the filename of conflict, if there is no, create file, and add file in the first file directory.Particularly, during file first filename by name of the file adding when needs, when judgement does not exist the filename of conflict in the first file directory, in the first file directory, preserve described the first filename.Then, in the second file directory, search the filename that whether has conflict, if there is no, directly in the second file directory, add described the first filename; If there is the filename of conflict, need that the first filename is carried out to conversion process and obtain the second filename.The mode of conversion process can be very flexibly, includes but not limited to unified be converted to capitalization and add suffix, be unifiedly converted to small letter and add suffix, or the unified feature title that is revised as agreement etc., at this, do not limit.For example, suppose in the first file directory and the second file directory, only to preserve aa file in commingled system, when need to add the file of file Aa by name under the first tupe, in first file directory corresponding with the first file processing pattern, search and do not have Aa file, directly in the first file directory, preserving Aa file.Then, in the second file directory, search the filename that judgement has conflict, Aa file is carried out to rename conversion process, be converted into AA-1, and preserve filename and relevant information after conversion in the second file directory.
Meanwhile, need to preserve raw filename is the mapping relations between the second filename after the first filename and conversion.The mapping relations of preserving can have multiple implementation.In a kind of possible implementation, the mapping relations of described the first filename of described preservation and described the second filename comprise: in the first mapping table, create with the first file key by name, with the key-value pair of the second file value by name; In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name; Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.Describe for example corresponding the first file protocol of the first mapping table (CSTable, case sensitive table), the first file directory and the first tupe below; Corresponding the second file protocol of the second mapping table (CITable, case insensitive table), the second file directory and the second tupe.As table 4 and table 5 are depicted as the example of the first mapping table and the second mapping table.
Table 4CSTable
Key (sensitive document name) Value (insensitive filename)
Aa AA-1
AA AA-2
Table 5CITable
Key (insensitive filename) Value (sensitive document name)
AA-1 Aa
AA-2 AA
It should be noted that, the first filename of preserving and the mapping relations of the second filename can also adopt other forms to carry out index, if for example mapping table can be by key (key) value of finding (value), also can find key (key) by value (value), the second mapping table CITable and the first mapping table CSTable can be reduced to a mapping table, reduce to a certain extent the existence of redundant data.In addition, the file directory in the present embodiment (entry table), mapping table all can have many forms, as B tree, B+ tree and Hash table etc., at this, do not limit.
Thus, in the embodiment of the present invention, support at the same time to the first file protocol of case sensitive and in the commingled system of insensitive the second file protocol of capital and small letter, first file directory corresponding with the first file protocol and second file directory corresponding with the second file protocol have been created, when needs add file, in the first file directory and the second file directory, search the filename that whether has conflict respectively, while there is the filename of conflict if there is not the filename of conflict in to the first file directory of case sensitive in insensitive the second file directory to capital and small letter, by filename is carried out to conversion process, and the corresponding relation of the filename before preservation conversion and the filename after conversion, thereby solved the problem that file data that the filename conflict that exists in multi-protocols file system causes can not normally be accessed, and to filename, conflict is processed in file system inside, complexity and the expense of system have been reduced, and effectively promoted operating efficiency.
Embodiment bis-
Referring to Fig. 3, commingled system file data processing method the second embodiment schematic diagram providing for the embodiment of the present invention.
On the basis of first embodiment of the invention, method provided by the invention also further comprises the processing procedure of file data being added under the second tupe.
S301, when definite file processing pattern is the second file processing pattern, when judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
S302, the first filename corresponding to the file that need to add when judgement when there is the filename of conflict or have the filename of conflict in described the second file directory in described the first file directory, backspace file name duplication of name error messages.
During specific implementation, when add protocol-identifier in request according to file, determine that file processing pattern is when to insensitive the second file processing pattern of filename capital and small letter, first will be in second file directory corresponding with second protocol locating file whether there is the filename of conflict, if there is no, create file, and add file in the second file directory.Particularly, during file first filename by name of the file adding when needs, when judgement does not exist the filename of conflict in the second file directory, in the second file directory, preserve described the first filename.Then, in the first file directory, search the filename that whether has conflict, if there is no, directly in the first file directory, add described the first filename.
If there is the filename conflicting with the first filename, backspace file name duplication of name error messages in judgement in the second file directory.
If there is not the filename conflicting with the first filename and have the filename conflicting with the first filename in the first file directory in judgement, can backspace file name duplication of name error messages in the second file directory yet.
Thus, through above-mentioned processing, avoided supporting the file access incorrect problem that the commingled system of multi-protocols is born the same name and caused due to file, and because bearing the same name in file system inside to conflict, the present invention processes, with less system overhead, efficiently solve the problem that file data that the filename conflict that exists in multi-protocols file system causes can not normally be accessed, and to filename, conflict is processed in file system inside, reduce complexity and the expense of system, and effectively promoted operating efficiency.
Embodiment tri-
Referring to Fig. 4, commingled system file data processing method the 3rd embodiment schematic diagram providing for the embodiment of the present invention.
Below in conjunction with a concrete example, file adding method provided by the invention is described.In this embodiment, commingled system is specially mixed file system, and the first file directory is specially CSDIR, and the second file directory is specially CIDIR, respectively to the first file protocol of reply case sensitive with to insensitive the second file protocol of capital and small letter.During the mapping relations of the filename after preserving raw filename and rename, this embodiment adopts CStable and Citable to preserve mapping relations, specifically can be referring to shown in table 4 and table 5 in the first embodiment.Wherein, corresponding the first agreement of the first tupe, is called again sensitive mode; The corresponding second protocol of the second tupe, can be called insensitive pattern again.
S401, while receiving document creation request, determines whether that sensitive mode creates file object.If so, enter step S402; If not, enter step S403.
S402 searches the file object that needs establishment in the first file directory CSDIR, obtains lookup result, enters step S404.
S403 searches the file object that needs establishment in the second file directory CIDIR, obtains lookup result, enters step S404.
S404, when lookup result shows not have the file object of conflict, enters step S405; Otherwise, return to error message, termination routine.
S405, creates file object.
S406, determines whether that sensitive mode creates file object, if so, enters step S407; If not, enter step S415.
S407 adds object in the first file directory CSDIR, preserves the first filename corresponding to file that needs interpolation.
S408 searches the file object that whether has establishment in the second file directory CIDIR; If exist, enter step S409; If there is no, enter step S417.
S409, carries out conversion process to filename, for example, Aa is converted to AA-1.
S410, judges whether the length of filename exceeds setting threshold; If so, the long error message of backspace file name; If not, enter step S411.
S411, whether the filename after judgement conversion has duplication of name object.If so, return to step S409; If not, enter step S412.
S412 adds file object in the second file directory, preserves the second filename after conversion.
S413 adds object in the first mapping table CSTable, preserves the mapping relations of the first filename and the second filename.
S414 adds object in the second mapping table CITable, preserves the mapping relations of the second filename and the first filename, enters step S418.
S415 searches the file object that whether has establishment in the first file directory CSDIR; If existed, return to error message, termination routine; If there is no, enter step S416.
S416 adds object in the first file directory CSDIR, preserves the first filename corresponding to file that needs interpolation.
S417 adds object in the second file directory CSDIR, preserves the first filename corresponding to file that needs interpolation.
S418, termination routine.
Embodiment tetra-
Referring to Fig. 5, commingled system file data processing method the 4th embodiment schematic diagram providing for the embodiment of the present invention.
In fourth embodiment of the invention, on the basis of front several embodiment, also further comprise the treatment step that file object is carried out to deletion action.
S501, when receiving file deletion requests, determines the file processing pattern corresponding with described file deletion requests.
During specific implementation, can determine the file processing pattern corresponding with described file deletion requests according to the protocol-identifier containing in file deletion requests.For example, carry the first protocol-identifier in file deletion requests, for showing to support the first file protocol, the first file protocol, to filename case sensitive, determines that file processing pattern is the first file processing pattern to filename case sensitive.And for example, at file, add in request and carry second protocol sign, for showing to support the second file protocol, second agreement is insensitive to filename capital and small letter, determines that file processing pattern is to insensitive the second file processing pattern of filename capital and small letter.
In the implementation of another possibility, in creating file process, according to definite file processing pattern, preserved in advance the corresponding relation of file and file processing pattern.Therefore, when needs, file is carried out and searched, during the operation such as deletion, can in file operation requests, not carry protocol-identifier, but according to the file of preserving and the corresponding relation of file processing pattern, determine the file processing pattern corresponding with described file, to carry out corresponding operation.
S502 according to definite file processing pattern, searches the filename that whether exists file to be deleted corresponding in the file directory corresponding with described file processing pattern.
When definite file processing pattern is the first file processing pattern, in the first file directory, search the filename that whether exists file to be deleted corresponding.When definite file processing pattern is the second file processing pattern, in the second file directory, search the filename that whether exists file to be deleted corresponding.If there is no, return to error message.
S503 when determining while there is filename corresponding to file to be deleted, deletes respectively described file to be deleted in the first file directory and the second file directory.
During specific implementation, after determining and having the filename that file to be deleted is corresponding, before deleting described file to be deleted respectively in the first file directory and the second file directory, described method also comprises: judge whether to exist the mapping relations corresponding with the filename of file to be deleted.When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations; When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
Particularly, when judgement exists mapping relations corresponding to filename with file to be deleted, need to find the first file directory and/or the second file directory filename corresponding with the filename of the file that will delete according to the mapping relations of preservation.For example, when the lower deletion of the first tupe (sensitive mode) Aa file, there is the mapping item corresponding with Aa file in judgement, at the first mapping table and the second mapping table, search respectively, judge that its file of preserving is Aa in the first file directory, according to mapping relations, obtain its file of preserving AA-1 by name in the second file directory, when carrying out deletion action, the file of deleted file Aa by name in the first file directory, the file of deleted file AA-1 by name in the second file directory.And, delete the mapping relations that find, for example in the first mapping table and the second mapping table, remove the mapping item corresponding with Aa file simultaneously.If there is not the mapping item corresponding with Aa file in judgement, in the first mapping table and the second mapping table, all there is not the object Aa that will delete, illustrate that Aa file is identical with the filename in the second file directory in the first file directory, there is not the filename of conflict, directly in the first file directory and the second file directory, delete described file to be deleted.
Embodiment five
Referring to Fig. 6, commingled system file data processing method the 5th embodiment schematic diagram providing for the embodiment of the present invention.
In fifth embodiment of the invention, on the basis of front several embodiment, also further comprise the treatment step that file object is carried out to deletion action.Below in conjunction with a concrete example, file delet method provided by the invention is described.In this embodiment, commingled system is specially mixed file system, and the first file directory is specially CSDIR, and the second file directory is specially CIDIR, respectively to the first file protocol of reply case sensitive with to insensitive the second file protocol of capital and small letter.During the mapping relations of the filename after preserving raw filename and rename, this embodiment adopts CSTable and CITable to preserve mapping relations, specifically can be referring to shown in table 4 and table 5 in the first embodiment.Wherein, corresponding the first agreement of the first tupe, is called again sensitive mode; The corresponding second protocol of the second tupe, can be called insensitive pattern again.
S601, while receiving file deletion requests, determines whether sensitive mode deleted file object.If so, enter step S602; If not, enter step S603.
S602 searches the file object that needs deletion in the first file directory CSDIR, obtains lookup result, enters step S604.
S603 searches the file object that needs deletion in the second file directory CIDIR, obtains lookup result, enters step S604.
S604, when lookup result shows to have file object to be deleted, enters step S605; Otherwise, return to error message, termination routine.
S605, determines whether sensitive mode deleted file object, if so, enters step S606; If not, enter step S607.
S606, searches object at the first mapping table, obtains lookup result, enters step S608.
S607, searches object at the second mapping table and obtains lookup result, enters step S608.
S608, if existed, enters step S609.If there is no, enter step S610.
S609, removes object to be deleted in the first file directory CSDIR, removes object to be deleted in the second file directory CIDIR, removes object to be deleted in CITDIR, removes object to be deleted in CSTable, process ends.
S610, removes object to be deleted in the first file directory CSDIR, removes object to be deleted in the second file directory CIDIR, process ends.
Embodiment six
Referring to Fig. 7, commingled system file data processing method the 6th embodiment schematic diagram providing for the embodiment of the present invention.
In sixth embodiment of the invention, on the basis of front several embodiment, also further comprise the treatment step that file object is carried out to search operation.
S701, when receiving ff request, determines the file processing pattern corresponding with described ff request, determines whether the first tupe (sensitive mode).
S702 when described file processing pattern is the first file processing pattern, searches the file corresponding with described ff request in the first file directory CSDIR.
S703 when described file processing pattern is the second file processing pattern, searches the file corresponding with described ff request in the second file directory CIDIR.
During specific implementation, can determine the file processing pattern corresponding with described file deletion requests according to the protocol-identifier containing in ff request.For example, carry the first protocol-identifier in ff request, for showing to support the first file protocol, the first file protocol, to filename case sensitive, determines that file processing pattern is the first file processing pattern to filename case sensitive.And for example, at file, add in request and carry second protocol sign, for showing to support the second file protocol, second agreement is insensitive to filename capital and small letter, determines that file processing pattern is to insensitive the second file processing pattern of filename capital and small letter.
In the implementation of another possibility, in creating file process, according to definite file processing pattern, preserved in advance the corresponding relation of file and file processing pattern.Therefore, when needs are carried out search operation to file, can in file operation requests, not carry protocol-identifier, but according to the file of preserving and the corresponding relation of file processing pattern, determine the file processing pattern corresponding with described file, to carry out corresponding search operation.
When definite file processing pattern corresponding with search request is the first file processing pattern, in the first file directory, search the described file corresponding with described ff request.When the file processing pattern corresponding with search request is the second file processing pattern, in the second file directory, search the described file corresponding with described ff request.
Above embodiment of the method provided by the invention is at length introduced, be it should be noted that, each embodiment can also obtain other embodiment by combination, distortion, all belongs to protection scope of the present invention.
Embodiment seven
Referring to Fig. 8, commingled system file data treating apparatus the first embodiment schematic diagram providing for the embodiment of the present invention.
A commingled system, described commingled system is at least supported the first file protocol and the second file protocol, and wherein, described the first file protocol is to filename case sensitive, and described the second file protocol is insensitive to filename capital and small letter, and described system comprises:
The first determining unit 801, for when receiving file interpolation request, adds according to described file the protocol-identifier comprising in request and determines file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol;
The first judging unit 802, be used for when the result of the described determining unit receiving shows that described file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory, obtains the first judged result; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
The first adding device 803, for receiving the judged result of described the first judging unit, when described judged result shows that first filename corresponding to file of needs interpolation do not exist the filename of conflict and have the filename of conflict in described the second file directory in described the first file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
Further, described the first adding device comprises the first storage unit, the second storage unit and the 3rd storage unit, wherein, described the 3rd storage unit specifically for:
In the first mapping table, create with the first file key by name, with the second file key-value pair being worth by name; In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name; Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
Further, described system also comprises:
The second adding device, for when determining that file processing pattern is that the first file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
Further, described system also comprises:
The 3rd adding device, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
Further, described system also comprises:
Unit reports an error, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file that adds is corresponding to have the filename of conflict or when described the second file directory exists the filename conflicting in described the first file directory, backspace file name duplication of name error messages.
Further, described system also comprises:
The second determining unit, for when receiving file deletion requests, determines the file processing pattern corresponding with described file deletion requests;
First searches unit, for according to definite file processing pattern, in the file directory corresponding with described file processing pattern, searches the filename that whether exists file to be deleted corresponding;
The first delete cells for when determining while there is filename corresponding to file to be deleted, is deleted respectively described file to be deleted in the first file directory and the second file directory.
Further, described system also comprises:
The second judging unit, for judging whether to exist the mapping relations corresponding with the filename of file to be deleted;
Described the first delete cells specifically for:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations; When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
Further, described system also comprises:
The 3rd determining unit, for when receiving ff request, determines the file processing pattern corresponding with described ff request;
Second searches unit, for when described file processing pattern is the first file processing pattern, searches the file corresponding with described ff request in the first file directory;
The 3rd searches unit, for when described file processing pattern is the second file processing pattern, searches the file corresponding with described ff request in the second file directory.
Embodiment eight
Referring to Fig. 9, commingled system file data treating apparatus the second embodiment schematic diagram providing for the embodiment of the present invention.
Fig. 9 has described the structure of the commingled system file data treating apparatus that another embodiment of the present invention provides, comprise for example CPU of at least one processor 901(), storer 902, and at least one communication bus 903, for realizing the connection communication between these devices.Processor 901 for example, for the executable module of execute store 902 storages, computer program.Storer 902 may comprise high-speed random access memory (RAM:Random Access Memory), also may also comprise non-unsettled storer (non-volatile memory), for example at least one magnetic disk memory.
In some embodiments, storer 902 has been stored program 9021, and program 9021 can be carried out by processor 901, and this program comprises:
When receiving file interpolation request, according to described file, add the protocol-identifier comprising in request and determine file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol; Wherein, described the first file protocol is to filename case sensitive, and described the second file protocol is insensitive to filename capital and small letter;
When definite file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
When judgement needs first filename corresponding to file of interpolation not have the filename of conflict in described the first file directory and have the filename of conflict in described the second file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
Wherein, described program 9021 can also comprise:
In the first mapping table, create with the first file key by name, with the second file key-value pair being worth by name; In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name;
Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
Wherein, described program 9021 can also comprise:
When definite file processing pattern is the first file processing pattern, when judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
Wherein, described program 9021 can also comprise:
When definite file processing pattern is the second file processing pattern, when judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
Wherein, described program 9021 can also comprise:
When definite file processing pattern is the second file processing pattern, the first filename corresponding to the file that need to add when judgement when there is the filename of conflict or have the filename of conflict in described the second file directory in described the first file directory, backspace file name duplication of name error messages.
Wherein, described program 9021 can also comprise:
When receiving file deletion requests, determine the file processing pattern corresponding with described file deletion requests;
According to definite file processing pattern, in the file directory corresponding with described file processing pattern, search the filename that whether exists file to be deleted corresponding;
When determining while there is filename corresponding to file to be deleted, in the first file directory and the second file directory, delete respectively described file to be deleted.
Wherein, described program 9021 can also comprise:
After determining and having the filename that file to be deleted is corresponding, before deleting described filename respectively in the first file directory and the second file directory, described method also comprises:
Judge whether to exist the mapping relations corresponding with the filename of file to be deleted;
Describedly in the first file directory and the second file directory, delete described file respectively and comprise:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations;
When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
Wherein, described program 9021 can also comprise:
When receiving ff request, determine the file processing pattern corresponding with described ff request; When described file processing pattern is the first file processing pattern, in the first file directory, search the described file corresponding with described ff request; When described file processing pattern is the second file processing pattern, in the second file directory, search the described file corresponding with described ff request.
It should be noted that, due to embodiment of the method is explained in detail, comparatively simple to the description of device embodiment, it will be appreciated by persons skilled in the art that and can construct device embodiment of the present invention by reference method embodiment.Those skilled in the art all belong to protection scope of the present invention not paying other implementations of obtaining under creative work.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by the teleprocessing equipment being connected by communication network, be executed the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for device embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.Device embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skills, in the situation that not paying creative work, are appreciated that and implement.The above is only the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (16)

1. a commingled system file data processing method, it is characterized in that, described commingled system is at least supported the first file protocol and the second file protocol, wherein, described the first file protocol is to filename case sensitive, described the second file protocol is insensitive to filename capital and small letter, and described method comprises:
When receiving file interpolation request, according to described file, add the protocol-identifier comprising in request and determine file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol;
When definite file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
When judgement needs first filename corresponding to file of interpolation not have the filename of conflict in described the first file directory and have the filename of conflict in described the second file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
2. method according to claim 1, is characterized in that, the mapping relations of described the first filename of described preservation and described the second filename comprise:
In the first mapping table, create with the first file key by name, with the second file key-value pair being worth by name;
In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name;
Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
3. method according to claim 1, is characterized in that, when definite file processing pattern is the first file processing pattern, described method also comprises:
When judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
4. method according to claim 1, is characterized in that, when definite file processing pattern is the second file processing pattern, described method also comprises:
When judgement needs first filename corresponding to file of interpolation all not have the filename of conflict in described the first file directory and described the second file directory, in described the first file directory and described the second file directory, preserve described the first filename respectively.
5. method according to claim 1, is characterized in that, when definite file processing pattern is the second file processing pattern, described method also comprises:
The first filename corresponding to the file that need to add when judgement when there is the filename of conflict or have the filename of conflict in described the second file directory in described the first file directory, backspace file name duplication of name error messages.
6. method according to claim 1, is characterized in that, described method also comprises:
When receiving file deletion requests, determine the file processing pattern corresponding with described file deletion requests;
According to definite file processing pattern, in the file directory corresponding with described file processing pattern, search the filename that whether exists file to be deleted corresponding;
When determining while there is filename corresponding to file to be deleted, in the first file directory and the second file directory, delete respectively described file to be deleted.
7. method according to claim 6, is characterized in that, after determining and having the filename that file to be deleted is corresponding, before deleting described file to be deleted respectively in the first file directory and the second file directory, described method also comprises:
Judge whether to exist the mapping relations corresponding with the filename of file to be deleted;
Describedly in the first file directory and the second file directory, delete respectively described file to be deleted and comprise:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations;
When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
8. method according to claim 1, is characterized in that, described method also comprises:
When receiving ff request, determine the file processing pattern corresponding with described ff request;
When described file processing pattern is the first file processing pattern, in the first file directory, search the file corresponding with described ff request;
When described file processing pattern is the second file processing pattern, in the second file directory, search the file corresponding with described ff request.
9. a commingled system, is characterized in that, described commingled system is at least supported the first file protocol and the second file protocol, wherein, described the first file protocol is to filename case sensitive, and described the second file protocol is insensitive to filename capital and small letter, and described system comprises:
The first determining unit, for when receiving file interpolation request, adds according to described file the protocol-identifier comprising in request and determines file processing pattern; Described file processing pattern at least comprises the first file processing pattern corresponding with described the first file protocol and the second file processing pattern corresponding with described the second file protocol;
The first judging unit, be used for when the result of the described determining unit receiving shows that described file processing pattern is the first file processing pattern, judgement needs the first filename corresponding to file adding whether to have conflict filename in the first file directory and the second file directory, obtains the first judged result; Wherein, described the first file directory is corresponding with described the first file protocol, and described the second file directory is corresponding with described the second file protocol;
The first adding device, for receiving the judged result of described the first judging unit, when described judged result shows that first filename corresponding to file of needs interpolation do not exist the filename of conflict and have the filename of conflict in described the second file directory in described the first file directory, in described the first file directory, preserve described the first filename, in described the second file directory, preserve described the first filename is carried out to the second filename that conversion process obtains, and preserve the mapping relations of described the first filename and described the second filename; Wherein, described the first filename and described the second filename are different filenames in the second file protocol.
10. system according to claim 9, is characterized in that, described the first adding device comprises the first storage unit, the second storage unit and the 3rd storage unit, wherein, described the 3rd storage unit specifically for:
In the first mapping table, create with the first file key by name, with the second file key-value pair being worth by name; In the second mapping table, create with the second file key by name, with the first file key-value pair being worth by name; Wherein, described the first mapping table and described the first file protocol, described the first file directory are corresponding; Described the second mapping table and described the second file protocol, described the second file directory are corresponding.
11. systems according to claim 9, is characterized in that, described system also comprises:
The second adding device, for when determining that file processing pattern is that the first file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
12. systems according to claim 9, is characterized in that, described system also comprises:
The 3rd adding device, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file of interpolation is corresponding when described the first file directory and described the second file directory all do not exist the filename of conflict, preserves described the first filename respectively in described the first file directory and described the second file directory.
13. systems according to claim 9, is characterized in that, described system also comprises:
Unit reports an error, for when determining that file processing pattern is that the second file processing pattern and judgement need the first filename that the file that adds is corresponding to have the filename of conflict or when described the second file directory exists the filename conflicting in described the first file directory, backspace file name duplication of name error messages.
14. systems according to claim 9, is characterized in that, described system also comprises:
The second determining unit, for when receiving file deletion requests, determines the file processing pattern corresponding with described file deletion requests;
First searches unit, for according to definite file processing pattern, in the file directory corresponding with described file processing pattern, searches the filename that whether exists file to be deleted corresponding;
The first delete cells for when determining while there is filename corresponding to file to be deleted, is deleted respectively described file to be deleted in the first file directory and the second file directory.
15. systems according to claim 14, is characterized in that, described system also comprises:
The second judging unit, for judging whether to exist the mapping relations corresponding with the filename of file to be deleted;
Described the first delete cells specifically for:
When judgement exists mapping relations corresponding to filename with file to be deleted, according to the mapping relations corresponding with described filename, in the first file directory and the second file directory, delete respectively described file to be deleted, and delete described mapping relations; When judgement does not exist mapping relations corresponding to filename with file to be deleted, directly in the first file directory and the second file directory, delete described file to be deleted.
16. systems according to claim 9, is characterized in that, described system also comprises:
The 3rd determining unit, for when receiving ff request, determines the file processing pattern corresponding with described ff request;
Second searches unit, for when described file processing pattern is the first file processing pattern, searches the file corresponding with described ff request in the first file directory;
The 3rd searches unit, for when described file processing pattern is the second file processing pattern, searches the file corresponding with described ff request in the second file directory.
CN201310628992.8A 2013-11-29 A kind of hybrid system file data processing method and system Active CN103631915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310628992.8A CN103631915B (en) 2013-11-29 A kind of hybrid system file data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310628992.8A CN103631915B (en) 2013-11-29 A kind of hybrid system file data processing method and system

Publications (2)

Publication Number Publication Date
CN103631915A true CN103631915A (en) 2014-03-12
CN103631915B CN103631915B (en) 2016-11-30

Family

ID=

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107294956A (en) * 2017-05-24 2017-10-24 北京奇安信科技有限公司 The conflict processing method and device of data markers
CN109062935A (en) * 2018-06-14 2018-12-21 新华三技术有限公司 A kind of method and apparatus of file operation
CN109491966A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file search method and relevant apparatus
CN111480155A (en) * 2017-12-15 2020-07-31 微软技术许可有限责任公司 Technique for handling letter size in a file system
WO2022206242A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Multi-tenant operation and maintenance management method, apparatus and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276568A (en) * 1999-06-04 2000-12-13 网络装置公司 Multi-protocol unified file lockout
CN1688982A (en) * 2002-08-09 2005-10-26 网络装置公司 Multi-protocol storage appliance that provides integrated support for file and block access protocols
CN1723434A (en) * 2002-12-06 2006-01-18 思科技术公司 Apparatus and method for a scalable network attach storage system
CN1742472A (en) * 2002-11-26 2006-03-01 国际商业机器公司 Efficiently supporting multiple native network protocol implementations in a single system
US20070088702A1 (en) * 2005-10-03 2007-04-19 Fridella Stephen A Intelligent network client for multi-protocol namespace redirection
CN102932468A (en) * 2012-11-07 2013-02-13 曙光信息产业股份有限公司 Shared data access method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276568A (en) * 1999-06-04 2000-12-13 网络装置公司 Multi-protocol unified file lockout
CN1688982A (en) * 2002-08-09 2005-10-26 网络装置公司 Multi-protocol storage appliance that provides integrated support for file and block access protocols
CN1742472A (en) * 2002-11-26 2006-03-01 国际商业机器公司 Efficiently supporting multiple native network protocol implementations in a single system
CN1723434A (en) * 2002-12-06 2006-01-18 思科技术公司 Apparatus and method for a scalable network attach storage system
US20070088702A1 (en) * 2005-10-03 2007-04-19 Fridella Stephen A Intelligent network client for multi-protocol namespace redirection
CN102932468A (en) * 2012-11-07 2013-02-13 曙光信息产业股份有限公司 Shared data access method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107294956A (en) * 2017-05-24 2017-10-24 北京奇安信科技有限公司 The conflict processing method and device of data markers
CN111480155A (en) * 2017-12-15 2020-07-31 微软技术许可有限责任公司 Technique for handling letter size in a file system
CN111480155B (en) * 2017-12-15 2023-08-29 微软技术许可有限责任公司 Technique for handling letter cases in a file system
CN109062935A (en) * 2018-06-14 2018-12-21 新华三技术有限公司 A kind of method and apparatus of file operation
CN109491966A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file search method and relevant apparatus
WO2022206242A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Multi-tenant operation and maintenance management method, apparatus and system

Similar Documents

Publication Publication Date Title
CN109684333B (en) Data storage and cutting method, equipment and storage medium
CN102629247B (en) Method, device and system for data processing
US9251157B2 (en) Enterprise node rank engine
US8180811B2 (en) Identifying unreferenced file system components
US7769792B1 (en) Low overhead thread synchronization system and method for garbage collecting stale data in a document repository without interrupting concurrent querying
CN109213756B (en) Data storage method, data retrieval method, data storage device, data retrieval device, server and storage medium
US20120179689A1 (en) Directory tree search
US7634517B1 (en) System and method for dynamically updating a document repository without interrupting concurrent querying
CN106484820B (en) Renaming method, access method and device
CN109783543B (en) Data query method, device, equipment and storage medium
US10169391B2 (en) Index management
CN102426609A (en) Index generation method and index generation device based on MapReduce programming architecture
US20140244606A1 (en) Method, apparatus and system for storing, reading the directory index
US11176110B2 (en) Data updating method and device for a distributed database system
CN106599091B (en) RDF graph structure storage and index method based on key value storage
US11068536B2 (en) Method and apparatus for managing a document index
US7617226B1 (en) Document treadmilling system and method for updating documents in a document repository and recovering storage space from invalidated documents
CN112162707A (en) Storage method, electronic device and storage medium for distributed storage system
US8818971B1 (en) Processing bulk deletions in distributed databases
CN110889023A (en) Distributed multifunctional search engine of elastic search
US20180032560A1 (en) Index b-tree maintenance for linear sequential insertion
CN110110184B (en) Information inquiry method, system, computer system and storage medium
CN105279166B (en) File management method and system
CN103246718B (en) File access method, device and equipment
CN116775712A (en) Method, device, electronic equipment, distributed system and storage medium for inquiring linked list

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant