Generalized write operations verification method
First Claim
1. A method of validating a write request to a storage device to prevent corruption of metadata, wherein the write request comprises a logical block address, a magic signature, and a data type flag, the method comprising:
- determining if the logical block address of the write request overlaps an existing extent of a verified area of the storage device;
responsive to determining that the logical block address overlaps an existing extent of a verified area, determining if the write request comprises metadata based on the data type flag indicating metadata;
responsive to determining that the write request comprises metadata, determining if the magic signature matches an expected magic signature of a legend of the verified area;
responsive to determining that the magic signature matches an expected magic signature of a legend of the verified area,determining if a number of blocks of the write request is valid;
responsive to determining that the number of blocks of the write request is valid, determining if a size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area; and
responsive to determining that the size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area, writing the metadata of the write request to the storage device.
7 Assignments
0 Petitions
Accused Products
Abstract
A verification architecture described according to embodiments of the present invention validates changes made to metadata and may comprise one or more subsystems and phases. According to some embodiments, the “mkfs” volume creation utility works in cooperation with the device driver to create a file system volume by means of reservation and initialization space for metadata structures inside the device'"'"'s partition that is reserved for the specific file system volume. The storage device uses a verified area legend when checking write requests after the file system volume has been created. The verified area legends may be stored in a dedicated partition or inside the master boot record (MBR) or Globally Unique Identifier (GUID) partition table (GPT) or special memory chip (NAND flash, for example). Write requests that overlap with any extent of reserved metadata area must be verified to prevent metadata corruption.
36 Citations
19 Claims
-
1. A method of validating a write request to a storage device to prevent corruption of metadata, wherein the write request comprises a logical block address, a magic signature, and a data type flag, the method comprising:
-
determining if the logical block address of the write request overlaps an existing extent of a verified area of the storage device; responsive to determining that the logical block address overlaps an existing extent of a verified area, determining if the write request comprises metadata based on the data type flag indicating metadata; responsive to determining that the write request comprises metadata, determining if the magic signature matches an expected magic signature of a legend of the verified area; responsive to determining that the magic signature matches an expected magic signature of a legend of the verified area, determining if a number of blocks of the write request is valid; responsive to determining that the number of blocks of the write request is valid, determining if a size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area; and responsive to determining that the size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area, writing the metadata of the write request to the storage device. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An apparatus for validating a write request to prevent corruption of metadata, comprising:
-
a storage device; and a processor communicatively coupled to the storage device that is configured to; analyze the write request, wherein the write request comprises a logical block address, a magic signature, and a data type flag; determine if the logical block address of the write request overlaps an existing extent of a verified area of the storage device; responsive to determining that the logical block address overlaps an existing extent of a verified area, determine if the write request comprises metadata based on the data type flag indicating metadata; responsive to determining that the write request comprises metadata, determine if the magic signature matches an expected magic signature of a legend of the verified area; responsive to determining that the magic signature matches an expected magic signature of a legend of the verified area, determine if a number of blocks of the write request is valid; responsive to determining that the number of blocks of the write request is valid, determining if a size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area; and responsive to determining that the size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area, write the metadata of the write request to the storage device. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product tangibly embodied in a computer-readable storage medium and comprising instructions that, when executed by a processor, perform a method for validating a write request to a storage device to prevent corruption of metadata, wherein the write request comprises a logical block address, a magic signature, and a data type flag, and wherein the method comprises:
-
determining if the logical block address of the write request overlaps an existing extent of a verified area of the storage device; responsive to determining that the logical block address overlaps an existing extent of a verified area, determining if the write request comprises metadata based on the data type flag indicating metadata; responsive to determining that the write request comprises metadata, determining if the magic signature matches an expected magic signature of a legend of the verified area; responsive to determining that the magic signature matches an expected magic signature of a legend of the verified area, determining if a number of blocks of the write request is valid; responsive to determining that the number of blocks of the write request is valid, determining if a size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area; and responsive to determining that the size of the blocks of the write request is equal to a multiple of a node size of the legend of the verified area, writing the metadata of the write request to the storage device. - View Dependent Claims (16, 17, 18, 19)
-
Specification