WO2015161443A1 - 一种文件管理方法及文件系统 - Google Patents

一种文件管理方法及文件系统 Download PDF

Info

Publication number
WO2015161443A1
WO2015161443A1 PCT/CN2014/075939 CN2014075939W WO2015161443A1 WO 2015161443 A1 WO2015161443 A1 WO 2015161443A1 CN 2014075939 W CN2014075939 W CN 2014075939W WO 2015161443 A1 WO2015161443 A1 WO 2015161443A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
storage medium
management
access
mode
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.)
Ceased
Application number
PCT/CN2014/075939
Other languages
English (en)
French (fr)
Inventor
徐君
朱冠宇
罗彩珠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to JP2016563933A priority Critical patent/JP6378364B2/ja
Priority to KR1020167032105A priority patent/KR101914260B1/ko
Priority to EP14890404.8A priority patent/EP3125124B1/en
Priority to PCT/CN2014/075939 priority patent/WO2015161443A1/zh
Priority to CN201480001249.2A priority patent/CN105264497B/zh
Priority to BR112016024412-5A priority patent/BR112016024412B1/pt
Publication of WO2015161443A1 publication Critical patent/WO2015161443A1/zh
Priority to US15/331,205 priority patent/US10339100B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/185Hierarchical storage management [HSM] systems, e.g. file migration or policies thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • G06F3/0649Lifecycle management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0683Plurality of storage devices
    • G06F3/0688Non-volatile semiconductor memory arrays
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0608Saving storage space on storage systems

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a file management method and a file system.
  • phase change memory Phase change memory
  • the file system identifies the file type according to the file name or the information embedded in the file, and allocates different granularity storage media to the file.
  • the file management mode is determined, which is relatively fixed.
  • the embodiment of the invention provides a file management method and a file system, and implements a dynamic adjustment of the current management mode of the file according to the access mode of the file.
  • a first aspect of the embodiments of the present invention provides a file management method, including:
  • the file management policy includes at least one of the following information: file management granularity and file a type of the storage medium, where the pattern matching library includes a correspondence between a 10 access mode and a file management policy;
  • the current management mode of the file is adjusted, so that the adjusted current management mode and the determined 10 access mode are adjusted.
  • the corresponding file management policy is consistent.
  • the determining, by the determining, the access mode corresponding to the 10 access information includes:
  • the 10 access mode is a mode of a read operation
  • the write operation ratio of the 10 access information to the file is greater than a preset value, determining that the 10 access mode is a mode of a write operation
  • the 10 access mode is a mode of a read/write hybrid operation.
  • the current management manner of the file is When the file management policies corresponding to the determined 10 access modes are inconsistent, adjust the current management mode of the file, including:
  • the management granularity of the file is updated
  • the metadata of the file is updated such that the updated metadata includes information of the updated management granularity.
  • the current management manner of the file is If the file management policies corresponding to the determined 10 access modes are inconsistent, adjust the current management mode of the file, including:
  • the target storage medium is a storage medium that is consistent with the type of the file storage medium included in the file management policy
  • New metadata is created such that the new metadata includes storage information of the migrated file.
  • the method further includes:
  • the file of the requested operation When the file of the requested operation is operated according to the 10 access request for operating the file, if the first part of the file of the requested operation is not stored on the source storage medium, and the second part of the file is stored On the source storage medium, corresponding to the 10 access mode
  • the type of the file storage medium in the file management policy the first part of the file in the migrated target storage medium is operated, and the second part of the file on the source storage medium is operated.
  • a second aspect of the embodiments of the present invention provides a file system, including:
  • An information obtaining unit configured to acquire input and output 10 access information for operating the file; and an access mode determining unit, configured to determine 10 access modes corresponding to the 10 access information acquired by the information acquiring unit;
  • a management obtaining unit configured to perform a file management policy corresponding to the 10 access mode presets determined by the access mode determining unit, and obtain a file management policy corresponding to the determined 10 access mode, where the file management policy includes at least one of the following Information: a file management granularity and a type of a file storage medium, where the pattern matching library includes a correspondence between a 10 access mode and a file management policy;
  • An adjusting unit configured to: when a current management manner of the file is determined by the management acquiring unit
  • the current management mode of the file is adjusted, so that the adjusted current management mode and the file management policy corresponding to the determined 10 access mode are consistent.
  • the access mode determining unit is configured to determine that the 10 access mode is a mode of a read operation if a read operation ratio of the file in the 10 access information acquired by the information acquiring unit is greater than a preset value; If the ratio of the write operation to the file in the 10 access information obtained by the information obtaining unit is greater than a preset value, determining that the 10 access mode is a mode of a write operation; if the information obtained by the information acquiring unit is in the access information If the write operation ratio of the file differs from the read operation ratio by less than a preset value, it is determined that the 10 access mode is a mode of read-write hybrid operation.
  • the adjusting unit includes:
  • An update unit configured to update a management granularity of the file if the file management granularity included in the obtained file management policy is inconsistent with a file management granularity in a current management manner of the file; and update metadata of the file,
  • the updated metadata is caused to include information of the updated management granularity.
  • the adjusting unit includes: a migration unit, configured to apply, to the target storage medium, a storage block for storing the file if the type of the file storage medium included in the obtained file management policy is inconsistent with the storage medium in the current management mode of the file; Migrating the file from the source storage medium to the storage block of the application; wherein the storage medium on which the file is currently located is a source storage medium, and the target storage medium is stored in a file included in the file management policy a storage medium of the same type of media;
  • a creating unit configured to create new metadata, so that the new metadata includes storage information of the migrated file of the migration unit.
  • the system further includes:
  • a file operation unit configured to: when the file of the requested operation is operated according to the 10 access request for operating the file, if the first part of the file of the requested operation is not stored on the source storage medium, The second part of the file is stored on the source storage medium, and the first part of the file in the migrated target storage medium is operated according to the type of the file storage medium in the file management policy corresponding to the 10 access mode. And operating on a second portion of the file on the source storage medium.
  • a third aspect of the embodiments of the present invention provides a file system, including: a processor respectively connected to a bus, and a plurality of memories, wherein:
  • the processor is configured to obtain input and output 10 access information for operating the file, determine 10 access modes corresponding to the acquired 10 access information, and match the determined 10 access mode with a preset pattern matching library.
  • Obtaining a file management policy corresponding to the determined 10 access mode where the file management policy includes at least one of the following: a file management granularity and a file storage medium type, where the mode matching library includes 10 access modes and file management.
  • Corresponding relationship of the policy when the current management mode of the file is inconsistent with the file management policy corresponding to the determined 10 access mode, adjusting a current management mode of the file, so that the adjusted current management mode and the The file management policy corresponding to the determined 10 access mode is consistent;
  • the file storage medium is the memory.
  • the processor is configured to determine, if the read operation ratio of the file in the obtained 10 access information is greater than a preset value, the mode of the 10 access mode as a read operation; Determining, in the access information, that the write operation ratio of the file is greater than a preset value, determining that the 10 access mode is a mode of a write operation; if the acquired 10 access information has a write operation ratio and reading to the file If the operation ratio differs by less than the preset value, it is determined that the 10 access mode is a mode of the read-write hybrid operation.
  • the processor is configured to update a management granularity of a file in the memory if the file management granularity included in the obtained file management policy is inconsistent with a file management granularity in a current management manner of a file stored in the memory;
  • the metadata of the file is updated such that the updated metadata includes information of the updated management granularity.
  • the processor is configured to: if the type of the file storage medium included in the obtained file management policy is inconsistent with the storage medium in the current management mode of the file stored in the memory, target to the plurality of memories
  • the storage medium applies for storing a storage block of the file; migrating the file from the plurality of storage source storage media to the storage block of the application; and creating a new element, wherein the file is currently located
  • the storage medium is a source storage medium
  • the target storage medium is a storage medium that is consistent with the type of the file storage medium included in the file management policy.
  • the processor is further configured to: when the file of the requested operation is operated according to the 10 access request for operating the file, if the first part of the file of the requested operation is not stored in the source storage medium And storing the second part of the file on the source storage medium, according to the type of the file storage medium in the file management policy corresponding to the 10 access mode, the first part of the file in the migrated target storage medium An operation is performed to operate the second partial file on the source storage medium.
  • the file system monitors 10 access information for file operations (such as read and write operations), determines the 10 access mode of the file, and determines corresponding corresponding according to the 10 access mode.
  • the file management strategy finally dynamically adjusts the current management mode of the file according to the file management policy.
  • different file management policies can be used according to different 10 access modes of the file, that is, different file management granularities and/or different file storage media are used, so that the access performance of the file is optimized. At the same time, give full play to the characteristics of the storage medium.
  • FIG. 1 is a flowchart of a file management method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of another file management method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a file system according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of file migration provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of another file system according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another file system according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another file system according to an embodiment of the present invention.
  • the embodiment of the present invention provides a file management method, which is mainly applied to a file system, and the file system can be carried on any terminal device or network device, and can include multiple types of storage media for storing various files.
  • a flowchart of the method of the example is shown in FIG. 1 and includes:
  • Step 101 Acquire input and output (IN/OUT, 10) access information for operating the file.
  • the 10 access information herein refers to information that the file system accesses the file in the storage medium, and may include: an identifier of the access process (PID), a file name , file offset (file offset), file size of 10 access requests per time, 10 access to the corresponding file operation type (such as read, write or query, etc.), 10 access request timestamp (start and end time).
  • Step 102 Determine a 10 access mode corresponding to the 10 access information obtained in step 101.
  • the process of the file operation can be triggered during the running of the application in the file system, for example, the file is read/written, and the module executing the application sends a 10 access request to the file system, the 10 access.
  • the request may include: information of the file of the requested operation (including read/write operations), etc., so that the file system can operate on the corresponding file.
  • the file When a file is written to the storage medium of the file system for the first time, the file can be operated multiple times, and the file system can monitor the 10 access information of the file and intercept 10 access information for the file operation, such as 10 access.
  • the type and number of times are 10 accesses to the sequential/random read operation of the file, 10 accesses to the sequential/random write operation of the file, read and write ratios, and the granularity of the file at each access, and may also include the file bias of the operation. Transfer amount.
  • the file system determines 10 access modes according to the obtained 10 access information.
  • the 10 access mode refers to a mode of what kind of granular operation the file performs, and may include: a mode of performing random read operations at a certain granularity, with a certain granularity.
  • the mode of performing sequential read operations the mode of random write operation with a certain granularity, the mode of sequential write operation with a certain granularity, the mode of sequentially reading and writing mixed operations with a certain granularity, and the random read and write hybrid operation with a certain granularity. Mode and other modes.
  • Step 103 Match the 10 access mode determined in step 102 with the pattern matching library preset in the file system to obtain a file management policy corresponding to the determined 10 access mode.
  • the file pattern matching library is preset in the file system, and may include a correspondence between a 10 access mode and a file management policy, where the file management policy includes a file management granularity and/or a type of the file storage medium.
  • the file management granularity refers to the minimum unit of file storage, such as 4k, 1MB, etc., and the types of file storage media are various, and may include a phase change memory, a dynamic random access memory (DRAM), and a hard disk drive (Hard Disk). Drive, HDD) and NAND FLASH. Wherein, since various types of storage media have respective read and write characteristics, different types of storage media correspond to different 10 access modes, specifically:
  • the phase-change memory is a kind of non-volatile memory device, which is byte-addressable like DRAM, has a high writing speed, and its writing durability is about 10 to 6 to 8 times 8 times. square.
  • the phase-change memory is suitable for smaller file management granularity, such as 64Byte-8KB, and is suitable for random, small-grained read and write operations.
  • NAND FLASH writes are in page units, and erases are in blocks (one block usually contains 64 or more pages). Therefore, NAND Flash is suitable for file management granularity in units of pages or blocks, such as 4KB, 8KB, 16KB, ..512KB, and suitable for larger random read operations. In addition, NAND Flash reads are much faster than writing.
  • the HDD is suitable for larger granular read and write operations, such as 1MB, 2MB, 4MB, etc.
  • the HDD is suitable for sequential read and write operations;
  • the access to the application file generally presents different access characteristics, such as video files, which are generally read and written sequentially, and each read and write has a larger granularity; for example, the database file presents a random, small-grained read, Write operation features. This access to different files presents different access features that can match different storage media and file management granularity.
  • the user may set a correspondence between the access mode and the file management policy in the pattern matching library of the file system in advance.
  • the 10 access mode is a file management policy corresponding to the mode of the 1MB to 4 MB granularity read operation.
  • File management granularity is 1MB
  • file storage media type is HDD or NAND FLASH.
  • Table 1 IO access information IO access mode file management policy file access granularity: 1MB read operation ratio >80%, with 1MB to 4 MB
  • Type of storage medium HDD, NAND 1MB -4MB granular sequential read operation
  • Granular random write operation Type of storage medium PCM, NAND 512Byte-4KB
  • FLASH file access granularity 4KB read operation ratio >80%, to 4KB to 64KB
  • Type of storage medium NAND 4KB -64KB granular random read operation
  • Type of storage medium PCM, NAND 16KB write hybrid operation
  • step 104 according to the file management policy obtained in step 103, the current management mode of the file is adjusted. Specifically, when the current management mode of the file is inconsistent with the file management policy corresponding to the determined 10 access mode, the current file is adjusted.
  • the management mode is such that the adjusted current management mode is consistent with the file management policy corresponding to the determined 10 access mode, such as changing the storage medium of the file, and/or changing the management granularity of the file.
  • the file system also stores the metadata of the file, the metadata includes file size and file identifier, etc., to facilitate searching for the file. After adjusting the current management mode of the file, the file system needs to be updated. Metadata stored in .
  • the appropriate file management granularity facilitates efficient file prefetching operations, improves the speed of operations on files, and facilitates efficient metadata management. For example, sequentially accessing files, writing 4MB files at a time, if using 2MB of file management granularity (ie, the minimum unit of a storage block is 2MB), only two data positionings are required and 10 access requests are sent twice to the storage medium, and It is only necessary to manage the metadata of the two storage blocks; if the file management granularity of 4 KB is used, 1000 data positioning is required and 1000 access requests need to be sent 1000 times to the storage medium, and metadata of 1000 storage blocks needs to be managed.
  • 2MB of file management granularity ie, the minimum unit of a storage block is 2MB
  • the file system monitors 10 access information for file operations, determines 10 access modes, and then determines a corresponding file management policy according to the 10 access mode, and finally obtains the current file management policy and the current file.
  • the current management mode of the file is dynamically adjusted according to the obtained file management policy.
  • different file management policies can be adopted according to different 10 access modes of the file, that is, different file management granularity and/or different file storage media are used, so that the access performance of the file is achieved. Optimal, while giving full play to the characteristics of storage media.
  • the file system performs the above step 104, according to the file management policy obtained in step 103, the following methods may be used:
  • step 104 If the file management granularity included in the file management policy obtained in step 103 is inconsistent with the file management granularity in the current management mode of the file, the file system performs step 104 when:
  • the management granularity of the update file is the file management granularity obtained in the above step 103.
  • A2 Update the metadata of the file so that the updated metadata includes the information of the updated management granularity.
  • step 104 If the type of the file storage medium included in the file management policy obtained in step 103 is inconsistent with the storage medium in the current management mode of the file, the file system performs the migration of the file storage medium when performing the above step 104, specifically Ground:
  • a storage block for storing the above file is requested from the target storage medium, which is a storage medium conforming to the type of the file storage medium included in the file management policy obtained in the above step 103.
  • the granularity of the storage block applied here may be determined by the file management granularity obtained in step 103 above. If the file management granularity is not included in the obtained file management policy, the granularity of the applied storage block may be that the file is in the file. The minimum unit stored in the source storage medium may also be the granularity suitable for the target storage medium. If the file management granularity is included in the obtained file management policy, the granularity of the applied storage block is the file in the file management policy. Manage granularity.
  • B2 Migrate the file from the source storage medium to the requested storage block, copy the file from the source storage medium, add it to the requested storage block, and delete the data of the file on the source storage medium.
  • the storage medium where the file is currently located is the source storage medium.
  • B3 Create new metadata, so that the new metadata includes storage information of the migrated files, such as file size and minimum unit of file storage.
  • the file system when the current management mode of the file is adjusted, the migration of the file storage medium is involved, and the file system still continuously operates the file through the storage medium in the process, that is, the file system performs the file according to the file.
  • the 10 access request of the operation performs corresponding operations (such as read and write operations) on the file of the requested operation.
  • the file system needs to determine whether the file of the requested operation has been migrated to the target storage medium before the file read/write operation, specifically, whether the requested operation is stored in the source storage medium.
  • the file management method of the present invention is applied to the file management method of the present invention in a specific embodiment.
  • the file management method in this embodiment is mainly applied to any file system, and the file system may include the structure shown in FIG. 3, including:
  • File access module also includes various types of storage media, such as HDD and PCM. among them:
  • a file access module configured to receive a 10 access request for operating the file, and operate the file requested by the access request in the file storage medium;
  • the file access module may receive the 10 access request sent by the file system through the user interface , can also receive 10 access requests sent by other modules in the file system;
  • the file 10 access statistics and mode analysis module is configured to monitor access of the file in the storage medium by the file access module, collect 10 access information for the file access module to operate on the storage medium, and analyze the 10 access mode;
  • the policy matching control module is configured to match different file management policies according to different 10 access modes, including file management granularity and type of file storage medium;
  • the metadata management module is used to update the metadata of the file after adjusting the current management mode of the file; the file data block adjustment, the migration module is used to adjust the file management granularity, and the file is migrated from one storage medium to another storage medium. .
  • the file system in this embodiment supports management methods of different granularities, such as 4K, 16 ⁇ , 64 ⁇ , 1 ⁇ , 2 ⁇ , and the like.
  • the file can be stored on one or more storage media at a certain granularity, such as 64 ; then the current management of the file is dynamically adjusted by the four modules shown in Figure 3 above.
  • the file is initially created, it is stored in the PCM with a file management granularity of 4 KB, and is dynamically adjusted; the file 1 is migrated to the HDD, and the file management granularity is 2 MB for storage.
  • the file system can migrate files with the source file management granularity on the source storage medium. For example, if the source storage medium has a file management granularity of 2 MB, the file system is migrated in units of 2 MB. Files, and files that are being migrated are locked and marked on the source storage media where they have been migrated; in addition, after file migration, the file system needs to create new metadata.
  • the file access module has 10 access requests for file operations, if some of the requested files have been migrated to the target storage medium, that is, not stored on the source storage medium, then the migrated The portion of the file in the target storage medium operates; if another portion of the file in the requested file has not been migrated to the target storage medium, the other portion of the file in the source storage medium is operated.
  • the embodiment of the present invention further provides a file system, where files are stored in a file system through a plurality of storage media, and a schematic structural diagram thereof is shown in FIG. 5, including:
  • the information obtaining unit 10 is configured to obtain input and output 10 access information for operating the file, and the access information includes a specific operation of the file, such as the number of accesses, whether the file is read 10 or the file is written. 10 accesses, read and write ratios, and granularity of read/write files per access.
  • the access mode determining unit 11 is configured to determine 10 access modes corresponding to the 10 access information acquired by the information acquiring unit 10.
  • the access mode determining unit 11 is configured to determine the 10 access mode if the read operation ratio of the file in the 10 access information acquired by the information acquiring unit 10 is greater than a preset value. a mode of a read operation; if the write operation ratio of the file in the 10 access information acquired by the information acquisition unit 10 is greater than a preset value, determining that the 10 access mode is a mode of a write operation; The ratio of the write operation ratio of the file to the read operation ratio in the 10 access information acquired by the obtaining unit 10 is less than a preset value, and then determining that the 10 access mode is a mode of the read-write hybrid operation.
  • the granularity of the read/write operation can also be included in the 10 access mode.
  • the management obtaining unit 12 is configured to match the 10 access mode determined by the access mode determining unit 11 with a preset pattern matching library to obtain a file management policy corresponding to the determined 10 access mode, where the file management policy includes At least one of the following information: file management granularity and type of file storage medium, and the pattern matching library includes a correspondence between 10 access patterns and file management policies.
  • the adjusting unit 13 is configured to adjust a current management manner of the file when the current management mode of the file is inconsistent with a file management policy corresponding to the 10 access mode determined by the management obtaining unit 12, so that the adjusted current The management mode is consistent with the file management policy corresponding to the determined 10 access mode, such as changing the storage medium of the file, and/or changing the management granularity of the file. Further, since the metadata of the file is also stored in the file system, information such as a file size and a file identifier is included in the metadata to facilitate searching for the file. When the adjustment unit 13 adjusts the current management mode of the file, Update the metadata stored in the file system.
  • the information acquiring unit 10 monitors 10 access information for file operations (including read and write operations), and determines the access mode by the access mode determining unit 11 to thereby manage the obtaining unit 12.
  • the corresponding file management policy is determined according to the 10 access mode, and finally the adjustment unit 13 dynamically adjusts the current management mode of the file according to the obtained file management policy.
  • different file management policies can be adopted according to different 10 access modes of the file, that is, different file management granularity and/or different file storage media are used, so that the access performance of the file is achieved. Optimal, at the same time can fully utilize the characteristics of the storage medium.
  • the file system may include a file operation unit 14 in addition to the structure shown in FIG. 5, and the adjustment unit 13 may pass through the update unit 131 and the migration unit. 132 and the creation unit 133 is implemented, specifically:
  • the updating unit 131 is configured to update the management granularity of the file to be managed if the file management granularity included in the file management policy obtained by the management obtaining unit 12 is inconsistent with the file management granularity in the current management mode of the file.
  • the metadata of the file is such that the updated metadata includes information of the updated management granularity.
  • the migration unit 132 is configured to: if the type of the file storage medium included in the file management policy obtained by the management obtaining unit 12 is inconsistent with the storage medium in the current management manner of the file, apply to the target storage medium for storing the a storage block of the file; the file is migrated from the source storage medium to the storage block of the application, wherein the storage medium on which the file is currently located is a source storage medium, and the target storage medium is a management policy with the file a storage medium of the same type of the file storage medium included in the file storage unit 133, configured to create new metadata, including the storage information of the migrated file of the migration unit 132, including the post-migration The information of the target storage medium where the file is located, and the management granularity of the file on the target storage medium.
  • the target storage medium is a storage medium that is consistent with the type of the file storage medium included in the file management policy acquired by the management obtaining unit 12, and the granularity of the applied storage block may be determined by the file management granularity obtained by the management obtaining unit 12. If the file management granularity is not included in the obtained file management policy, the granularity of the applied storage block may be the minimum unit in which the file is stored in the source storage medium, or the granularity suitable for the target storage medium.
  • a file operation unit 14 configured to: when the file of the requested operation is operated according to the 10 access request for operating the file, if the first part of the file of the requested operation is not stored on the source storage medium And the second part of the file is stored on the source storage medium, and the migrated target storage medium is obtained according to the type of the file storage medium in the file management policy corresponding to the 10 access mode determined by the management obtaining unit 12 The first portion of the file operates and operates on the second portion of the file on the source storage medium.
  • the adjustment unit 13 unit when the adjustment unit 13 unit performs the adjustment of the current management mode of the file, the current storage granularity of the file may be updated only by the update unit 131; or the file is removed from the migration unit 132 and the creation unit 133.
  • One storage medium ie, the source storage medium
  • the file operation unit 14 operates the file through the interface of the storage medium, it is necessary to first determine whether the file has been All are migrated to the target storage medium, and then processed accordingly.
  • the embodiment of the present invention further provides another file system, which can mainly manage files stored in the file system, and a schematic structural diagram thereof is shown in FIG. 7 , and includes a processor 21 respectively connected to the bus and A plurality of types of memories 22, such as HDD and PCM, and may also include input devices and output devices connected to the bus, specifically:
  • the memory 22 is used for storing files input from the input device, and can also store information such as necessary files for processing the data by the processor 21.
  • the memory 22 is the above-mentioned file storage medium; the input device and the output device are file systems. Ports that communicate with other devices may also include devices external to the file system such as displays, keyboards, mice, and printers.
  • the processor 21 is configured to acquire 10 access information for operating the file, determine 10 access modes corresponding to the acquired 10 access information, and match the determined 10 access mode with a preset pattern matching library to obtain the a file management policy corresponding to the 10 access mode, where the file management policy includes at least one of the following: a file management granularity and a file storage medium type, and the pattern matching library includes a correspondence between the 10 access mode and the file management policy. Relationship: when the current management mode of the file is inconsistent with the file management policy corresponding to the determined 10 access mode, adjust a current management mode of the file, so that the adjusted current management mode and the determined 10 The file management policy corresponding to the access mode is consistent.
  • the processor 21 When determining the 10 access mode, the processor 21 is configured to determine that the 10 access mode is a mode of a read operation if the read operation ratio of the file in the obtained 10 access information is greater than a preset value; If the ratio of write operations to the file in the obtained 10 access information is greater than a preset value, determining that the 10 access mode is a mode of a write operation; if the acquired 10 access information is for the file If the write operation ratio differs from the read operation ratio by less than a preset value, it is determined that the 10 access mode is a mode of read/write hybrid operation, and the granularity of the read/write operation may also be included in the 10 access mode.
  • the storage medium in the file system further stores metadata of the file, information such as a file size, a file identifier, and an inode number are included in the metadata to facilitate searching for the file, and when the processor 21 adjusts the current file. After the management method, you also need to update the metadata stored in the file system.
  • different file management policies can be used according to different 10 access modes, that is, different file management granularity and/or different file storage media are used, so that the access performance of the file is maximized. Excellent, at the same time can fully utilize the characteristics of the storage medium.
  • the processor 21 is configured to: if the file management granularity included in the obtained file management policy is inconsistent with the file management granularity in the current management manner of the file stored in the memory, update the The granularity of management of files in memory; updating the metadata of the files, The updated metadata is caused to include information of the updated management granularity.
  • the processor 21 is configured to: if the type of the file storage medium included in the obtained file management policy is inconsistent with the storage medium in the current management mode of the file stored in the memory, to the plurality of memories
  • the target storage medium applies for storing a storage block of the file; migrating the file from the plurality of storage source storage media to the application storage block; and creating new metadata, such that the new
  • the metadata includes storage information of the file after migration of the migration unit.
  • the storage medium on which the file is currently located is a source storage medium
  • the target storage medium is a storage medium that is consistent with the type of the file storage medium included in the file management policy.
  • the processor 21 operates the file through the interface of the storage medium, it is necessary to first determine whether the file has been completely migrated to the target storage medium, and then perform corresponding processing. Specifically, the processor 21 further When the file of the requested operation is operated according to the 10 access request for operating the file, if the first part of the file of the requested operation is not stored on the source storage medium, and the second part The file is stored on the source storage medium, and the first part of the file in the migrated target storage medium is operated according to the type of the file storage medium in the file management policy corresponding to the 10 access mode, The second part of the file on the source storage medium operates.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD, etc.

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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

