CN111258503B - Management method and device of CIRROS file system - Google Patents

Management method and device of CIRROS file system Download PDF

Info

Publication number
CN111258503B
CN111258503B CN202010042147.2A CN202010042147A CN111258503B CN 111258503 B CN111258503 B CN 111258503B CN 202010042147 A CN202010042147 A CN 202010042147A CN 111258503 B CN111258503 B CN 111258503B
Authority
CN
China
Prior art keywords
file
cirros
directory
partition
record
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.)
Active
Application number
CN202010042147.2A
Other languages
Chinese (zh)
Other versions
CN111258503A (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

Classifications

    • 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
    • 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
    • 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 Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a management method of a CIRROS file system, which comprises the following steps: establishing partition directories of a CIRROS file system to store CIRROS files with different data types, establishing directory record files in each partition directory to record file information of each CIRROS file in the partition directory, responding to an access or operation instruction of a user to the CIRROS 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 CIRROS file system on the Linux operating system can be realized, so that a developer can conveniently develop programs on the Linux operating system by using the CIRROS file system, and the operation is more flexible and convenient.

Description

Management method and device of CIRROS file system
Technical Field
The present invention relates to the field of file system management technologies, and in particular, to a method and an apparatus for managing a cisros file system.
Background
The CIRROS file system is a professional file system applied to the Harris program controlled exchange, can realize minimized I/O operation, has restorable characteristics and less memory occupation, is a reliable and efficient file system, and has been widely applied.
However, in practicing the present invention, the inventors found that the prior art has at least the following problems: the Linux operating system has been developed into a current mainstream operating system, and because the Linux operating system and the cirmos operating system have different access and operation modes to the file system, the cirmos file system can still only be operated and managed based on the cirmos operating system, and a developer cannot use the cirmos file system on the Linux operating system by using the original management method, so that the powerful functions of the Linux operating system cannot be combined, and the rapid development and the function expansion of the application program of the cirmos file system can be realized.
Disclosure of Invention
The invention aims to provide a management method and a management device for a CIRROS file system, which can realize the access and the use of the CIRROS file system on a Linux operating system and are convenient for a developer to develop programs by using the CIRROS file system on the Linux operating system.
To achieve the above objective, an embodiment of the present invention provides a management method of a cisros file system, applied to a Linux operating system, including:
establishing a partition catalog of a CIRROS file system to store CIRROS files with different data types;
establishing a directory record file in each partition directory to record file information of each CIRROS file in the partition directory;
responding to the access or operation instruction of the user to the CIRROS file system, and synchronously updating the corresponding directory record file.
As an improvement of the above solution, the creating a partition directory of the CIRROS file system for storing CIRROS files with different data types specifically includes:
acquiring and decompressing an initial package file of the CIRROS file system;
dividing CIRROS files with different data types according to the decompressed initial package files;
and establishing partition catalogues of the CIRROS file system, and storing CIRROS files with the same data type under each partition catalogue.
As an improvement of the above-described scheme, the data types include program data, user configuration data, and temporary data.
As an improvement of the above solution, the creating a directory record file in each partition directory to record file information of the CIRROS file in the partition directory specifically includes:
starting a main program of the CIRROS file system, and scanning each partition directory;
creating a directory record file for any partition directory when the directory record file does not exist in the partition directory;
and traversing the CIRROS files in the partition directory, and storing the file information of each CIRROS file into the directory record file.
As an improvement of the scheme, the response to the access or operation instruction of the user to the CIRROS file system and synchronously update the corresponding directory record file specifically comprises the following steps:
responding to an access instruction of a user to a CIRROS file, and converting block address access of the CIRROS file into access based on address offset in the file so as to finish access to the CIRROS file;
responding to an operation instruction of a user on a CIRROS file to finish the operation on the CIRROS file; wherein the operations include, but are not limited to, opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file;
and after the CIRROS file is operated, synchronously updating the directory record file of the partition directory to which the CIRROS file belongs.
As an improvement of the above solution, the management method of the CIRROS file system further includes the steps of:
when the insertion of the USB memory is detected, establishing a catalog record file in the USB memory so as to record file information of CIRROS files 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; including, but not limited to, opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file.
As an improvement of the above solution, when the USB memory insertion is detected, a directory record file is created in the USB memory to record file information of the CIRROS file in the USB memory, and specifically includes:
when the USB memory is inserted, reporting a movable memory notification event;
starting a main program of the CIRROS file system, and scanning the USB memory;
creating a directory record file for the USB memory when the directory record file does not exist in the USB memory;
traversing the CIRROS files in the USB memory, and storing the file information of each CIRROS file into a directory 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 CIRROS file system, which is applied to the Linux operating system and comprises the following components:
the partition directory establishing module is used for establishing partition directories of the CIRROS file system so as to store CIRROS 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 CIRROS 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 CIRROS file system and synchronously updating the corresponding directory record file.
The embodiment of the invention also provides a management device of the CIRROS file system, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the management method of the CIRROS file system is realized when the processor executes the computer program.
Compared with the prior art, the management method and the management device for the CIRROS file system are disclosed by the invention, through establishing the partition catalogue of the CIRROS file system to store CIRROS files with different data types, and establishing catalog record files in each partition catalogue to record the file information of each CIRROS file in the partition catalogue, responding to the access or operation instruction of a user to the CIRROS file system, and synchronously updating the corresponding catalog record files. Therefore, the access and the use of the CIRROS file system on the Linux operating system are realized, a developer can conveniently develop programs by using the CIRROS file system on the Linux operating system, and the operation is more flexible and convenient.
Drawings
FIG. 1 is a flowchart illustrating a method for managing a CIRROS file system according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S11 in the first embodiment of the present invention;
FIG. 3 is a flowchart of step S12 in the first embodiment of the present invention;
fig. 4 is a schematic flow chart of step S13 in the first embodiment of the invention;
FIG. 5 is a flowchart illustrating a management method of a CIRROS file system according to a second embodiment of the present invention;
fig. 6 is a schematic flow chart of step S21 in the second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a management device of a cisros file system according to the third embodiment of the present invention;
fig. 8 is a schematic structural diagram of another management apparatus for a cismos file system according to the fourth embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a flowchart of a method for managing a cismos file system according to an embodiment of the present invention is shown. The file system is a system for organizing and distributing the space of the file storage device, and is responsible for storing files and protecting and searching stored files. The CIRROS file system is a professional file system applied to the program controlled exchange and has the characteristics of high reliability, high operation efficiency and the like. The first embodiment of the invention provides a management method of a CIRROS file system, which is applied to a Linux operating system and specifically comprises the following steps S11 to S13:
s11, establishing a partition directory of the CIRROS file system to store CIRROS files with different data types.
S12, establishing a catalog record file in each partition catalog so as to record the file information of each CIRROS file in the partition catalog.
S13, responding to an access or operation instruction of a user to the CIRROS file system, and synchronously updating the corresponding directory record file.
In the embodiment of the invention, the partition frame of the CIRROS file system is extracted from the Linux operating system and converted into the directory structure of the Linux operating system, so that the partition directory of the CIRROS file system is established to store CIRROS files with different data types. And establishing a directory record file CIRROS.DIR for each partition directory, wherein the directory record file CIRROS.DIR is used for recording the file information of each CIRROS file in the partition directory. When a user runs and manages the CIRROS file system on a Linux operating system, responding to access or operation instructions of the user, completing access and operation of any CIRROS file, and simultaneously updating corresponding file information in a directory record file CIRROS. DIR of a partition directory to which the CIRROS file belongs according to the operation of the user on the CIRROS file.
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 attribute is used for describing the access state of the CIRROS files, and each CIRROS file has 16-bit file attribute and is used for representing the read-only, writable, protected, invisible and other attributes of the CIRROS file. The file attributes are not mutually repulsed and can be simultaneously effective. The file version number is version information carried by each CIRROS file, and the files with the same name can have 99 versions at most, namely the range of the file version v is 1-99, and the files with the highest versions are used by default.
Preferably, the user's operations on the CIRROS files include, but are not limited to, operations on opening, closing, modifying, creating, deleting, copying, and moving the CIRROS files.
Specifically, referring to fig. 2, a flow chart of step S11 in the first embodiment of the present invention is shown, in order to more flexibly and efficiently establish the partition directory of the CIRROS file system to store the CIRROS files with 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 package file of the CIRROS file system;
s112, dividing CIRROS files with different data types according to the decompressed initial package file;
s113, establishing partition catalogues of the CIRROS file system, and storing CIRROS files with the same data type under each partition catalogue.
Preferably, the data types include program data, user configuration data, and temporary data.
In the embodiment of the invention, the initial package file of the CIRROS file system is obtained, and the initial file information of the initial package file is recorded, wherein the initial file information comprises file attributes, file version numbers, file sizes and file last modification dates. In the Linux operating system, the initial package file is decompressed, and each cirmos file in the cirmos file system is divided into different data types, specifically into program data, user configuration data and temporary data. Establishing an f3/f4/f5 partition directory as a partition directory of the CIRROS file system, wherein the f3 partition directory is used for storing program data; f4, the partition directory is used for storing user configuration data; f5 partition directory is used to store temporary data.
Referring to fig. 3, a flow chart of step S12 in the first embodiment of the present invention is shown. In order to provide an effective method for creating a directory record file, step S12 of the first embodiment of the present invention is performed by steps S121 to S123:
s121, starting a main program of the CIRROS file system, and scanning each partition directory;
s122, when no directory record file exists in any partition directory, creating a directory record file for the partition directory;
s123, traversing the CIRROS files in the partition directory, and storing the file information of each CIRROS file into the directory record file.
In the embodiment of the invention, when the main program FSMAIN of the CIRROS file system starts to run, each partition directory of the CIRROS file system is scanned, and whether a directory record file exists or not is judged. When a certain partition directory is scanned to have no directory record file CIRROS.DIR, a CIRROS.DIR file is created, the CIRROS file in the partition directory is traversed, file information such as the file name, the file attribute, the file version number, the file size, the last file modification date and the like of each file is recorded in the CIRROS.DIR file, and the CIRROS.DIR file is updated in real time.
Referring to fig. 4, a flow chart of step S13 in the first embodiment of the present invention is shown. In order to more efficiently and simply implement the operation and management of the CIRROS file system in the Linux operating system, step S13 of the first embodiment of the present invention is performed by steps S131 to S133:
s131, responding to an access instruction of a user to the CIRROS file, and converting block address access of the CIRROS file into access based on address offset in the file so as to finish access to the CIRROS file.
In the original CIRROS operating system, the CIRROS file takes a block (block) as a unit, and the CIRROS file is accessed by converting the block address into cylinder (cylinder), disc (cylinder) and sector (sector) addresses in a disk and then accessing the physical storage space of the disk through an IDE hard disk drive.
In the embodiment of the invention, the direct access and use of the content of the CIRROS file can be realized through the file operation command of the Linux operating system by the main program FSMAIN of the CIRROS file system. Specifically, when an access instruction of a user is received, block access in a CIRROS file system is converted into access based on address offset in a file, and the CIRROS file under a specific partition directory can be accessed by accurately positioning the partition directory, wherein the address in the file is obtained by converting an original block (block) address into offset relative to the start of the file. According to the embodiment of the invention, when the access to the CIRROS file system is realized in the Linux operating system, the hard disk drive is not required to be operated to access in a sector and block mode, the partition operation of the disk is shielded, the track, sector and block operation of file data is shielded, and the convenience of user operation and the safety of accessing the data are improved by converting the operation into standard Linux file operation.
S132, responding to an operation instruction of a user on the CIRROS file to finish the operation on the CIRROS file; including, but not limited to, opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file.
Specifically, after a user accesses a certain CIRROS file, operations such as opening, closing, modifying, creating, deleting, copying, moving and the like can be performed on the CIRROS file, so that operation and management of the CIRROS file are realized. For example, modifications may be made to the file name, file content, and file format of the CIRROS file. The developer can use the powerful functions of the Linux system to develop programs, expand functions and the like by using the CIRROS file system.
S133, after the CIRROS file is operated, synchronously updating the directory record file of the partition directory to which the CIRROS file belongs.
After the user performs operations such as opening, closing, modifying, creating, deleting, copying and moving the CIRROS file, according to the operation content and the operation result of the user, the directory record file CIRROS. Dir corresponding to the partition directory to which the CIRROS file belongs also performs updating of corresponding file information, so as to maintain the accuracy and effectiveness of the directory record file.
The first embodiment of the invention provides a management method of a CIRROS file system, which is applied to a Linux operation system, and is characterized in that a partition catalog of the CIRROS file system is built to store CIRROS files with different data types, and a catalog record file is built in each partition catalog to record file information of each CIRROS file in the partition catalog, respond to an access or operation instruction of a user to the CIRROS file system, and synchronously update corresponding catalog record files. Therefore, the access and the use of the CIRROS file system on the Linux operating system are realized, a developer can conveniently develop programs by using the CIRROS file system on the Linux operating system, and the operation is more flexible and convenient.
Example two
Referring to fig. 5, a flowchart of a management method of a cisros file system according to a second embodiment of the present invention is shown. The management method of the CIRROS file system provided in the second embodiment of the present 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, establishing a catalog record file in the USB memory so as to record file information of the CIRROS file in the USB memory.
The existing CIRROS file system cannot access the USB memory, and the operation and management of the CIRROS file system cannot be realized by using the USB memory. In the second embodiment of the present invention, when the USB memory is inserted, the CIRROS file system may be automatically triggered to create and maintain the partition directory for the USB memory, so as to implement storage and management of the CIRROS file by the USB memory.
Referring to fig. 6, a flow chart of step S21 in the second embodiment of the present invention is shown. Step S21 of the second embodiment of the present invention is performed by steps S211 to S214:
s211, when the USB memory is inserted, reporting a movable memory notification event.
S212, starting a main program of the CIRROS file system, and scanning the USB memory.
S213, when the catalog record file does not exist in the USB memory, creating the catalog record file for the USB memory.
S214, traversing the CIRROS files in the USB memory, and storing the file information of each CIRROS file into a directory 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 a movable memory notification event. And obtaining the position information of the USB memory by detecting a movable memory notification event of the Linux operating system. And when the scanning result shows that the USB memory does not have the directory record file CIRROS.DIR, the directory record file CIRROS.DIR is created in the USB memory and is used for recording file information such as file name, file attribute, file version number, file size, file last modification date and the like of the CIRROS file in the USB memory.
S22, responding to the access or operation of a user to the USB memory, and synchronously updating the catalog record file of the USB memory; including, but not limited to, opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file.
And creating a catalog record file in the USB memory, further realizing access or operation of the USB memory, and updating corresponding file information of the catalog record file of the USB memory according to the operation content and the operation result of a user. The embodiment of the invention can realize direct copying and moving of the CIRROS file in the system disk and the USB memory, and the like, thereby realizing the beneficial effects of spreading and backing up the CIRROS file by using the USB memory.
The second embodiment of the invention provides a management method of a CIRROS file system, which is applied to a Linux operation system, and is characterized in that a partition catalog of the CIRROS file system is built to store CIRROS files with different data types, and a catalog record file is built in each partition catalog to record file information of each CIRROS file in the partition catalog, respond to an access or operation instruction of a user to the CIRROS file system, and synchronously update corresponding catalog record files. When the insertion of the USB memory is detected, a catalog record file is established in the USB memory so as to record the file information of the CIRROS file in the USB memory, respond to the access or operation of a user to the USB memory and synchronously update the catalog record file of the USB memory. The embodiment of the invention can realize the access and the use of the CIRROS file system on the Linux operating system, and is convenient for a developer to develop programs by applying the CIRROS file system on the Linux operating system. Meanwhile, the access and the operation of the CIRROS file system on the USB memory can be realized, so that the transmission and the backup of the CIRROS file are realized by utilizing the USB memory, and the operation is more flexible and convenient.
Example III
Referring to fig. 7, a schematic structural diagram of a management apparatus for a cisros file system according to a third embodiment of the present invention is shown. The management device 30 of the CIRROS file system provided in the third embodiment of the present invention includes: a partition directory creation module 31, a directory record file creation module 32, and a user instruction response module 33, wherein,
the partition directory establishing module 31 is configured to establish a partition directory of the CIRROS file system to store CIRROS files with 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 access or operation instruction of a user to the CIRROS file system, and synchronously update a corresponding directory record file.
Further, the directory record file creation module 32 is further configured to create a directory record file in the USB memory when the USB memory insertion 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 an access or an operation of the USB memory by a user, and synchronously update a directory record file of the USB memory; including, but not limited to, opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file.
In a preferred embodiment, the partition directory creation module 31 includes: a package file decompression unit 311, a data type division unit 312, and a partition directory creation unit 313, wherein,
the package file decompressing unit 311 is configured to obtain and decompress an initial package file of the CIRROS file system;
the data type dividing unit 312 is configured to divide the CIRROS files with different data types according to the decompressed initial package file;
the partition directory creating unit 313 is configured to create partition directories of the cirmos file system, and store the cirmos file with the same data type in each partition directory.
In a preferred embodiment, the directory record file creation module 32 includes a partition directory scanning unit 321, a directory record file creation unit 322, and a file traversing unit 323. Wherein,
the partition directory scanning unit 321 is configured to start a main program of the CIRROS file system, and scan each partition directory;
the directory record file creating unit 322 is configured to create a directory record file for any of the partition directories when the directory record file does not exist in the partition directory;
the file traversing unit 323 is configured to traverse the CIRROS files in the partition directory, and store the file information of each CIRROS file into the directory 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 record file update unit 333. Wherein,
the access instruction response unit 331 is configured to respond to an access instruction of a user to a cirmos file, and convert block address access of the cirmos file into access based on address offset in the file, so as to complete access to the cirmos file;
the operation instruction response unit 332 is configured to respond to an operation instruction of a user on a CIRROS file, so as 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 the CIRROS file;
the directory record file updating unit 333 is configured to synchronously update the directory record file of the partition directory to which the CIRROS file belongs after the operation on the CIRROS file is completed.
It should be noted that, the management device of the CIRROS file system provided in the embodiment of the present invention is configured to execute all the flow steps of the management method of the CIRROS file system in the first or second embodiment, and the working principles and the beneficial effects of the two are in one-to-one correspondence, so that the description is omitted.
The third embodiment of the invention provides a management device of a CIRROS file system, which is applied to a Linux operating system, and is used for storing CIRROS files with different data types by establishing partition directories of the CIRROS file system, establishing directory record files in each partition directory to record file information of each CIRROS file in the partition directory, responding to an access or operation instruction of a user to the CIRROS file system, and synchronously updating corresponding directory record files. When the insertion of the USB memory is detected, a catalog record file is established in the USB memory so as to record the file information of the CIRROS file in the USB memory, respond to the access or operation of a user to the USB memory and synchronously update the catalog record file of the USB memory. The embodiment of the invention can realize the access and the use of the CIRROS file system on the Linux operating system, and is convenient for a developer to develop programs by applying the CIRROS file system on the Linux operating system. Meanwhile, the access and the operation of the CIRROS file system on the USB memory can be realized, so that the transmission and the backup of the CIRROS file are realized by utilizing the USB memory, and the operation is more flexible and convenient.
Example IV
Referring to fig. 8, a schematic structural diagram of another management apparatus for a cisros file system according to the fourth embodiment of the present invention is shown. The management device 40 of the cirmos file system provided in the fourth embodiment of the present invention includes a processor 41, a memory 42, and a computer program stored in the memory and configured to be executed by the processor, where the management method of the cirmos file system described in the first or second embodiment is implemented when the processor executes the computer program.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps 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 (RandomAccessMemory, RAM), or the like.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (8)

1. The management method of the CIRROS file system is applied to a Linux operating system and is characterized by comprising the following steps of:
establishing a partition catalog of a CIRROS file system to store CIRROS files with different data types;
establishing a directory record file in each partition directory to record file information of each CIRROS file in the partition directory;
responding to an access or operation instruction of a user to the CIRROS file system, and synchronously updating corresponding directory record files;
the response to the access or operation instruction of the user to the CIRROS file system and synchronously update the corresponding directory record file specifically comprises the following steps:
responding to an access instruction of a user to a CIRROS file, and converting block address access of the CIRROS file into access based on address offset in the file so as to finish access to the CIRROS file;
responding to an operation instruction of a user on a CIRROS file to finish the operation on the CIRROS file;
after the CIRROS file is operated, synchronously updating the directory record file of the partition directory to which the CIRROS file belongs;
the establishing a partition directory of the CIRROS file system to store CIRROS files with different data types specifically comprises the following steps:
acquiring and decompressing an initial package file of the CIRROS file system;
dividing CIRROS files with different data types according to the decompressed initial package files;
establishing partition catalogues of the CIRROS file system, and storing CIRROS files with the same data type under each partition catalogue;
establishing a directory record file in each partition directory to record file information of each CIRROS file in the partition directory, wherein the method specifically comprises the following steps:
starting a main program of the CIRROS file system, and scanning each partition directory;
creating a directory record file for any partition directory when the directory record file does not exist in the partition directory;
and traversing the CIRROS files in the partition directory, and storing the file information of each CIRROS file into the directory record file.
2. The method of managing a CIRROS file system of claim 1, wherein the data types comprise program data, user configuration data, and temporary data.
3. The method of managing a CIRROS file system of claim 1, wherein the operations comprise opening, closing, modifying, creating, deleting, copying, and moving a CIRROS file.
4. The method for managing a cirmos file system of claim 1, wherein the method for managing a cirmos file system further comprises the steps of:
when the insertion of the USB memory is detected, establishing a catalog record file in the USB memory so as to record file information of CIRROS files 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 opening, closing, modifying, creating, deleting, copying, and moving the CIRROS file.
5. The method for managing a CIRROS file system according to claim 4, wherein when the USB memory insertion is detected, creating a directory record file in the USB memory to record file information of the CIRROS file in the USB memory, specifically comprising:
when the USB memory is inserted, reporting a movable memory notification event;
starting a main program of the CIRROS file system, and scanning the USB memory;
creating a directory record file for the USB memory when the directory record file does not exist in the USB memory;
traversing the CIRROS files in the USB memory, and storing the file information of each CIRROS file into a directory record file of the USB memory.
6. The method for managing a CIRROS file system according to any of claims 1 to 5, wherein the file information comprises a file name, a file attribute, a file version number, a file size, and a file last modification date.
7. A management device of a CIRROS file system, applied to a Linux operating system, comprising:
the partition directory establishing module is used for establishing partition directories of the CIRROS file system so as to store CIRROS 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 CIRROS file in the partition directory;
the user instruction response module is used for responding to the access or operation instruction of the user to the CIRROS file system and synchronously updating the corresponding directory record file;
the user instruction response module comprises an access instruction response unit, an operation instruction response unit and a catalog record file updating unit; wherein,
the access instruction response unit is used for responding to an access instruction of a user to the CIRROS file, converting block address access of the CIRROS file into access based on address offset in the file, and completing access to the CIRROS file;
the operation instruction response unit is used for responding to an operation instruction of a user on the CIRROS file so as to finish the operation on the CIRROS file;
the catalog record file updating unit is used for synchronously updating the catalog record file of the partition catalog to which the CIRROS file belongs after the CIRROS file is operated;
the partition catalog establishing module comprises a packed file decompressing unit, a data type dividing unit and a partition catalog establishing unit; wherein,
the package file decompressing unit is used for acquiring and decompressing an initial package file of the CIRROS file system;
the data type dividing unit is used for dividing CIRROS files with different data types according to the decompressed initial package file;
the partition catalog establishing unit is used for establishing partition catalogs of the CIRROS file system and storing CIRROS files with the same data type under each partition catalog;
the catalog record file establishing module comprises a partition catalog scanning unit, a catalog record file creating unit and a file traversing unit; wherein,
the partition catalog scanning unit is used for starting a main program of the CIRROS file system and scanning each partition catalog;
the catalog record file creating unit is used for creating a catalog record file aiming at any subarea catalog when the catalog record file does not exist in any subarea catalog;
the file traversing unit is used for traversing the CIRROS files in the partition directory and storing the file information of each CIRROS file into the directory record file.
8. A management apparatus of a cirmos file system, characterized by comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the management method of the cirmos file system according to any of claims 1 to 6 when executing the computer program.
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 CN111258503A (en) 2020-06-09
CN111258503B true 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)

