CN111258503A - Management method and device of CIROS file system - Google Patents

Management method and device of CIROS file system Download PDF

Info

Publication number
CN111258503A
CN111258503A CN202010042147.2A CN202010042147A CN111258503A CN 111258503 A CN111258503 A CN 111258503A CN 202010042147 A CN202010042147 A CN 202010042147A CN 111258503 A CN111258503 A CN 111258503A
Authority
CN
China
Prior art keywords
file
ciros
directory
cirros
file system
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
CN202010042147.2A
Other languages
Chinese (zh)
Other versions
CN111258503B (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.)
GHT CO Ltd
Original Assignee
GHT 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 GHT CO Ltd filed Critical GHT CO Ltd
Priority to CN202010042147.2A priority Critical patent/CN111258503B/en
Publication of CN111258503A publication Critical patent/CN111258503A/en
Application granted granted Critical
Publication of CN111258503B publication Critical patent/CN111258503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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/13File access structures, e.g. distributed indices
    • 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
    • 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/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a management method of a CIROS file system, which comprises the following steps: establishing partition directories of the CIROS file system to store CIROS files with different data types, establishing directory record files in each partition directory to record file information of each CIROS file in the partition directories, responding to access or operation instructions of a user to the CIROS file system, and synchronously updating corresponding directory record files. The invention also discloses a corresponding management device, and by adopting the embodiment of the invention, the access and the use of the CIROS file system on the Linux operating system can be realized, so that developers can conveniently use the CIROS file system to develop programs on the Linux operating system, and the operation is more flexible and convenient.

Description