一种文件管理方法及文件系统,应用于数据处理技术领域。文件系统会监控对文件操作的IO访问信息,然后确定对该文件的IO访问模式,并根据IO 访问模式确定对应的文件管理策略;最后在得到的文件管理策略与文件的当前管理方式不一致时,根据确定的文件管理策略调整文件的当前管理方式,比如存储介质和文件管理粒度,从而实现根据文件的IO访问模式动态调整文件的存储介质和文件管理粒度。

Description

一种文件管理方法及文件系统
技术领域
本发明涉及数据处理技术领域, 特别涉及文件管理方法及文件系统。
背景技术
随着 NAND闪存( FLASH )的应用以及变相存储器( Phase change memory,
PCM )等新型存储介质的出现, 各种不同的介质表现出不同的读、 写特征, 这 就需要文件系统釆用不同粒度的管理方法, 对存储介质中储存的文件进行管 理, 来提升性能。 比如, 釆用大粒度管理, 能够减少元数据存储开销和元数 据索引查找时间的延迟; 釆用细粒度管理, 能够保证数据有效访问, 不会浪费 带宽, 减少数据迁移。
现有技术中, 文件系统会根据文件名或嵌入到文件中信息识别文件类型, 为文件分配不同粒度的存储介质, 当文件类型确定后, 则文件的管理模式也就 确定了, 比较固定。
发明内容
本发明实施例提供文件管理方法及文件系统, 实现了根据对文件的 10访 问模式动态地调整文件的当前管理方式。
本发明实施例第一方面提供一种文件管理方法, 包括:
获取对文件进行操作的输入输出 10访问信息;
确定所述 10访问信息对应的 10访问模式;
将所述确定的 10访问模式与预置的模式匹配库进行匹配, 得到所述确定 的 10访问模式对应的文件管理策略, 所述文件管理策略中包括如下至少一种 信息: 文件管理粒度和文件存储介质的类型, 所述模式匹配库中包括 10访问 模式与文件管理策略的对应关系;
当所述文件的当前管理方式与所述确定的 10访问模式对应的文件管理策 略不一致时,调整对所述文件的当前管理方式, 以使调整后的当前管理方式和 所述确定的 10访问模式对应的文件管理策略一致。
本发明实施例第一方面的第一种可能实现方式中, 所述确定所述 10访问 信息对应的 10访问模式, 包括:
如果所述 10访问信息中对所述文件的读操作比例大于预置的值, 则确定 所述 10访问模式为读操作的模式;
如果所述 10访问信息对所述文件的写操作比例大于预置的值, 则确定所 述 10访问模式为写操作的模式;
如果所述 10访问信息中对所述文件的写操作比例与读操作比例相差小于 预置的值, 则确定所述 10访问模式为读写混合操作的模式。
结合本发明实施例第一方面或第一方面的第一种可能实现方式,在本发明 实施例第一方面的第二种可能实现方式中,所述当所述文件的当前管理方式与 所述确定的 10访问模式对应的文件管理策略不一致时, 调整对所述文件的当 前管理方式, 包括:
如果所述得到的文件管理策略中包括的文件管理粒度,与所述文件的当前 文件管理方式中文件管理粒度不一致, 则更新所述文件的管理粒度;
更新所述文件的元数据,使得更新后的元数据包括所述更新后的管理粒度 的信息。
结合本发明实施例第一方面或第一方面的第一种可能实现方式,在本发明 实施例第一方面的第三种可能实现方式中,所述当所述文件的当前管理方式与 所述确定的 10访问模式对应的文件管理策略不一致时, 调整所述文件的当前 管理方式, 包括:
如果所述得到的文件管理策略中包括的文件存储介质的类型,与所述文件 的当前管理方式中存储介质不一致,则向目标存储介质申请用于储存所述文件 的存储块,所述目标存储介质为与所述文件管理策略中包括的文件存储介质的 类型一致的存储介质;
将所述文件从源存储介质迁移到所述申请的存储块中, 其中, 所述文件当 前所在的存储介质为源存储介质;
创建新的元数据, 使得所述新的元数据中包括迁移后的文件的存储信息。 结合本发明实施例第一方面的第三种可能实现方式,在本发明实施例第一 方面的第四种可能实现方式中, 所述方法还包括:
根据对所述文件进行操作的 10访问请求对所请求操作的文件进行操作 时, 如果所述所请求操作的文件中的第一部分文件未储存在所述源存储介质 上, 而第二部分文件储存在所述源存储介质上, 则根据所述 10访问模式对应 的文件管理策略中的文件存储介质的类型,对所述迁移后的目标存储介质中的 第一部分文件进行操作, 对所述源存储介质上的第二部分文件进行操作。
本发明实施例第二方面提供一种文件系统, 包括:
信息获取单元, 用于获取对文件进行操作的输入输出 10访问信息; 访问模式确定单元, 用于确定所述信息获取单元获取的 10访问信息对应 的 10访问模式;
管理获取单元, 用于将所述访问模式确定单元确定的 10访问模式预置的 模式匹配库进行匹配得到所述确定的 10访问模式对应的文件管理策略, 所述 文件管理策略中包括如下至少一种信息: 文件管理粒度和文件存储介质的类 型, 所述模式匹配库中包括 10访问模式与文件管理策略的对应关系;
调整单元, 用于当所述文件的当前管理方式与所述管理获取单元确定的
10访问模式对应的文件管理策略不一致时, 调整对所述文件的当前管理方式, 以使调整后的当前管理方式和所述确定的 10访问模式对应的文件管理策略一 致。
本发明实施例第二方面第一种可能实现方式中:
所述访问模式确定单元, 用于如果所述信息获取单元获取的 10访问信息 中对所述文件的读操作比例大于预置的值, 则确定所述 10访问模式为读操作 的模式; 如果所述信息获取单元获取的 10访问信息中对所述文件的写操作比 例大于预置的值, 则确定所述 10访问模式为写操作的模式; 如果所述信息获 取单元获取的 10访问信息中对所述文件的写操作比例与读操作比例相差小于 预置的值, 则确定所述 10访问模式为读写混合操作的模式。
结合本发明实施例第二方面或第二方面的第一种可能实现方式,在本发明 实施例第二方面的第二种可能实现方式中, 所述调整单元, 包括:
更新单元, 用于如果所述得到的文件管理策略中包括的文件管理粒度, 与 所述文件的当前管理方式中文件管理粒度不一致, 更新所述文件的管理粒度; 更新所述文件的元数据,使得更新后的元数据包括所述更新后的管理粒度的信 息。
结合本发明实施例第二方面或第二方面的第一种可能实现方式,在本发明 实施例第二方面的第三种可能实现方式中, 所述调整单元, 包括: 迁移单元,用于如果所述得到的文件管理策略中包括的文件存储介质的类 型, 与所述文件的当前管理方式中存储介质不一致, 向目标存储介质申请用于 储存所述文件的存储块; 将所述文件从源存储介质迁移到所述申请的存储块 中; 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为 与所述文件管理策略中包括的文件存储介质的类型一致的存储介质;
创建单元, 用于创建新的元数据,使得所述新的元数据中包括所述迁移单 元迁移后的文件的存储信息。
结合本发明实施例第二方面的第三种可能实现方式,在本发明实施例第二 方面的第四种可能实现方式中, 所述系统还包括:
文件操作单元, 用于根据对所述文件进行操作的 10访问请求对所请求操 作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储存在 所述源存储介质上,而第二部分文件储存在所述源存储介质上,则根据所述 10 访问模式对应的文件管理策略中的文件存储介质的类型,对所述迁移后的目标 存储介质中的第一部分文件进行操作,并对所述源存储介质上的第二部分文件 进行操作。
本发明实施例第三方面提供一种文件系统, 包括: 分别连接在总线的处理 器, 及多种存储器, 其中:
所述处理器, 用于获取对文件进行操作的输入输出 10访问信息; 确定所 述获取的 10访问信息对应的 10访问模式; 将所述确定的 10访问模式与预置 的模式匹配库进行匹配得到所述确定的 10访问模式对应的文件管理策略, 所 述文件管理策略中包括如下至少一种信息:文件管理粒度和文件存储介质的类 型, 所述模式匹配库中包括 10访问模式与文件管理策略的对应关系; 当所述 文件的当前管理方式与所述确定的 10访问模式对应的文件管理策略不一致 时,调整对所述文件的当前管理方式, 以使调整后的当前管理方式和所述确定 的 10访问模式对应的文件管理策略一致;
所述文件存储介质为所述存储器。
本发明实施例第三方面的第一种可能实现方式中:
所述处理器, 用于如果所述获取的 10访问信息中对所述文件的读操作比 例大于预置的值, 则确定所述 10访问模式为读操作的模式; 如果所述获取的 10访问信息中对所述文件的写操作比例大于预置的值,则确定所述 10访问模 式为写操作的模式; 如果所述获取的 10访问信息中对所述文件的写操作比例 与读操作比例相差小于预置的值, 则确定所述 10访问模式为读写混合操作的 模式。
结合本发明实施例第三方面或第三方面的第一种可能实现方式,在本发明 实施例第三方面的第二种可能实现方式中:
所述处理器, 用于如果所述得到的文件管理策略中包括的文件管理粒度, 与所述存储器中储存的文件的当前管理方式中文件管理粒度不一致,更新所述 存储器中文件的管理粒度; 更新所述文件的元数据,使得更新后的元数据包括 所述更新后的管理粒度的信息。
结合本发明实施例第三方面或第三方面的第一种可能实现方式,在本发明 实施例第三方面的第三种可能实现方式中:
所述处理器,用于如果所述得到的文件管理策略中包括的文件存储介质的 类型, 与所述存储器中储存的文件的当前管理方式中存储介质不一致, 向所述 多个存储器中的目标存储介质申请用于储存所述文件的存储块;将所述文件从 所述多个存储器中源存储介质迁移到所述申请的存储块中; 并创建新的元数 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为 与所述文件管理策略中包括的文件存储介质的类型一致的存储介质。
结合本发明实施例第三方面的第三种可能实现方式,在本发明实施例第三 方面的第四种可能实现方式中:
所述处理器, 还用于根据对所述文件进行操作的 10访问请求对所请求操 作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储存在 所述源存储介质上,而第二部分文件储存在所述源存储介质上,则根据所述 10 访问模式对应的文件管理策略中的文件存储介质的类型,对所述迁移后的目标 存储介质中的第一部分文件进行操作,对所述源存储介质上的第二部分文件进 行操作。
可见,在本发明实施例中,文件系统会监控对文件操作(比如读、写操作) 的 10访问信息, 并确定文件的 10访问模式, 并根据 10访问模式确定对应的 文件管理策略, 最后根据文件管理策略动态调整文件的当前管理方式。这样在 文件管理时, 可以根据文件的不同 10访问模式釆用对应的不同的文件管理策 略, 即釆用不同的文件管理粒度和 /或不同的文件存储介质, 使得对文件的访 问性能达到最优, 同时充分发挥存储介质的特点。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲,在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种文件管理方法的流程图;
图 2是本发明实施例提供的另一种文件管理方法的流程图;
图 3是本发明实施例提供的一种文件系统的结构示意图;
图 4是本发明实施例提供的文件迁移的示意图;
图 5是本发明实施例提供的另一种文件系统的结构示意图;
图 6是本发明实施例提供的另一种文件系统的结构示意图;
图 7是本发明实施例提供的另一种文件系统的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语"第一"、 "第二"、 "第 三""第四"等 (如果存在)是用于区别类似的对象, 而不必用于描述特定的顺 序或先后次序。应该理解这样使用的数据在适当情况下可以互换, 以便这里描 述的本发明的实施例,例如能够以除了在这里图示或描述的那些以外的顺序实 施。 此外, 术语"包括"和"具有"以及他们的任何变形, 意图在于覆盖不排它的 包含, 例如, 包含了一系列步骤或单元的过程、 方法、 系统、 产品或设备不必 限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些 过程、 方法、 产品或设备固有的其它步骤或单元。 本发明实施例提供一种文件管理方法, 主要应用于文件系统中, 该文件系 统可以承载在任一终端设备或网络设备上, 可以包括多种类型的存储介质, 用 于储存各种文件, 本实施例的方法的流程图如图 1所示, 包括:
步骤 101, 获取对文件进行操作的输入输出 (IN/OUT, 10 )访问信息。 其中这里, 由于文件的数据都是储存在文件系统中的存储介质, 这里的 10访 问信息是指文件系统对存储介质中文件进行访问的信息, 可以包括: 访问进程 的标识( PID ), 文件名, 文件偏移量( file offset ), 每次 10访问请求的文件大 小, 10访问对应的文件操作类型 (比如读、 写或查询等)、 10访问请求的时 间戳(开始和结束时间)。
步骤 102, 确定步骤 101获取的 10访问信息对应的 10访问模式。
可以理解,在文件系统中应用程序的运行过程中可以触发对文件操作的流 程, 比如对文件进行读 /写操作, 则执行应用程序的模块就会向文件系统发送 对 10访问请求, 该 10访问请求中可以包括: 所请求操作 (包括读 /写操作 ) 的文件的信息等, 这样文件系统就可以对相应的文件进行操作。
当一个文件首次被写入到文件系统的存储介质后,该文件可以被多次进行 操作, 则文件系统可以监控该文件的 10访问信息, 并截获对该文件操作的 10 访问信息, 比如 10访问类型和次数, 是对文件进行顺序 /随机读操作的 10访 问还是对文件进行顺序 /随机写操作的 10访问,读写比例及每次访问时文件的 粒度等信息, 还可以包括操作的文件偏移量。 然后文件系统会根据获取的 10 访问信息来确定 10访问模式,该 10访问模式是指对文件以什么粒度进行什么 形式操作的模式, 可以包括: 以一定粒度进行随机读操作的模式, 以一定粒度 进行顺序读操作的模式, 以一定粒度进行随机写操作的模式, 以一定粒度进行 顺序写操作的模式,及以一定粒度进行顺序读写混合操作的模式和以一定粒度 进行随机读写混合操作的模式等模式。
具体地, 如果在 10访问信息中对文件的读操作比例大于预置的值, 则认 为 10访问模式为读操作的模式;如果 10访问信息中对文件的写操作比例大于 预置的值,则确定所述 10访问模式为写操作的模式;如果接 10访问信息中对 文件的写操作比例与读操作比例相差小于预置的值, 则确定 10访问模式为读 写混合操作的模式。 且在 10访问模式中还可以包括进行操作的粒度。 步骤 103, 将步骤 102中确定的 10访问模式与文件系统中预置的模式匹 配库进行匹配, 得到确定的 10访问模式对应的文件管理策略。 其中, 文件模 式匹配库是预置在文件系统中的, 可以包括 10访问模式与文件管理策略的对 应关系, 该文件管理策略中包括文件管理粒度和 /或文件存储介质的类型。
其中文件管理粒度是指文件储存的最小单位, 比如 4k、 1MB等, 而文件 存储介质的类型有多种, 可以包括变相存储器、 动态随机存储器 (Dynamic Random Access Memory, DRAM )、硬盘驱动( Hard Disk Drive, HDD )和 NAND FLASH等。 其中, 由于各种类型的存储介质都有各自对应的读写特性, 则不 同类型的存储介质对应不同的 10访问模式, 具体地:
( 1 ) 变相存储器是一种非易失存储设备, 与 DRAM—样是按字节寻址, 有很高的写入速度, 其写入耐用性大概是 10的 6次方至 10的 8次方。 变相存 储器适合较小的文件管理粒度, 比如 64Byte-8KB, 并适合随机、 小粒度的读、 写操作。
( 2 ) NAND FLASH写以页面为单位, 擦除以块为单位(一个块通常包含 64个或更多的页面), 因此, NAND Flash适合釆用以页面或块为单位的文件 管理粒度, 比如 4KB, 8KB , 16KB , ..512KB , 并适合较大尺寸的随机读操作, 此外, NAND Flash读要比写快许多。
( 3 ) HDD由于寻道时间较长, 导致读、 写延迟较大, HDD适合较大粒 度的读、写操作, 比如 1MB, 2MB, 4MB等, 此外, HDD适合顺序读、写操作; 需要说明的是,对应用文件的访问一般呈现不同的访问特点, 比如视频文 件, 一般是顺序读、 写, 每次读、 写的粒度较大; 再比如, 数据库文件, 呈现 随机、 小粒度的读、 写操作特点。 这样对不同文件的访问呈现出不同的访问特 点, 可以匹配不同的存储介质和文件管理粒度。
本实施例中, 用户可以预先在文件系统的模式匹配库中设置 10访问模式 与文件管理策略的对应关系,比如 10访问模式是以 1MB到 4 MB的粒度顺序 读操作的模式对应的文件管理策略为: 文件管理粒度为 1MB, 文件存储介质 的类型为 HDD或 NAND FLASH。 这样, 文件系统可以通过 10访问模式及文 件系统中预置的模式匹配库, 就能得到对应的文件管理策略。 如表 1中所示: 表 1 IO访问信息 IO访问模式 文件管理策略 文件访问粒度: 1MB 读操作比例 >80%, 以 1MB到 4 MB的
存储介质的类型: HDD, NAND 1MB -4MB 粒度顺序读操作
FLASH 以 512Byte到 4KB 文件访问粒度: 4KB 写操作比例 >80%,
的粒度随机写操 存储介质的类型: PCM, NAND 512Byte-4KB
作 FLASH 文件访问粒度: 4KB 读操作比例 >80%, 以 4KB到 64KB的
存储介质的类型: NAND 4KB -64KB 粒度随机读操作
FLASH, PCM 文件访问粒度: 4KB
50%读, 50%写 以 16KB的粒度读
存储介质的类型: PCM, NAND 16KB 写混合操作
FLASH
步骤 104, 根据步骤 103中得到的文件管理策略, 调整对文件的当前管理 方式, 具体地, 是当文件的当前管理方式与确定的 10访问模式对应的文件管 理策略不一致时,调整对文件的当前管理方式, 以使调整后的当前管理方式和 确定的 10访问模式对应的文件管理策略一致, 比如改变文件的存储介质, 和 / 或改变文件的管理粒度。 进一步地, 由于文件系统中还储存着文件的元数据, 在元数据中包括文件大小和文件标识等信息, 以方便对文件的查找, 当调整了 文件的当前管理方式后, 还需要更新文件系统中储存的元数据。
需要说明的是, 上述在文件管理过程中, 合适的文件管理粒度, 便于有效 的文件预取操作, 提高对文件进行操作的速度, 且还便于有效的元数据管理。 比如顺序访问文件,一次写入 4MB的文件,如果釆用 2MB的文件管理粒度(即 一个存储块的最小单位为 2MB ), 仅需要两次数据定位且发送两次 10访问请 求给存储介质, 且只需要管理两个存储块的元数据; 如果釆用 4KB的文件管 理粒度,则需要 1000次数据定位且需要发送 1000次 10访问请求给存储介质, 需要管理 1000个存储块的元数据。 可见, 在本发明实施例中, 文件系统会监控对文件操作的 10访问信息, 并确定 10访问模式,然后根据 10访问模式确定对应的文件管理策略,最后在 得到的文件管理策略与文件的当前管理方式不一致时,根据得到的文件管理策 略动态地调整对文件的当前管理方式。 这样使得在文件管理时, 可以根据文件 的不同 10访问模式而釆用对应的不同的文件管理策略, 即釆用不同的文件管 理粒度和 /或不同的文件存储介质, 使得对文件的访问性能达到最优, 同时充 分发挥存储介质的特点。 参考图 2所示, 在具体的实施例中, 文件系统在执行上述步骤 104时, 根 据步骤 103中得到的文件管理策略可以有如下几种方法:
( 1 )如果步骤 103得到的文件管理策略中包括的文件管理粒度, 与文件 的当前管理方式中的文件管理粒度不一致,则文件系统在执行步骤 104时,会:
A1 : 更新文件的管理粒度为上述步骤 103得到的文件管理粒度。
A2: 更新文件的元数据, 使得更新后的元数据包括所述更新后的管理粒 度的信息。
( 2 )如果步骤 103得到的文件管理策略中包括的文件存储介质的类型, 与文件的当前管理方式中存储介质不一致, 则文件系统在执行上述步骤 104 时, 会进行文件存储介质的迁移, 具体地:
B1 : 向目标存储介质申请用于储存上述文件的存储块, 该目标存储介质 即为与上述步骤 103 中得到的文件管理策略中包括的文件存储介质的类型一 致的存储介质。
具体地,这里申请的存储块的粒度可以由上述步骤 103中得到的文件管理 粒度来决定,如果在得到的文件管理策略中没有包括文件管理粒度, 则申请的 存储块的粒度可以是该文件在源存储介质中储存的最小单位,也可以是该目标 存储介质所适合的粒度等; 如果在得到的文件管理策略中包括了文件管理粒 度, 则申请的存储块的粒度就是文件管理策略中的文件管理粒度。
B2: 将文件从源存储介质迁移到申请的存储块中, 即将文件从源存储介 质拷贝, 并添加到申请的存储块中,且还可以将源存储介质中该文件的数据删 除。 其中, 文件当前所在的存储介质为源存储介质。 B3: 创建新的元数据, 使得新的元数据中包括迁移后的文件的存储信息, 比如文件大小和文件储存的最小单位等。
需要说明的是,在调整文件的当前管理方式时, 涉及到了文件存储介质的 迁移, 而文件系统在这个过程中还是会不断地通过存储介质的对文件进行操 作, 即文件系统会根据对文件进行操作的 10访问请求对所请求操作的文件进 行相应的操作(比如读写操作)。 在这种情况下, 文件系统在对文件读 /写操作 前,需要先判断所请求操作的文件是否已经迁移到了目标存储介质上,具体地, 是查看源存储介质中是否储存了所请求操作的文件,如果所请求操作的文件中 一部分(比如第一部分)文件未储存在源存储介质上, 而所请求操作的文件中 另一部分(比如第二部分)文件储存在源存储介质上, 则文件系统根据 10访 问模式对应的文件管理策略中的文件存储介质的类型,对迁移后的目标存储介 质中的第一文件进行操作, 且对所述源存储介质上的第二部分文件进行操作。 以下以一个具体的实施例来本发明的文件管理方法,本实施例中的文件管 理方法主要是应用于任一文件系统中, 该文件系统可以包括如图 3 所示的结 构, 包括:
文件访问模块, 文件 10访问统计、 模式分析模块, 策略匹配控制模块, 元数据管理模块和文件数据块调整、 迁移模块, 还包括多种类型的存储介质, 比如 HDD和 PCM等。 其中:
在各种存储介质中储存着各种文件;
文件访问模块, 用于接收对文件进行操作的 10访问请求, 并对文件存储 介质中, 该访问请求所请求的文件进行操作; 该文件访问模块可以接收该文件 系统通过用户接口发送的 10访问请求, 也可以接收文件系统中其它模块发送 的 10访问请求;
文件 10访问统计、 模式分析模块用于对文件访问模块对存储介质中文件 的访问进行监控, 釆集文件访问模块对存储介质中储存文件进行操作的 10访 问信息, 并对 10访问模式进行分析;
策略匹配控制模块用于根据不同的 10访问模式匹配不同的文件管理策 略, 包括文件管理粒度和文件存储介质的类型; 元数据管理模块用于在调整文件的当前管理方式后,对文件的元数据进行 更新; 文件数据块调整、 迁移模块用于调整文件管理粒度, 及将文件从一个存 储介质迁移到另一存储介质。
本实施例中的文件系统支持不同粒度的管理方式, 比如 4K、 16Κ、 64Κ、 1Μ、 2Μ等。 在文件初始创建时, 可以按照一定的粒度比如 64Κ将文件储存 在一个或多个存储介质上;然后由上述图 3中所示的四个模块动态地调整文件 的当前管理方式。 例如, 文件 1在初始创建时, 以文件管理粒度为 4KB储存 在 PCM上, 经过动态调整; 将文件 1迁移到 HDD上, 且以文件管理粒度为 2MB进行储存。
参考图 4所示,在文件迁移的过程中, 文件系统可以以源存储介质上的源 文件管理粒度来迁移文件, 比如源存储介质的文件管理粒度为 2MB, 则文件 系统以 2MB为单位来迁移文件, 且会为正在迁移的文件加锁, 并在源存储介 质上已迁移的位置进行标记; 另外, 在文件迁移后, 文件系统需要创建新的元 数据。 在这个过程中, 当文件访问模块有对文件操作的 10访问请求时, 如果 所请求的文件中有部分文件已经被迁移到目标存储介质,即未储存在源存储介 质上, 则对迁移后的目标存储介质中的该部分文件进行操作; 如果所请求的文 件中另一部分文件还未被迁移到目标存储介质,则对源存储介质中该另一部分 文件进行操作。 本发明实施例还提供一种文件系统,在文件系统中通过多种存储介质储存 文件, 其结构示意图如图 5所示, 包括:
信息获取单元 10, 用于获取对文件进行操作的输入输出 10访问信息, 10 访问信息包括了对文件操作的具体情况, 比如访问次数,是对文件进行读操作 的 10访问还是对文件进行写操作的 10访问, 读写比例及每次访问时读 /写文 件的粒度等信息。
访问模式确定单元 11, 用于确定所述信息获取单元 10获取的 10访问信 息对应的 10访问模式。
具体地,访问模式确定单元 11,用于如果所述信息获取单元 10获取的 10 访问信息中对所述文件的读操作比例大于预置的值, 则确定所述 10访问模式 为读操作的模式;如果所述信息获取单元 10获取的 10访问信息中对所述文件 的写操作比例大于预置的值, 则确定所述 10访问模式为写操作的模式; 如果 所述信息获取单元 10获取的 10访问信息中对所述文件的写操作比例与读操作 比例相差小于预置的值, 则确定所述 10访问模式为读写混合操作的模式。 且 在 10访问模式中还可以包括读 /写操作的粒度。
管理获取单元 12, 用于将所述访问模式确定单元 11确定的 10访问模式 与预置的模式匹配库进行匹配得到所述确定的 10访问模式对应的文件管理策 略, 所述文件管理策略中包括如下至少一个信息: 文件管理粒度和文件存储介 质的类型, 模式匹配库中包括 10访问模式与文件管理策略的对应关系。
调整单元 13, 用于当所述文件的当前管理方式与所述管理获取单元 12确 定的 10访问模式对应的文件管理策略不一致时, 调整对所述文件的当前管理 方式, 以使调整后的当前管理方式和所述确定的 10访问模式对应的文件管理 策略一致, 比如改变文件的存储介质, 和 /或改变文件的管理粒度。 进一步地, 由于文件系统中还储存着文件的元数据,在元数据中包括文件大小和文件标识 等信息, 以方便对文件的查找, 当调整单元 13调整了文件的当前管理方式后, 还需要更新文件系统中储存的元数据。
可见, 在本发明实施例的文件系统中, 信息获取单元 10会监控对文件操 作 (包括读、 写操作 ) 的 10访问信息, 并由访问模式确定单元 11确定 10访 问模式,从而管理获取单元 12根据 10访问模式确定对应的文件管理策略, 最 后调整单元 13根据得到的文件管理策略动态地调整对文件的当前管理方式。 这样使得在文件管理时, 可以根据文件的不同 10访问模式而釆用对应的不同 的文件管理策略, 即釆用不同的文件管理粒度和 /或不同的文件存储介质, 使 得对文件的访问性能达到最优, 同时能充分发挥存储介质各自的特点。
参考图 6 所示, 在一个具体的实施例中, 文件系统除了可以包括如图 5 所示的结构外, 还可以包括文件操作单元 14, 且其中的调整单元 13可以通过 更新单元 131、 迁移单元 132和创建单元 133来实现, 具体地:
更新单元 131, 用于如果所述管理获取单元 12得到的文件管理策略中包 括的文件管理粒度, 与所述文件的当前管理方式中文件管理粒度不一致, 更新 所述文件的管理粒度, 更新为管理获取单元 12获取到的文件管理粒度; 更新 所述文件的元数据, 使得更新后的元数据包括所述更新后的管理粒度的信息。 迁移单元 132, 用于如果所述管理获取单元 12得到的文件管理策略中包 括的文件存储介质的类型, 与所述文件的当前管理方式中存储介质不一致, 向 目标存储介质申请用于储存所述文件的存储块;将所述文件从源存储介质迁移 到所述申请的存储块中, 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为与所述文件管理策略中包括的文件存储介质的类型一致 的存储介质; 创建单元 133, 用于创建新的元数据, 使得所述新的元数据中包 括所述迁移单元 132迁移后的文件的存储信息,包括迁移后文件所在的目标存 储介质的信息, 及在目标存储介质上文件的管理粒度等信息。 其中, 目标存储 介质为与管理获取单元 12获取的文件管理策略中包括的文件存储介质的类型 一致的存储介质, 且申请的存储块的粒度可以由管理获取单元 12得到的文件 管理粒度来决定,如果在得到的文件管理策略中没有包括文件管理粒度, 则申 请的存储块的粒度可以是该文件在源存储介质中储存的最小单位,也可以是该 目标存储介质所适合的粒度等。
文件操作单元 14,用于根据对所述文件进行操作的 10访问请求对所请求 操作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储存 在所述源存储介质上, 而第二部分文件储存在所述源存储介质上, 则根据所述 管理获取单元 12确定的 10访问模式对应的文件管理策略中的文件存储介质的 类型,对所述迁移后的目标存储介质中的第一部分文件进行操作,且对所述源 存储介质上的第二部分文件进行操作。
本实施例的文件系统中, 当调整单元 13单元在进行文件的当前管理方式 的调整时, 可以只通过更新单元 131来更新文件的当前存储粒度; 或通过迁移 单元 132和创建单元 133将文件从一个存储介质 (即源存储介质 )迁移到另一 存储介质 (即目标存储介质), 在这种情况下, 如果文件操作单元 14通过存储 介质的接口对文件进行操作时,需要先判断文件是否已经被全部迁移到目标存 储介质上, 然后再进行相应的处理。 本发明实施例还提供另一种文件系统,主要可以对文件系统中储存的文件 进行管理, 其结构示意图如图 7所示, 包括分别连接到总线上的处理器 21及 多种类型的存储器 22比如 HDD和 PCM等存储器, 且还可以包括连接在总线 的输入装置和输出装置, 具体地:
存储器 22 中用来储存从输入装置输入的文件, 且还可以储存处理器 21 处理数据的必要文件等信息,本实施例中存储器 22即为上述的文件存储介质; 输入装置和输出装置是文件系统与其它设备通信的端口,还可以包括文件系统 外接的设备比如显示器、 键盘、 鼠标和打印机等。
处理器 21,用于获取对文件进行操作的 10访问信息;确定所述获取的 10 访问信息对应的 10访问模式;将所述确定的 10访问模式与预置的模式匹配库 进行匹配得到所述确定的 10访问模式对应的文件管理策略, 所述文件管理策 略中包括如下至少一个信息: 文件管理粒度和文件存储介质的类型,且所述模 式匹配库中包括 10访问模式与文件管理策略的对应关系; 当所述文件的当前 管理方式与所述确定的 10访问模式对应的文件管理策略不一致时, 调整对所 述文件的当前管理方式, 以使调整后的当前管理方式和所述确定的 10访问模 式对应的文件管理策略一致。 其中, 处理器 21在确定 10访问模式时, 用于如 果所述获取的 10访问信息中对所述文件的读操作比例大于预置的值, 则确定 所述 10访问模式为读操作的模式;如果所述获取的 10访问信息中对所述文件 的写操作比例大于预置的值, 则确定所述 10访问模式为写操作的模式; 如果 所述获取的 10访问信息中对所述文件的写操作比例与读操作比例相差小于预 置的值,则确定所述 10访问模式为读写混合操作的模式,且在 10访问模式中 还可以包括读 /写操作的粒度。 进一步地, 由于文件系统中的存储介质还储存 着文件的元数据, 在元数据中包括文件大小、 文件标识和 inode号等信息, 以 方便对文件的查找, 当处理器 21调整了文件的当前管理方式后, 还需要更新 文件系统中储存的元数据。
这样使得在文件管理时, 可以根据不同的 10访问模式而釆用对应的不同 的文件管理策略, 即釆用不同的文件管理粒度和 /或不同的文件存储介质, 使 得对文件的访问性能达到最优, 同时能充分发挥存储介质的特点。
在一些具体的实施例中, 处理器 21, 用于如果所述得到的文件管理策略 中包括的文件管理粒度,与所述存储器中储存的文件的当前管理方式中文件管 理粒度不一致, 更新所述存储器中文件的管理粒度; 更新所述文件的元数据, 使得更新后的元数据包括所述更新后的管理粒度的信息。
另一方面, 处理器 21用于如果所述得到的文件管理策略中包括的文件存 储介质的类型, 与所述存储器中储存的文件的当前管理方式中存储介质不一 致, 向所述多个存储器中目标存储介质申请用于储存所述文件的存储块; 将所 述文件从所述多个存储器中源存储介质迁移到所述申请的存储块中;并创建新 的元数据, 使得所述新的元数据中包括所述迁移单元迁移后的文件的存储信 息。 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为 与所述文件管理策略中包括的文件存储介质的类型一致的存储介质。
在这种情况下, 如果处理器 21通过存储介质的接口对文件进行操作时, 需要先判断文件是否已经被全部迁移到目标存储介质上,然后再进行相应的处 理,具体地,处理器 21还用于根据对所述文件进行操作的 10访问请求对所请 求操作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储 存在所述源存储介质上, 而第二部分文件储存在所述源存储介质上, 则根据所 述 10访问模式对应的文件管理策略中的文件存储介质的类型, 对所述迁移后 的目标存储介质中的第一部分文件进行操作,对所述源存储介质上的第二部分 文件进行操作。 本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。
以上对本发明实施例所提供的文件管理方法及文件系统进行了详细介绍, 说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于本领域的一般 技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种文件管理方法, 其特征在于, 包括:
获取对文件进行操作的输入输出 10访问信息;
确定所述 10访问信息对应的 10访问模式;
将所述确定的 10访问模式与预置的模式匹配库进行匹配, 得到所述确定 的 10访问模式对应的文件管理策略, 所述文件管理策略中包括如下至少一种 信息: 文件管理粒度和文件存储介质的类型, 所述模式匹配库中包括 10访问 模式与文件管理策略的对应关系;
当所述文件的当前管理方式与所述确定的 10访问模式对应的文件管理策 略不一致时,调整对所述文件的当前管理方式, 以使调整后的当前管理方式和 所述确定的 10访问模式对应的文件管理策略一致。
2、如权利要求 1所述的方法, 其特征在于, 所述确定所述 10访问信息对 应的 10访问模式, 包括:
如果所述 10访问信息中对所述文件的读操作比例大于预置的值, 则确定 所述 10访问模式为读操作的模式;
如果所述 10访问信息对所述文件的写操作比例大于预置的值, 则确定所 述 10访问模式为写操作的模式;
如果所述 10访问信息中对所述文件的写操作比例与读操作比例相差小于 预置的值, 则确定所述 10访问模式为读写混合操作的模式。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述当所述文件的当前 管理方式与所述确定的 10访问模式对应的文件管理策略不一致时, 调整对所 述文件的当前管理方式, 包括:
如果所述得到的文件管理策略中包括的文件管理粒度,与所述文件的当前 文件管理方式中文件管理粒度不一致, 则更新所述文件的管理粒度;
更新所述文件的元数据,使得更新后的元数据包括所述更新后的管理粒度 的信息。
4、 如权利要求 1或 2所述的方法, 其特征在于, 所述当所述文件的当前 管理方式与所述确定的 10访问模式对应的文件管理策略不一致时, 调整所述 文件的当前管理方式, 包括: 如果所述得到的文件管理策略中包括的文件存储介质的类型,与所述文件 的当前管理方式中存储介质不一致,则向目标存储介质申请用于储存所述文件 的存储块,所述目标存储介质为与所述文件管理策略中包括的文件存储介质的 类型一致的存储介质;
将所述文件从源存储介质迁移到所述申请的存储块中, 其中, 所述文件当 前所在的存储介质为源存储介质;
创建新的元数据, 使得所述新的元数据中包括迁移后的文件的存储信息。
5、 如权利要求 4所述的方法, 其特征在于, 所述方法还包括:
根据对所述文件进行操作的 10 访问请求对所请求操作的文件进行操作 时, 如果所述所请求操作的文件中的第一部分文件未储存在所述源存储介质 上, 而第二部分文件储存在所述源存储介质上, 则根据所述 10访问模式对应 的文件管理策略中的文件存储介质的类型,对所述迁移后的目标存储介质中的 第一部分文件进行操作, 对所述源存储介质上的第二部分文件进行操作。
6、 一种文件系统, 其特征在于, 包括:
信息获取单元, 用于获取对文件进行操作的输入输出 10访问信息; 访问模式确定单元, 用于确定所述信息获取单元获取的 10访问信息对应 的 10访问模式;
管理获取单元, 用于将所述访问模式确定单元确定的 10访问模式预置的 模式匹配库进行匹配得到所述确定的 10访问模式对应的文件管理策略, 所述 文件管理策略中包括如下至少一种信息: 文件管理粒度和文件存储介质的类 型, 所述模式匹配库中包括 10访问模式与文件管理策略的对应关系;
调整单元, 用于当所述文件的当前管理方式与所述管理获取单元确定的
10访问模式对应的文件管理策略不一致时, 调整对所述文件的当前管理方式, 以使调整后的当前管理方式和所述确定的 10访问模式对应的文件管理策略一 致。
7、 如权利要求 6所述的系统, 其特征在于,
所述访问模式确定单元, 用于如果所述信息获取单元获取的 10访问信息 中对所述文件的读操作比例大于预置的值, 则确定所述 10访问模式为读操作 的模式; 如果所述信息获取单元获取的 10访问信息中对所述文件的写操作比 例大于预置的值, 则确定所述 10访问模式为写操作的模式; 如果所述信息获 取单元获取的 10访问信息中对所述文件的写操作比例与读操作比例相差小于 预置的值, 则确定所述 10访问模式为读写混合操作的模式。
8、 如权利要求 6或 7所述的系统, 其特征在于, 所述调整单元, 包括: 更新单元, 用于如果所述得到的文件管理策略中包括的文件管理粒度, 与 所述文件的当前管理方式中文件管理粒度不一致, 更新所述文件的管理粒度; 更新所述文件的元数据,使得更新后的元数据包括所述更新后的管理粒度的信 息。
9、 如权利要求 6或 7所述的系统, 其特征在于, 所述调整单元, 包括: 迁移单元,用于如果所述得到的文件管理策略中包括的文件存储介质的类 型, 与所述文件的当前管理方式中存储介质不一致, 向目标存储介质申请用于 储存所述文件的存储块; 将所述文件从源存储介质迁移到所述申请的存储块 中; 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为 与所述文件管理策略中包括的文件存储介质的类型一致的存储介质;
创建单元, 用于创建新的元数据,使得所述新的元数据中包括所述迁移单 元迁移后的文件的存储信息。
10、 如权利要求 9所述的系统, 其特征在于, 所述系统还包括: 文件操作单元, 用于根据对所述文件进行操作的 10访问请求对所请求操 作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储存在 所述源存储介质上,而第二部分文件储存在所述源存储介质上,则根据所述 10 访问模式对应的文件管理策略中的文件存储介质的类型,对所述迁移后的目标 存储介质中的第一部分文件进行操作,并对所述源存储介质上的第二部分文件 进行操作。
11、 一种文件系统, 其特征在于, 包括: 分别连接在总线的处理器, 及多 种存储器, 其中:
所述处理器, 用于获取对文件进行操作的输入输出 10访问信息; 确定所 述获取的 10访问信息对应的 10访问模式; 将所述确定的 10访问模式与预置 的模式匹配库进行匹配得到所述确定的 10访问模式对应的文件管理策略, 所 述文件管理策略中包括如下至少一种信息:文件管理粒度和文件存储介质的类 型, 所述模式匹配库中包括 10访问模式与文件管理策略的对应关系; 当所述 文件的当前管理方式与所述确定的 10访问模式对应的文件管理策略不一致 时,调整对所述文件的当前管理方式, 以使调整后的当前管理方式和所述确定 的 10访问模式对应的文件管理策略一致;
所述文件存储介质为所述存储器。
12、 如权利要求 11所述的系统, 其特征在于,
所述处理器, 用于如果所述获取的 10访问信息中对所述文件的读操作比 例大于预置的值, 则确定所述 10访问模式为读操作的模式; 如果所述获取的 10访问信息中对所述文件的写操作比例大于预置的值,则确定所述 10访问模 式为写操作的模式; 如果所述获取的 10访问信息中对所述文件的写操作比例 与读操作比例相差小于预置的值, 则确定所述 10访问模式为读写混合操作的 模式。
13、 如权利要求 11或 12所述的系统, 其特征在于,
所述处理器, 用于如果所述得到的文件管理策略中包括的文件管理粒度, 与所述存储器中储存的文件的当前管理方式中文件管理粒度不一致,更新所述 存储器中文件的管理粒度; 更新所述文件的元数据,使得更新后的元数据包括 所述更新后的管理粒度的信息。
14、 如权利要求 11或 12所述的系统, 其特征在于,
所述处理器,用于如果所述得到的文件管理策略中包括的文件存储介质的 类型, 与所述存储器中储存的文件的当前管理方式中存储介质不一致, 向所述 多个存储器中的目标存储介质申请用于储存所述文件的存储块;将所述文件从 所述多个存储器中源存储介质迁移到所述申请的存储块中; 并创建新的元数 其中, 所述文件当前所在的存储介质为源存储介质, 所述目标存储介质为 与所述文件管理策略中包括的文件存储介质的类型一致的存储介质。
15、 如权利要求 14所述的系统, 其特征在于,
所述处理器, 还用于根据对所述文件进行操作的 10访问请求对所请求操 作的文件进行操作时,如果所述所请求操作的文件中的第一部分文件未储存在 所述源存储介质上,而第二部分文件储存在所述源存储介质上,则根据所述 10 访问模式对应的文件管理策略中的文件存储介质的类型,对所述迁移后的目标 存储介质中的第一部分文件进行操作,对所述源存储介质上的第二部分文件进 行操作。
PCT/CN2014/075939 2014-04-22 2014-04-22 一种文件管理方法及文件系统 Ceased WO2015161443A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP2016563933A JP6378364B2 (ja) 2014-04-22 2014-04-22 ファイル管理方法およびファイルシステム
KR1020167032105A KR101914260B1 (ko) 2014-04-22 2014-04-22 파일 관리 방법 및 파일 시스템
EP14890404.8A EP3125124B1 (en) 2014-04-22 2014-04-22 File management method and file system
PCT/CN2014/075939 WO2015161443A1 (zh) 2014-04-22 2014-04-22 一种文件管理方法及文件系统
CN201480001249.2A CN105264497B (zh) 2014-04-22 2014-04-22 一种文件管理方法及文件系统
BR112016024412-5A BR112016024412B1 (pt) 2014-04-22 2014-04-22 Método de gerenciamento de arquivos e sistema de arquivos
US15/331,205 US10339100B2 (en) 2014-04-22 2016-10-21 File management method and file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/075939 WO2015161443A1 (zh) 2014-04-22 2014-04-22 一种文件管理方法及文件系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/331,205 Continuation US10339100B2 (en) 2014-04-22 2016-10-21 File management method and file system