Families Citing this family (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)》.中国纺织出版社,2018,第165-170页. *

Also Published As

Publication number Publication date
CN111258503A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US10430286B2 (en) Storage control device and storage system
US7836105B2 (en) Converting file-systems that organize and store data for computing systems
US9128940B1 (en) Method and apparatus for performing file-level restoration from a block-based backup file stored on a sequential storage device
US8180984B1 (en) System and method for consolidation of backups
KR100790991B1 (en) Method for managing metadata of file system using DBMS
US20080027998A1 (en) Method and apparatus of continuous data protection for NAS
JP2002055995A (en) Method and device for information processing
US20030163449A1 (en) File managing method
JPH09506453A (en) Incremental backup system
MXPA05011696A (en) Method and system for maintaining namespace consistency with a file system.
KR20000022716A (en) Efficient volume copy using pre-configuration of log structured target storage
JP4755244B2 (en) Information generation method, information generation program, and information generation apparatus
US11899542B2 (en) File data access method, apparatus, and computer-readable storage medium
WO2007026484A1 (en) Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program
CN111258503B (en) Management method and device of CIRROS file system
KR100637787B1 (en) Method and program for file information write processing
KR20010020962A (en) Method and apparatus for processing recursive hard links in a data processing system
JP2006251990A (en) Database reorganization program and database reorganization method
JP4390618B2 (en) Database reorganization program, database reorganization method, and database reorganization apparatus
CN109918346A (en) A kind of creation method and device of file
CN114880277B (en) Block device snapshot method, system and storage medium
US7761449B2 (en) Self-disentangling data storage technique
JP2850951B2 (en) Backup method
FI3912021T3 (en) Dynamic creation of compatibility between file systems in real time
KR20210156682A (en) How to manage meta-data of a file system using a database management system

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