Using a sparse file as a clone of a file
First Claim
Patent Images
1. A method for using a sparse file as a clone, the method comprising:
- creating, by an application, a snapshot of a file, wherein the application is associated with a computer having a processor;
requesting, by the application, the clone of the snapshot;
generating, by the application, an empty sparse file, having at least one inode identifying the empty sparse file as the clone and pointing to the snapshot associated with the clone;
whereby, the clone is created using the sparse file that begins as the empty sparse file; and
reading data from the clone, wherein the reading from the clone comprises reading from the snapshot for unbacked data in the sparse file, whereby the snapshot presents the unbacked data to the clone and wherein reading from the snapshot for the unbacked data in the sparse file further comprises;
responsive to a read of data at a logical offset location in the sparse file of the clone resulting in an indication that modified data exists at the logical offset location in the sparse file of the clone, scanning the at least one inode for the logical offset location in the snapshot where the data is located; and
responsive to the scan of the at least one inode for the logical offset location verifying that the data at the logical offset location in the sparse file of the clone has been modified, preventing a read of the unbacked data from the snapshot.
0 Assignments
0 Petitions
Accused Products
Abstract
One embodiment is for using a sparse file as a clone. The method includes creating, by an application associated with a computer system, a snapshot of a file, such as an individual file, a collection of files, file system, directories, and so forth. Further, the method includes requesting, by the application, a clone of that created snapshot. Further still, the method includes generating, by the application, an empty sparse having at least one inode identifying the empty sparse file as the clone and pointing to the snapshot associated with the clone. Thereby, the requested clone is created using the created sparse file, which begins as an empty sparse file.
-
Citations
14 Claims
-
1. A method for using a sparse file as a clone, the method comprising:
-
creating, by an application, a snapshot of a file, wherein the application is associated with a computer having a processor; requesting, by the application, the clone of the snapshot; generating, by the application, an empty sparse file, having at least one inode identifying the empty sparse file as the clone and pointing to the snapshot associated with the clone; whereby, the clone is created using the sparse file that begins as the empty sparse file; and reading data from the clone, wherein the reading from the clone comprises reading from the snapshot for unbacked data in the sparse file, whereby the snapshot presents the unbacked data to the clone and wherein reading from the snapshot for the unbacked data in the sparse file further comprises; responsive to a read of data at a logical offset location in the sparse file of the clone resulting in an indication that modified data exists at the logical offset location in the sparse file of the clone, scanning the at least one inode for the logical offset location in the snapshot where the data is located; and responsive to the scan of the at least one inode for the logical offset location verifying that the data at the logical offset location in the sparse file of the clone has been modified, preventing a read of the unbacked data from the snapshot. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for using a sparse file as a clone, the system comprising:
-
at least one computer system having a processor; a creation module, in association with the at least one computer system, for creating a snapshot of a file; a request module, in association with the creation module, for requesting the clone of the snapshot; a generation module, in association with the request module, for generating an empty sparse file, having at least one inode identifying the empty sparse file as the clone and pointing to the snapshot associated with the clone; whereby, the clone is created using the sparse file beginning as the empty sparse file; and a read module, in association with the at least one computer system, for reading data from the clone, wherein the read module for reading from the clone comprises logic for reading from the snapshot for unbacked data in the sparse file, whereby the snapshot presents the unbacked data to the clone and wherein reading from the snapshot for the unbacked data in the sparse file further comprises logic for; responsive to a read of data at a logical offset location in the sparse file of the clone resulting in an indication that modified data exists at the logical offset location in the sparse file of the clone, scanning the at least one inode for the logical offset location in the snapshot where the data is located; and responsive to the scan of the at least one inode for the logical offset location verifying that the data at the logical offset location in the sparse file of the clone has been modified, preventing a read of the unbacked data from the snapshot. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer program product for using a sparse file as a clone, the computer program product comprising:
-
a computer readable storage medium having computer usable program code stored thereon, the computer usable program code comprising; the computer usable program code configured to; create, by an application, a snapshot of a file, wherein the application is associated with a computer having a processor; request, by the application, the clone of the snapshot; generate, by the application, an empty sparse file, having at least one inode identifying the empty sparse file as the clone and pointing to the snapshot associated with the clone; whereby, the clone is created using the sparse file that begins as the empty sparse file; and read data from the clone, wherein the computer usable program code configured to read from the clone comprises the code configured to read from the snapshot for unbacked data in the sparse file, whereby the snapshot presents the unbacked data to the clone and wherein the computer usable program code configured to read from the snapshot for the unbacked data in the sparse file is further configured to; responsive to a read of data at a logical offset location in the sparse file of the clone resulting in an indication that modified data exists at the logical offset location in the sparse file of the clone, scanning the at least one inode for the logical offset location in the snapshot where the data is located; and responsive to the scan of the at least one inode for the logical offset location verifying that the data at the logical offset location in the sparse file of the clone has been modified, preventing a read of the unbacked data from the snapshot. - View Dependent Claims (12, 13, 14)
-
Specification