Publications (1)

Publication Number Publication Date
WO2015161443A1 true WO2015161443A1 (zh) 2015-10-29

Family

ID=54331584

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/075939 Ceased WO2015161443A1 (zh) 2014-04-22 2014-04-22 一种文件管理方法及文件系统

Country Status (7)

Country Link
US (1) US10339100B2 (zh)
EP (1) EP3125124B1 (zh)
JP (1) JP6378364B2 (zh)
KR (1) KR101914260B1 (zh)
CN (1) CN105264497B (zh)
BR (1) BR112016024412B1 (zh)
WO (1) WO2015161443A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294735A (zh) * 2016-08-09 2017-01-04 广州酷狗计算机科技有限公司 一种基于缓存的网页访问方法和装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10795828B2 (en) * 2018-08-10 2020-10-06 Micron Technology, Inc. Data validity tracking in a non-volatile memory
CN114816749B (zh) * 2022-04-22 2023-02-10 江苏华存电子科技有限公司 一种用于内存的智能化管理方法及系统
US12056398B2 (en) * 2023-01-11 2024-08-06 Hewlett Packard Enterprise Development Lp Electronic data file access management in a distributed computer system
CN119690936A (zh) * 2023-09-25 2025-03-25 戴尔产品有限公司 用于文件分层存储的方法、设备和计算机程序产品

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009102425A1 (en) * 2008-02-12 2009-08-20 Netapp, Inc. Hybrid media storage system architecture
CN102714047A (zh) * 2009-11-13 2012-10-03 国际商业机器公司 控制数据写入的装置及方法
US20120290779A1 (en) * 2009-09-08 2012-11-15 International Business Machines Corporation Data management in solid-state storage devices and tiered storage systems