Management method and device of CIROS file system
Technical Field
The invention relates to the technical field of file system management, in particular to a management method and a device of a CIROS file system.
Background
The CIROS file system is a professional file system applied to a Harris program-controlled switch, can realize minimized I/O operation, has the characteristic of restorability, occupies less memory, is a reliable and efficient file system, and is widely applied all the time.
However, in the process of implementing the invention, the inventor finds that the prior art has at least the following problems: the Linux operating system has been developed as the current mainstream operating system, and because the Linux operating system and the CIRROS operating system have different access and operating modes to the file system, the CIRROS file system can only be operated and managed based on the CIRROS operating system, and developers cannot use the CIRROS file system on the Linux operating system by using the original management method, so that the developers cannot combine the powerful functions of the Linux operating system to realize the rapid development and function expansion of the application program of the CIRROS file system.
Disclosure of Invention
The invention aims to provide a management method and a management device of a CIROS file system, which can realize the access and the use of the CIROS file system on a Linux operating system and are convenient for a developer to use the CIROS file system to develop a program on the Linux operating system.
In order to achieve the above object, an embodiment of the present invention provides a method for managing a CIRROS file system, which is applied to a Linux operating system, and includes:
establishing a partition directory of a CIROS file system to store CIROS files with different data types;
establishing a directory record file in each partition directory to record file information of each CIROS file in the partition directory;
responding to the access or operation instruction of the user to the CIROS file system, and synchronously updating the corresponding directory record file.
As an improvement of the above scheme, the creating of the partition directory of the CIRROS file system is used for storing CIRROS files of different data types, and specifically includes:
acquiring and decompressing an initial packed file of the CIROS file system;
dividing CIROS files with different data types according to the decompressed initial packed file;
and establishing a partition directory of the CIROS file system, and storing CIROS files of the same data type in each partition directory.
As a refinement of the above, the data types include program data, user configuration data, and temporary data.
As an improvement of the above scheme, the creating a directory record file in each partition directory to record file information of a CIRROS file in the partition directory specifically includes:
starting a main program of the CIROS file system, and scanning each partition directory;
when a directory recording file does not exist in any partition directory, creating a target recording file aiming at the partition directory;
and traversing the CIROS files in the partition directory, and storing the file information of each CIROS file into the target record file.
As an improvement of the above solution, the responding to the user's access or operation instruction to the CIRROS file system and synchronously updating the corresponding directory record file specifically includes:
responding an access instruction of a user to a CIROS file, and converting block address access of the CIROS file into access based on address offset in the file so as to finish access to the CIROS file;
responding to an operation instruction of a user on the CIROS file to complete the operation on the CIROS file; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file;
and after the operation on the CIROS file is finished, synchronously updating the directory record file of the partition directory to which the CIROS file belongs.
As an improvement of the above scheme, the management method of the CIRROS file system further includes the steps of:
when detecting that a USB memory is inserted, establishing a directory record file in the USB memory so as to record file information of a CIROS file in the USB memory;
responding to the access or operation of a user to the USB memory, and synchronously updating the directory record file of the USB memory; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
As an improvement of the above scheme, when the insertion of the USB memory is detected, a directory record file is established in the USB memory to record file information of the CIRROS file in the USB memory, and the method specifically includes:
when the USB memory is inserted, reporting a notification event of the movable memory;
starting a main program of the CIROS file system, and scanning the USB memory;
when the directory record file does not exist in the USB memory, creating a target record file aiming at the USB memory;
and traversing the CIROS files in the USB memory, and storing the file information of each CIROS file into a target record file of the USB memory.
As an improvement of the above scheme, the file information includes a file name, a file attribute, a file version number, a file size, and a file last modification date.
The embodiment of the invention also provides a management device of the CIROS file system, which is applied to a Linux operating system and comprises the following components:
the partition directory establishing module is used for establishing a partition directory of the CIROS file system so as to store CIROS files with different data types;
the directory record file establishing module is used for establishing a directory record file in each partition directory so as to record the file information of each CIROS file in the partition directory;
and the user instruction response module is used for responding to the access or operation instruction of the user to the CIROS file system and synchronously updating the corresponding directory record file.
An embodiment of the present invention further provides a management apparatus of a CIRROS file system, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the management method of the CIRROS file system as described in any one of the above items when executing the computer program.
Compared with the prior art, the management method and the device of the CIROS file system disclosed by the invention have the advantages that the partition directories of the CIROS file system are established to store CIROS files with different data types, directory record files are established in each partition directory to record the file information of each CIROS file in the partition directories, the access or operation instruction of a user to the CIROS file system is responded, and the corresponding directory record files are synchronously updated. Therefore, the access and the use of the CIROS file system on the Linux operating system are realized, developers can conveniently use the CIROS file system to develop programs on the Linux operating system, and the operation is more flexible and convenient.
Drawings
Fig. 1 is a schematic flowchart illustrating steps of a method for managing a CIRROS file system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the step S11 according to the first embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step S12 according to the first embodiment of the present invention;
FIG. 4 is a flowchart illustrating the step S13 according to the first embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of another method for managing CIRROS file system according to a second embodiment of the present invention;
FIG. 6 is a flowchart illustrating step S21 according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a management apparatus of a CIRROS file system according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of another CIRROS file system management apparatus according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a schematic flow chart illustrating steps of a management method of a CIRROS file system according to an embodiment of the present invention. The file system is a system for organizing and distributing the space of the file storage device, and is responsible for storing the files and protecting and retrieving the stored files. The CIROS file system is a professional file system applied to the program-controlled switch and has the characteristics of high reliability, high running efficiency and the like. The embodiment of the invention provides a management method of a CIROS file system, which is applied to a Linux operating system and specifically comprises the following steps of S11-S13:
and S11, establishing a partition directory of the CIROS file system to store CIROS files with different data types.
And S12, creating a directory record file in each partition directory to record the file information of each CIROS file in the partition directory.
And S13, responding to the access or operation instruction of the user to the CIROS file system, and synchronously updating the corresponding directory record file.
In the embodiment of the invention, the partition frame of the CIROS file system is extracted from the Linux operating system and is converted into the directory structure of the Linux operating system, so that the partition directory of the CIROS file system is established to store CIROS files with different data types. And aiming at each partition directory, establishing a directory record file CIROS. When a user runs and manages the CIROS file system on a Linux operating system, the access or operating instruction of the user is responded, the access and operation to any CIROS file are completed, and meanwhile, corresponding file information in a directory record file CIROS.
Preferably, the file information of the CIRROS file includes, but is not limited to, a file name, a file attribute, a file version number, a file size, and a file last modification date. The file attributes are used for describing the access state of the CIROS files, and each CIROS file has 16-bit file attributes used for representing the attributes of the CIROS file such as read-only, writable, protection, invisibility to a user and the like. The file attributes are not mutually exclusive and can be simultaneously effective. The file version number is version information carried by each CIROS file, the same-name files can have at most 99 versions, namely the range of the file version v is 1-99, and the highest-version file is used by default.
Preferably, the user's operations on the CIRROS file include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving operations on the CIRROS file.
Specifically, referring to fig. 2, which is a flowchart illustrating step S11 in the first embodiment of the present invention, in order to more flexibly and efficiently create partition directories of the CIRROS file system for storing CIRROS files of different data types, step S11 in the first embodiment of the present invention is executed through steps S111 to S113:
s111, acquiring and decompressing an initial packed file of the CIROS file system;
s112, dividing CIROS files with different data types according to the decompressed initial packed file;
s113, establishing a partition directory of the CIROS file system, and storing CIROS files of the same data type in each partition directory.
Preferably, the data types include program data, user configuration data and temporary data.
In the embodiment of the invention, the initial packed file of the CIROS file system is obtained, and the initial file information of the initial packed file is recorded at the same time, wherein the initial file information comprises the file attribute, the file version number, the file size and the file last modification date. In the Linux operating system, the initial packed file is decompressed, and each CIRROS file in the CIRROS file system is divided into different data types, specifically program data, user configuration data and temporary data. Establishing an f3/f4/f5 partition directory as a partition directory of a CIROS file system, wherein the f3 partition directory is used for storing program data; f4 partition directory for storing user configuration data; the f5 partition directory is used to store temporary data.
Fig. 3 is a schematic flowchart of step S12 in the first embodiment of the present invention. In order to provide an effective method for creating a directory entry file, step S12 in the first embodiment of the present invention is executed by steps S121 to S123:
s121, starting a main program of the CIROS file system, and scanning each partition directory;
s122, when no directory record file exists in any partition directory, creating a target record file aiming at the partition directory;
s123, traversing the CIROS files in the partition directory, and storing the file information of each CIROS file into the target record file.
In the embodiment of the invention, when the main program FSMAIN of the CIROS file system starts to run, each partition directory of the CIROS file system is scanned, and whether a directory record file exists is judged. When scanning that a certain partition directory does not have a directory record file CIROS.DIR, creating CIROS.DIR files, traversing the CIROS files in the partition directory, recording file information such as file names, file attributes, file version numbers, file sizes, file final modification dates and the like of all the files into the CIROS.DIR files, and updating the CIROS.DIR files in real time.
Fig. 4 is a schematic flowchart of step S13 in the first embodiment of the present invention. In order to more efficiently and simply implement the operation and management of the CIRROS file system in the Linux operating system, step S13 in the first embodiment of the present invention is executed through steps S131 to S133:
s131, responding to an access instruction of a user to the CIROS file, and converting block address access of the CIROS file into access based on address offset in the file to finish access to the CIROS file.
In an original CIRROS operating system, a CIRROS file uses a block as a unit, a block address is converted into a cylinder (cylinder), a disk surface (cylinder) and a sector (sector) address in a magnetic disk, and then a physical storage space of the magnetic disk is accessed through an IDE hard disk drive, so that the access to the CIRROS file is realized.
In the embodiment of the invention, the direct access and use of the CIROS file content can be realized through the file operation command of the Linux operation system through the main program FSMAIN of the CIROS file system. Specifically, when an access instruction of a user is received, block access in the CIROS file system is converted into access based on address offset in a file, the CIROS file under a specific partition directory can be accessed through accurate positioning of the partition directory, and the address in the file is obtained by converting the original block (block) address into the offset relative to the start of the file. By the embodiment of the invention, when the access to the CIROS file system is realized in the Linux operating system, the hard disk drive does not need to be operated to access in a sector and block mode, the partition operation on a magnetic disk is shielded, the operation of a magnetic track, a sector and a block of file data is shielded, and the convenience of user operation and the safety of data access are improved by converting into the standard Linux file operation.
S132, responding to an operation instruction of a user to the CIROS file to complete the operation of the CIROS file; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
Specifically, after a user accesses a certain CIRROS file, the operations of opening, closing, modifying, creating, deleting, copying, moving and the like can be performed on the CIRROS file, so that the operation and management of the CIRROS file are realized. For example, aspects such as file name, file content, and file format of the CIRROS file may be modified. The developer can borrow the powerful function of the Linux system and use the CIROS file system to develop programs, expand functions and the like.
S133, after the operation of the CIROS file is completed, synchronously updating the directory record file of the partition directory to which the CIROS file belongs.
After the user performs operations such as opening, closing, modifying, creating, deleting, copying and moving on the CIROS file, updating corresponding file information of a directory record file CIROS.DIR corresponding to a partition directory to which the CIROS file belongs according to the operation content and operation results of the user so as to keep the accuracy and the validity of the directory record file.
The embodiment of the invention provides a management method of a CIROS file system, which is applied to a Linux operating system and is used for storing CIROS files with different data types by establishing partition directories of the CIROS file system, establishing directory record files in each partition directory to record the file information of each CIROS file in the partition directories, responding to the access or operation instruction of a user to the CIROS file system, and synchronously updating the corresponding directory record files. Therefore, the access and the use of the CIROS file system on the Linux operating system are realized, developers can conveniently use the CIROS file system to develop programs on the Linux operating system, and the operation is more flexible and convenient.
Example two
Fig. 5 is a schematic flow chart showing steps of another method for managing the CIRROS file system according to the second embodiment of the present invention. The management method of the CIRROS file system provided by the second embodiment of the invention is implemented on the basis of the first embodiment, and further includes steps S21 to S22:
s21, when the insertion of the USB memory is detected, a directory record file is established in the USB memory to record the file information of the CIROS file in the USB memory.
The existing CIROS file system can not access the USB memory, and can not use the USB memory to realize the operation and management of the CIROS file system. In the second embodiment of the invention, when the USB memory is inserted, the CIRROS file system can be automatically triggered to create and maintain the partition directory for the USB memory, thereby realizing the storage and management of the CIRROS file by the USB memory.
Fig. 6 is a schematic flowchart of step S21 in the second embodiment of the present invention. Step S21 of the second embodiment of the present invention is executed through steps S211 to S214:
and S211, reporting a notification event of the movable memory when the USB memory is inserted.
S212, starting a main program of the CIROS file system, and scanning the USB memory.
And S213, when the directory record file does not exist in the USB memory, creating a target record file for the USB memory.
S214, traversing the CIROS files in the USB memory, and storing the file information of each CIROS file into a target record file of the USB memory. Specifically, the file information includes a file name, a file attribute, a file version number, a file size, and a file last modification date.
In the embodiment of the invention, when the USB memory is inserted, the Linux operating system can detect the USB memory and report the notification event of the removable memory. And acquiring the position information of the USB memory by detecting a notification event of the removable memory of the Linux operating system. And when the scanning result shows that the directory record file CIROS.DIR does not exist in the USB memory, a target record file CIROS.DIR is created in the USB memory and is used for recording file information such as the file name, the file attribute, the file version number, the file size, the file final modification date and the like of the CIROS file in the USB memory.
S22, responding to the access or operation of the user to the USB memory, and synchronously updating the directory record file of the USB memory; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
And further realizing the access or operation of the USB memory by creating the directory record file in the USB memory, and updating the corresponding file information of the directory record file of the USB memory according to the operation content and the operation result of the user. The embodiment of the invention can realize the direct copying and moving of the CIROS file in the system disk and the USB memory, thereby realizing the transmission and backup of the CIROS file by utilizing the USB memory.
The second embodiment of the invention provides a management method of a CIROS file system, which is applied to a Linux operating system and is used for storing CIROS files with different data types by establishing partition directories of the CIROS file system, establishing directory record files in each partition directory to record the file information of each CIROS file in the partition directories, responding to the access or operation instruction of a user to the CIROS file system, and synchronously updating the corresponding directory record files. When detecting that the USB memorizer is inserted, establishing a directory record file in the USB memorizer so as to record the file information of the CIROS file in the USB memorizer, responding to the access or operation of a user to the USB memorizer, and synchronously updating the directory record file of the USB memorizer. The embodiment of the invention can realize the access and the use of the CIROS file system on the Linux operating system, and is convenient for a developer to develop a program by using the CIROS file system on the Linux operating system. Meanwhile, the access and the operation of the CIROS file system on the USB memory can be realized, so that the propagation and the backup of the CIROS file are realized by utilizing the USB memory, and the operation is more flexible and convenient.
EXAMPLE III
Fig. 7 is a schematic structural diagram of a management apparatus of a CIRROS file system according to a third embodiment of the present invention. The management apparatus 30 of the CIRROS file system provided by the third embodiment of the present invention includes: a partition directory creating module 31, a directory record file creating module 32, and a user instruction response module 33, wherein,
the partition directory establishing module 31 is configured to establish a partition directory of a CIRROS file system to store CIRROS files of different data types.
The directory record file creating module 32 is configured to create a directory record file in each partition directory, so as to record file information of each CIRROS file in the partition directory.
The user instruction response module 33 is configured to respond to an instruction of accessing or operating the CIRROS file system by a user, and update the corresponding directory record file synchronously.
Further, the directory record file creating module 32 is further configured to create a directory record file in the USB memory when the insertion of the USB memory is detected, so as to record file information of the CIRROS file in the USB memory.
The user instruction response module 33 is further configured to respond to access or operation of a user on the USB memory, and update a directory record file of the USB memory synchronously; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
In a preferred embodiment, the partition directory establishing module 31 includes: a packed file decompression unit 311, a data type division unit 312, and a partition directory creation unit 313, wherein,
the packed file decompressing unit 311 is configured to obtain and decompress an initial packed file of the CIRROS file system;
the data type dividing unit 312 is configured to divide CIRROS files of different data types according to the decompressed initial packed file;
the partition directory establishing unit 313 is configured to establish partition directories of the CIRROS file system, and store CIRROS files of the same data type in each partition directory.
In a preferred embodiment, the directory record file creating module 32 includes a partition directory scanning unit 321, a target record file creating unit 322, and a file traversing unit 323. Wherein the content of the first and second substances,
the partition directory scanning unit 321 is configured to start a main program of the CIRROS file system, and scan each partition directory;
the target record file creating unit 322 is configured to create a target record file for any one of the partition directories when no directory record file exists in the partition directory;
the file traversing unit 323 is configured to traverse CIRROS files in the partition directory, and store the file information of each CIRROS file in the target record file.
In a preferred embodiment, the user instruction response module 33 includes an access instruction response unit 331, an operation instruction response unit 332, and a directory entry file update unit 333. Wherein the content of the first and second substances,
the access instruction response unit 331 is configured to respond to an access instruction of a user to a CIRROS file, and convert block address access of the CIRROS file into access based on an address offset in a file to complete access to the CIRROS file;
the operation instruction response unit 332 is configured to respond to an operation instruction of a user on a CIRROS file to complete an operation on the CIRROS file; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file;
the directory record file updating unit 333 is configured to, after the operation on the CIRROS file is completed, synchronously update the directory record file of the partition directory to which the CIRROS file belongs.
It should be noted that the management apparatus for a CIRROS file system provided in the embodiment of the present invention is configured to execute all the process steps of the management method for a CIRROS file system in the first or second embodiment, and the working principles and beneficial effects of the two are in one-to-one correspondence, so that details are not described again.
The third embodiment of the invention provides a management device of a CIROS file system, which is applied to a Linux operating system and is used for storing CIROS files with different data types by establishing partition directories of the CIROS file system, establishing directory record files in each partition directory to record the file information of each CIROS file in the partition directories, responding to the access or operation instruction of a user to the CIROS file system, and synchronously updating the corresponding directory record files. When detecting that the USB memorizer is inserted, establishing a directory record file in the USB memorizer so as to record the file information of the CIROS file in the USB memorizer, responding to the access or operation of a user to the USB memorizer, and synchronously updating the directory record file of the USB memorizer. The embodiment of the invention can realize the access and the use of the CIROS file system on the Linux operating system, and is convenient for a developer to develop a program by using the CIROS file system on the Linux operating system. Meanwhile, the access and the operation of the CIROS file system on the USB memory can be realized, so that the propagation and the backup of the CIROS file are realized by utilizing the USB memory, and the operation is more flexible and convenient.
Example four
Fig. 8 is a schematic structural diagram of another management apparatus for CIRROS file system according to a fourth embodiment of the present invention. The apparatus 40 for managing a CIRROS file system provided in the fourth embodiment of the invention comprises a processor 41, a memory 42, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method for managing a CIRROS file system as described in the first or second embodiment when executing the computer program.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A management method of CIROS file system is applied to Linux operating system, and is characterized by comprising the following steps:
establishing a partition directory of a CIROS file system to store CIROS files with different data types;
establishing a directory record file in each partition directory to record file information of each CIROS file in the partition directory;
responding to the access or operation instruction of the user to the CIROS file system, and synchronously updating the corresponding directory record file.
2. The method for managing CIRROS file system of claim 1, wherein said creating a partition directory of the CIRROS file system for storing CIRROS files of different data types comprises:
acquiring and decompressing an initial packed file of the CIROS file system;
dividing CIROS files with different data types according to the decompressed initial packed file;
and establishing a partition directory of the CIROS file system, and storing CIROS files of the same data type in each partition directory.
3. The method for managing CIRROS file system of claim 2, wherein said data types include program data, user configuration data, and temporal data.
4. The method for managing CIRROS file system of claim 1, wherein said creating a directory record file in each of said partition directories for recording file information of CIRROS files in said partition directory comprises:
starting a main program of the CIROS file system, and scanning each partition directory;
when a directory recording file does not exist in any partition directory, creating a target recording file aiming at the partition directory;
and traversing the CIROS files in the partition directory, and storing the file information of each CIROS file into the target record file.
5. The method for managing CIRROS file system of claim 1, wherein said responding to a user's access or operating command to said CIRROS file system and updating the corresponding directory record file synchronously comprises:
responding an access instruction of a user to a CIROS file, and converting block address access of the CIROS file into access based on address offset in the file so as to finish access to the CIROS file;
responding to an operation instruction of a user on the CIROS file to complete the operation on the CIROS file; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file;
and after the operation on the CIROS file is finished, synchronously updating the directory record file of the partition directory to which the CIROS file belongs.
6. The method of managing CIRROS file system of claim 1, wherein said method of managing CIRROS file system further comprises the steps of:
when detecting that a USB memory is inserted, establishing a directory record file in the USB memory so as to record file information of a CIROS file in the USB memory;
responding to the access or operation of a user to the USB memory, and synchronously updating the directory record file of the USB memory; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
7. The method for managing CIRROS file system of claim 6, wherein said creating a directory record file in said USB memory to record file information of CIRROS files in said USB memory when insertion of USB memory is detected, comprises:
when the USB memory is inserted, reporting a notification event of the movable memory;
starting a main program of the CIROS file system, and scanning the USB memory;
when the directory record file does not exist in the USB memory, creating a target record file aiming at the USB memory;
and traversing the CIROS files in the USB memory, and storing the file information of each CIROS file into a target record file of the USB memory.
8. The method for managing CIRROS file system of any of claims 1-7, wherein said file information includes file name, file attribute, file version number, file size, file last modified date.
9. A management device of CIROS file system is applied to Linux operating system, and is characterized by comprising:
the partition directory establishing module is used for establishing a partition directory of the CIROS file system so as to store CIROS files with different data types;
the directory record file establishing module is used for establishing a directory record file in each partition directory so as to record the file information of each CIROS file in the partition directory;
and the user instruction response module is used for responding to the access or operation instruction of the user to the CIROS file system and synchronously updating the corresponding directory record file.
10. Apparatus for managing a CIRROS file system, comprising a processor, a memory, and a computer program stored in said memory and configured to be executed by said processor, said processor when executing said computer program implementing a method for managing a CIRROS file system as claimed in any of claims 1-8.
CN202010042147.2A 2020-01-15 2020-01-15 Management method and device of CIRROS file system Active CN111258503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010042147.2A CN111258503B (en) 2020-01-15 2020-01-15 Management method and device of CIRROS file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010042147.2A CN111258503B (en) 2020-01-15 2020-01-15 Management method and device of CIRROS file system

