Methods for maintaining data and attribute coherency in instances of sharable files
First Claim
1. A method for sharing a file, the method comprising:
- checking for open instances of the file;
determining whether an open instance of the file has a shared bit of a first bitmap set to true;
opening another instance of the file with a shared bit of a second bitmap of the another instance set to true;
maintaining the shared bit of the second bitmap set to true so long as the open instance of the file or the another instance of the file is open;
checking the open instance of the file for an exclusive bit setting of true; and
failing the opening of another instance of the file if the exclusive bit of the open instance of the file was determined to be set to true.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods for sharing a file while maintaining consistency among instances of the file managed by a file system are disclosed. One exemplary method includes associating a file consistency protocol with an operating system (O/S). The file consistency protocol maintains file consistency between instances of the file associated with the file system using a set of file consistency protocol bits. The method then includes opening an instance of the file in a shared mode by setting a shared bit in the set of file consistency protocol bits associated with the file. A determination is then made as to the existence of another instance of the file. A shared bit the set of file consistency protocol bits associated with the another file is then set. In accordance with the method, a modification is made to the contents (e.g., data or attributes) of the instance of the file. A modified bit is then set in the set of file consistency protocol bits of the instance of the file. The modified bit is indicative of the modified contents, and an invalid bit is set in the set of file consistency protocol bits of the another file. The invalid bit is indicative of the modified contents of the instance of the file.
50 Citations
15 Claims
-
1. A method for sharing a file, the method comprising:
-
checking for open instances of the file;
determining whether an open instance of the file has a shared bit of a first bitmap set to true;
opening another instance of the file with a shared bit of a second bitmap of the another instance set to true;
maintaining the shared bit of the second bitmap set to true so long as the open instance of the file or the another instance of the file is open;
checking the open instance of the file for an exclusive bit setting of true; and
failing the opening of another instance of the file if the exclusive bit of the open instance of the file was determined to be set to true. - View Dependent Claims (2, 3, 4, 5, 6)
modifying contents of the another instance of the file;
setting a modified bit in the second bitmap to true; and
setting an invalid bit in the first bitmap of the open instance of the file to true;
wherein the invalid bit indicates that the contents of the open instance of the file are not consistent with the contents of the another instance of the file due to the modifying.
-
-
3. A method for sharing a file as recited in claim 2, further comprising:
communicating changes associated with the modifying of the contents of the another instance of the file to the open instance of the file.
-
4. A method for sharing a file as recited in claim 3, further comprising:
-
resetting the modified bit of the another instance of the file to false; and
resetting the invalid bit in the first bitmap to false.
-
-
5. A method for sharing a file as recited in claim 1, wherein each of the first bitmap and the second bitmap includes bit fields for a set of file consistency bits, the set of file consistency bits include an “
- M”
bit, an “
A”
bit, an “
E”
bit, an “
S”
bit and an “
I”
bit.
- M”
-
6. A method for sharing a file as recited in claim 5, wherein the “
- M”
bit is a modify indicator bit, the “
A”
bit is an attribute indicator bit, the “
E”
bit is an exclusive indicator bit, the “
S”
bit is a shared indicator bit, and the “
I”
bit is an invalid indicator bit.
- M”
-
7. A method for sharing a file managed by a file system, the method comprising:
-
associating a file consistency protocol with an operating system (O/S), the file consistency protocol maintaining file consistency between instances of the file associated with the file system using a set of file consistency protocol bits;
checking each instance of the file for an exclusive bit setting of true;
failing an opening of another instance of the file if the exclusive bit of at least one instance of the file was determined to be set to true;
opening another instance of the file in a shared mode by setting a shared bit in the set of file consistency protocol bits associated with the another instance of the file if the exclusive bit of each instance of the file was determined to be set to false;
setting a shared bit in the set of file consistency protocol bits associated with each instance of the file;
modifying contents of one instance of the file;
setting a modified bit in the set of file consistency protocol bits associated with the one instance of the file, the modified bit being indicative of the modified contents; and
setting an invalid bit in the set of file consistency protocol bits associated with each instance of the file other than the one instance of the file, the invalid bit being indicative of the modified contents of the one instance of the file. - View Dependent Claims (8, 9, 10)
communicating an update representing the change of the contents of the one instance of the file to each instance of the file other than the one instance of the file.
-
-
9. A method for sharing a file managed by a file system as recited in claim 8, wherein the communicating includes messaging.
-
10. A method for sharing a file managed by a file system as recited in claim 8, further comprising:
-
resetting the modified bit in the set of file consistency protocol bits associated with the one instance; and
resetting the invalid bit in the set of file consistency protocol bits associated with each instance of the file other than the one instance of the file, the resetting of the modified bit and the invalid bit being indicative of successful communication of the update.
-
-
11. A method for sharing a file, the method comprising:
-
checking for open instances of the file;
determining whether an open instance of the file has an exclusive bit of a first bitmap set to true;
opening another instance of the file with a shared bit of a second bitmap of the another instance set to true if the open instance of the file does not have an exclusive bit of the first bitmap set to true;
setting a shared bit in the first bitmap to true;
maintaining the shared bit of the first bitmap and second bitmap set to true so long as the open instance of the file and the another instance of the file is open;
modifying contents of the another instance of the file;
setting a modified bit in the second bitmap to true; and
setting an invalid bit in the first bitmap of the open instance of the file to true;
wherein the invalid bit indicates that the contents of the open instance of the file are not consistent with the contents of the another instance of the file due to the modifying. - View Dependent Claims (12, 13, 14, 15)
communicating changes associated with the modifying of the contents of the another instance of the file to the open instance of the file.
-
-
13. A method for sharing a file as recited in claim 12, further comprising:
-
resetting the modified bit of the another instance of the file to false; and
resetting the invalid bit in the first bitmap to false.
-
-
14. A method for sharing a file as recited in claim 11, wherein each of the first bitmap and the second bitmap includes bit fields for a set of file consistency bits, the set of file consistency bits include an “
- M”
bit, an “
A”
bit, an “
E”
bit, an “
S”
bit and an “
I”
bit.
- M”
-
15. A method for sharing a file as recited in claim 14, wherein the “
- M”
bit is a modify indicator bit, the “
A”
bit is an attribute indicator bit, the “
E”
bit is an exclusive indicator bit, the “
S”
bit is a shared indicator bit, and the “
I”
bit is an invalid indicator bit.
- M”
Specification