Family Cites Families (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US776967A (en) 1904-05-18 1904-12-06 James H Van Tassel Sharpener for shears.
US5960181A (en) * 1995-12-22 1999-09-28 Ncr Corporation Computer performance modeling system and method
GB9606927D0 (en) 1996-04-02 1996-06-05 Memory Corp Plc Data storage devices
US8099758B2 (en) * 1999-05-12 2012-01-17 Microsoft Corporation Policy based composite file system and method
US6799241B2 (en) * 2002-01-03 2004-09-28 Intel Corporation Method for dynamically adjusting a memory page closing policy
KR100594249B1 (ko) * 2004-02-13 2006-06-30 삼성전자주식회사 데이터 저장 시스템에서의 적응적 데이터 액세스 제어방법 및 이를 이용한 디스크 드라이브
US8195627B2 (en) * 2004-04-23 2012-06-05 Neopath Networks, Inc. Storage policy monitoring for a storage network
EP1805665B1 (en) * 2004-09-30 2018-03-28 Cisco Technology, Inc. Storage policy monitoring for a storage network
US7363440B1 (en) * 2004-12-30 2008-04-22 Unisys Corporation System and method for dynamically accessing memory while under normal functional operating conditions
US7568075B2 (en) * 2005-09-22 2009-07-28 Hitachi, Ltd. Apparatus, system and method for making endurance of storage media
JP4943081B2 (ja) 2006-07-27 2012-05-30 株式会社日立製作所 ファイル格納制御装置及び方法
US7599972B2 (en) 2006-08-25 2009-10-06 Qnx Software Systems Gmbh & Co. Kg File system having variable logical storage block size
US8732800B1 (en) * 2007-03-26 2014-05-20 Jerry Askew Systems and methods for centralized management of policies and access controls
US7853669B2 (en) 2007-05-04 2010-12-14 Microsoft Corporation Mesh-managing data across a distributed set of devices
JP4990066B2 (ja) * 2007-08-21 2012-08-01 株式会社日立製作所 論理ボリュームのペアを利用したデータ保存の方式を変更する機能を備えたストレージシステム
GB2458568B (en) * 2008-03-27 2012-09-19 Covertix Ltd System and method for dynamically enforcing security policies on electronic files
JP5192932B2 (ja) 2008-07-23 2013-05-08 株式会社日立製作所 ストレージシステム内の論理ユニットを論理ボリュームに割り当てる方法及び記憶制御装置
US8566549B1 (en) * 2008-12-31 2013-10-22 Emc Corporation Synchronizing performance requirements across multiple storage platforms
EP2215913A1 (en) * 2009-01-23 2010-08-11 Nutreco Nederland B.V. Animal feed additive and animal feed comprising alkyl esters of medium chain fatty acids, and their use in animal feed
US20100306283A1 (en) * 2009-01-28 2010-12-02 Digitiliti, Inc. Information object creation for a distributed computing system
US9021229B2 (en) 2010-04-14 2015-04-28 International Business Machines Corporation Optimizing a file system for different types of applications in a compute cluster using dynamic block size granularity
JP5600517B2 (ja) * 2010-08-18 2014-10-01 キヤノン株式会社 情報処理装置、情報処理方法、およびプログラム
CN102364474B (zh) * 2011-11-17 2014-08-20 中国科学院计算技术研究所 用于机群文件系统的元数据存储系统和管理方法
CN103136111B (zh) * 2011-11-29 2017-03-01 群联电子股份有限公司 数据写入方法、存储器控制器与存储器储存装置
CN102523285B (zh) * 2011-12-15 2014-04-02 杭州电子科技大学 一种基于对象分布式文件系统的存储缓存方法
US9043530B1 (en) * 2012-04-09 2015-05-26 Netapp, Inc. Data storage within hybrid storage aggregate
CN103049713B (zh) * 2012-12-20 2016-12-07 华为技术有限公司 对存储设备中数据进行巡检的方法、设备及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009102425A1 (en) * 2008-02-12 2009-08-20 Netapp, Inc. Hybrid media storage system architecture
US20120290779A1 (en) * 2009-09-08 2012-11-15 International Business Machines Corporation Data management in solid-state storage devices and tiered storage systems
CN102714047A (zh) * 2009-11-13 2012-10-03 国际商业机器公司 控制数据写入的装置及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3125124A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294735A (zh) * 2016-08-09 2017-01-04 广州酷狗计算机科技有限公司 一种基于缓存的网页访问方法和装置

Also Published As

Publication number Publication date
CN105264497A (zh) 2016-01-20
CN105264497B (zh) 2020-04-21
EP3125124A4 (en) 2017-04-19
KR101914260B1 (ko) 2019-01-14
EP3125124B1 (en) 2021-01-13
JP6378364B2 (ja) 2018-08-22
US10339100B2 (en) 2019-07-02
BR112016024412B1 (pt) 2022-10-18
US20170039203A1 (en) 2017-02-09
KR20160145743A (ko) 2016-12-20
JP2017514234A (ja) 2017-06-01
EP3125124A1 (en) 2017-02-01
BR112016024412A2 (pt) 2018-06-26

Similar Documents

Publication Publication Date Title
JP6734807B2 (ja) テナントアウェアストレージシェアリングプラットフォームのための処理装置及びその方法
CN111344683B (zh) 非易失性存储器装置中的命名空间分配
US10649657B2 (en) Log-based storage for different data types in non-volatile memory
US11003576B2 (en) Namespace change propagation in non-volatile memory devices
EP3217294B1 (en) File access method and apparatus and storage device
RU2658886C1 (ru) Способ управления файлами, распределенная система хранения и узел управления
DE112013004250B4 (de) Vorrichtung, Verfahren und Computerprogrammprodukt für adaptive Persistenz
KR102098697B1 (ko) 비휘발성 메모리 시스템, 이를 포함하는 시스템 및 상기 비휘발성 메모리 시스템의 적응적 사용자 저장 영역 조절 방법
JP2022539950A5 (zh)
US8683174B2 (en) I/O conversion method and apparatus for storage system
WO2020038186A1 (zh) 数据迁移方法、装置及存储设备
JP2017021805A (ja) 不揮発性メモリ装置内でデータ属性基盤データ配置を利用可能にするインターフェイス提供方法及びコンピュータ装置
WO2017000658A1 (zh) 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法
TW201520889A (zh) 混合儲存的控制方法及混合儲存系統
CN102567244B (zh) 闪存和磁盘转换存取方法
CN104347104A (zh) 一种大容量存储设备
CN111309258A (zh) 一种b+树的存取方法、装置和计算机可读存储介质
WO2015161443A1 (zh) 一种文件管理方法及文件系统
CN110377599A (zh) 键值存储装置及其操作方法
CN104937564B (zh) 组表格的数据冲洗
CN1258715C (zh) 虚拟化共享式存储设备及方法
WO2016206070A1 (zh) 一种文件更新方法及存储设备
CN114077583A (zh) 一种元数据处理方法、存储设备及存储介质
WO2024060944A1 (zh) 键值存储方法及系统
WO2025257624A1 (zh) 数据存储与读取方法、设备、系统、存储介质与程序产品

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480001249.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14890404

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016563933

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014890404

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014890404

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20167032105

Country of ref document: KR

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112016024412

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 112016024412

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20161019