Publications (2)

Publication Number Publication Date
CN111258503A true CN111258503A (en) 2020-06-09
CN111258503B CN111258503B (en) 2024-04-05

Family

ID=70945149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010042147.2A Active CN111258503B (en) 2020-01-15 2020-01-15 Management method and device of CIRROS file system

Country Status (1)

Country Link
CN (1) CN111258503B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416641A (en) * 2021-12-31 2022-04-29 北京五八信息技术有限公司 File data processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216850A (en) * 2008-01-11 2008-07-09 清华大学 File systems accessing register dynamic collection method
CN103383660A (en) * 2013-04-01 2013-11-06 华为终端有限公司 Method and device for realizing functions of cache partition of Android system as well as terminal equipment
US8903772B1 (en) * 2007-10-25 2014-12-02 Emc Corporation Direct or indirect mapping policy for data blocks of a file in a file system
US9569443B1 (en) * 2007-09-28 2017-02-14 Symantec Corpoartion Method and apparatus for providing access to data in unsupported file systems and storage containers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9569443B1 (en) * 2007-09-28 2017-02-14 Symantec Corpoartion Method and apparatus for providing access to data in unsupported file systems and storage containers
US8903772B1 (en) * 2007-10-25 2014-12-02 Emc Corporation Direct or indirect mapping policy for data blocks of a file in a file system
CN101216850A (en) * 2008-01-11 2008-07-09 清华大学 File systems accessing register dynamic collection method
CN103383660A (en) * 2013-04-01 2013-11-06 华为终端有限公司 Method and device for realizing functions of cache partition of Android system as well as terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈少强等: "《操作系统原理与应用(Linux)》", 中国纺织出版社, pages: 165 - 170 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416641A (en) * 2021-12-31 2022-04-29 北京五八信息技术有限公司 File data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111258503B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
US20180046553A1 (en) Storage control device and storage system
JP2671590B2 (en) retrieval method
CN108460045B (en) Snapshot processing method and distributed block storage system
US20180203606A1 (en) Method and device for writing data and acquiring data in a distributed storage system
KR100790991B1 (en) Method for managing metadata of file system using DBMS
CN108415986B (en) Data processing method, device, system, medium and computing equipment
CN107239480B (en) Method and apparatus for performing renaming operations for distributed file systems
US11899542B2 (en) File data access method, apparatus, and computer-readable storage medium
CN111258503A (en) Management method and device of CIROS file system
KR100637787B1 (en) Method and program for file information write processing
CN108629026A (en) A kind of update method of full-text index, device, equipment and storage medium
JPH0317753A (en) File access system
CN109918346A (en) A kind of creation method and device of file
KR102122968B1 (en) System and method for analyzing of application installation information
JP2903831B2 (en) Execution environment reproduction method
CN111090396A (en) File processing method and device and electronic equipment
JP4701611B2 (en) Memory management method for dynamic conversion emulators
JP2850951B2 (en) Backup method
CN117130980B (en) Virtual machine snapshot management method and device
CN116431848B (en) Texture dynamic indexing method based on data pollution propagation analysis
CN115878563B (en) Method for realizing directory-level snapshot of distributed file system and electronic equipment
JP3178671B2 (en) File system and its file recovery method
JPH039426A (en) Software development environment storing system
CN109683914B (en) Flash burning method, upper computer and burning system
JP4410754B2 (en) File backup system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant