Identifying partial update for tape file system
First Claim
1. A computer system for writing indexes in a storage of a file system, the computer system comprising:
- a memory;
a storage, the storage being a linear tape filesystem and having an index partition and a data partition, wherein indexes of the file system are recorded to the index partition, and wherein the indexes and data body of the file system are recorded to the data partition in an appending manner; and
a processor in communication with the memory and the storage, wherein the computer system is configured to perform a method, the method comprising;
receiving, from a first application, a first request to open a first file of a plurality of files in the storage;
creating, in the memory, a first file descriptor for the first file, the first file descriptor including a first update flag that references the first file;
determining that the first file is being updated by the first application;
in response to determining that the first file is being updated by the first application, setting the first update flag in the first file descriptor to a value representing that the first file is being updated;
receiving a request to write an index of the file system in the storage;
determining, in response to receiving the request to write an index, that a specific file from the plurality of files is being updated by determining that the specific file is the first file and a summary update flag referencing the first file is set to the value indicating that the first file is being updated;
writing, in response to determining that the first file is being updated, in the storage, an index including an extended attribute for the first file, the extended attribute indicating that the first file was being updated at the time the index was written;
receiving, from a second application, a second request to open the first file in the storage;
creating a second file descriptor for the first file, the second file descriptor including a second update flag referencing the first file;
determining that the first file is being updated by the second application;
in response to determining that the first file is being updated by the second application, setting the second update flag in the second file descriptor to the value representing that the file is being updated;
maintaining collected index data of the file system in the memory, the collected index data comprising a summary update flag referencing the first file;
determining whether the first update flag is set to a value representing that the first file is being updated and determining whether the second update flag is set to a value representing that the first file is being updated;
setting the summary update flag to the value indicating that the first file is being updated in response to either the first or the second update flag being determined to be set to a value representing that the first file is being updated; and
deleting the first file descriptor in response to a request from the first application to close the first file;
deleting the second file descriptor in response to a request from the second application to close the first file;
deleting the summary update flag in response to either the first and the second file descriptor being deleted;
writing, in response to determining that the first file is not being updated, in the storage, a new index not including an extended attribute for the first file, the new index written in the storage an appending manner such that the index remains available for access.
1 Assignment
0 Petitions
Accused Products
Abstract
A request to open a file from a plurality of files in a storage is received from an application. The storage is made up of an index partition, containing recordings of file system indexes, and a data partition, containing recordings of the indexes and the file system data body. A file descriptor is created with an update flag that references the file. A determination is made that the file is being updated by the application, and the update flag is set to a value representing that the file is being updated. A request to write an index of the file system is received. A determination is made whether a specific file from the plurality of files is being updated. The index is written to the storage with an extended attribute for the specific file indicating that the specific file was being updated at the time the index was written.
-
Citations
1 Claim
-
1. A computer system for writing indexes in a storage of a file system, the computer system comprising:
-
a memory; a storage, the storage being a linear tape filesystem and having an index partition and a data partition, wherein indexes of the file system are recorded to the index partition, and wherein the indexes and data body of the file system are recorded to the data partition in an appending manner; and a processor in communication with the memory and the storage, wherein the computer system is configured to perform a method, the method comprising; receiving, from a first application, a first request to open a first file of a plurality of files in the storage; creating, in the memory, a first file descriptor for the first file, the first file descriptor including a first update flag that references the first file; determining that the first file is being updated by the first application; in response to determining that the first file is being updated by the first application, setting the first update flag in the first file descriptor to a value representing that the first file is being updated; receiving a request to write an index of the file system in the storage; determining, in response to receiving the request to write an index, that a specific file from the plurality of files is being updated by determining that the specific file is the first file and a summary update flag referencing the first file is set to the value indicating that the first file is being updated; writing, in response to determining that the first file is being updated, in the storage, an index including an extended attribute for the first file, the extended attribute indicating that the first file was being updated at the time the index was written; receiving, from a second application, a second request to open the first file in the storage; creating a second file descriptor for the first file, the second file descriptor including a second update flag referencing the first file; determining that the first file is being updated by the second application; in response to determining that the first file is being updated by the second application, setting the second update flag in the second file descriptor to the value representing that the file is being updated; maintaining collected index data of the file system in the memory, the collected index data comprising a summary update flag referencing the first file; determining whether the first update flag is set to a value representing that the first file is being updated and determining whether the second update flag is set to a value representing that the first file is being updated; setting the summary update flag to the value indicating that the first file is being updated in response to either the first or the second update flag being determined to be set to a value representing that the first file is being updated; and deleting the first file descriptor in response to a request from the first application to close the first file; deleting the second file descriptor in response to a request from the second application to close the first file; deleting the summary update flag in response to either the first and the second file descriptor being deleted; writing, in response to determining that the first file is not being updated, in the storage, a new index not including an extended attribute for the first file, the new index written in the storage an appending manner such that the index remains available for access.
-
Specification