A method and device for implementing a copy-on-write file system

A file system and copy-on-write technology, applied in the file system and storage fields, can solve problems such as file system inconsistency, data corruption, etc., and achieve the effect of reducing disk seek time

Active Publication Date: 2018-05-18
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] When modifying data, the ordinary Linux file system will modify the original data on the disk. If the system crashes during the modification process, such as a power failure, the data will be damaged, resulting in inconsistency of the file system.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for implementing a copy-on-write file system
  • A method and device for implementing a copy-on-write file system
  • A method and device for implementing a copy-on-write file system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0038] The embodiment of the invention discloses a method and device for implementing a copy-on-write file system, so as to ensure that the file system is always in a consistent state and reduce unnecessary disk seek time.

[0039] see figure 1 , a method for implementing a copy-on-write file system provided by an embodiment of the present invention includes:

[0040] S101. Search for the first metadata with a dirty data flag in the memory;

[0041] Preferably, t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the present invention discloses a method and device for implementing a copy-on-write file system, including: searching for first metadata with a dirty data flag in memory; setting the lock flag of the first metadata; The dirty data corresponding to the first metadata allocates new disk space, and the dirty data is brushed down to the new disk space; the first metadata is written to the position corresponding to the new disk space In the adjacent metadata file; and the second metadata corresponding to the dirty data in the block map file is written in the metadata file, this kind of brushing the dirty data to the new disk space is not directly in the original The method of modifying disk data ensures that the file system is in a consistent state at all times, and writes metadata into metadata files, reducing unnecessary disk seek time.

Description

technical field [0001] The invention relates to the fields of storage and file systems, and more specifically, to a method and device for realizing a copy-on-write file system. Background technique [0002] When the ordinary linux file system modifies the data, it will modify the original data on the disk. If the system crashes during the modification process, such as a power failure, the data will be damaged, resulting in the inconsistency of the file system. When the Linux file system writes data, the head will go back and forth between the inode data and data data stored in the fixed area of ​​​​the disk for multiple operations, which increases the unnecessary disk seeks for this "read-modify-write" process. time. [0003] Therefore, how to ensure that the file system is in a consistent state at all times and reduce unnecessary disk seek time is a problem that needs to be solved now. Contents of the invention [0004] The object of the present invention is to provide ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F3/06
Inventor 苑忠科张会健李美欣
Owner INSPUR BEIJING ELECTRONICS INFORMATION IND
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products