MAINTAINING REFERENCES TO RELATED OBJECTS IN A DISTRIBUTED STORAGE NETWORK
A method for execution by a processing module includes receiving a delete snapshot request and accessing a directory file entry. The processing module then determines whether a second directory file is also indicated for an associated source name, and when a second file directory is indicated, a second directory file entry is accessed and the associated source name is removed from the second directory file. The method continues with the processing module determining whether a snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry and deleting a corresponding data file when the corresponding snapshot is indeed the most recent.
1 . A method for execution by one or more processing modules of one or more computing devices of a dispersed storage network (DSN), the method comprises:
receiving a delete snapshot request;
identifying a first directory file associated with the delete snapshot request;
accessing a first directory file entry associated with the delete snapshot request, wherein the first directory file entry corresponds to the first directory;
determining whether a second directory file is indicated for a source name reference associated with the delete snapshot request;
when the second directory file is indicated for the source name reference associated with the delete snapshot request, accessing the second directory file;
accessing a second directory file entry, wherein the second directory file entry corresponds to the second directory file, and further wherein second directory file entry is associated with the source name reference;
removing the source name reference from the second directory file ;
determining whether a snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry; and
when the snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry, deleting a data file corresponding to the delete snapshot request.
2 . The method of claim 1 , further comprises:
when the snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry, further deleting the first directory file entry; and
deleting a segment allocation table (SAT) associated with the delete snapshot request.
3 . The method of claim 2 , wherein the deleting the SAT associated with the delete snapshot request further comprises:
outputting one or more delete encoded slice messages to DSN memory, wherein the one or more delete encoded slice messages are associated with the SAT; and
deleting one or more sets of encoded slices corresponding to the SAT.
4 . The method of claim 2 , wherein the deleting the first directory file entry comprises:
producing a modified first directory file;
dispersed storage error encoding the modified first directory file to produce at least one set of encoded modified first directory slices;
and outputting the at least one set of encoded modified first directory slices to memory associated with the DSN.
5 . The method of claim 1 , further comprises:
when the snapshot corresponding to the delete snapshot request is not the most recent snapshot available for the first directory file entry, deleting the first directory file entry; and
deleting a segment allocation table (SAT) associated with the delete snapshot request.
6 . The method of claim 5 , wherein the deleting the SAT associated with the delete snapshot request further comprises:
outputting one or more delete encoded slice messages to DSN memory, wherein the one or more delete encoded slice messages are associated with the SAT; and
deleting one or more sets of encoded slices corresponding to the SAT.
7 . The method of claim 5 , wherein the deleting the first directory file entry comprises:
producing a modified first directory file;
dispersed storage error encoding the modified first directory file to produce at least one set of encoded modified first directory slices;
and outputting the at least one set of encoded modified first directory slices to memory associated with the DSN.
8 . The method of claim 1 , wherein the delete snapshot request includes at least one of a snapshot identifier (ID), a file name, a first directory source name, and a vault ID.
9 . The method of claim 1 , wherein the accessing a first directory file entry associated with the delete snapshot request includes at least one of:
obtaining a source name corresponding to the first directory file;
retrieving one or more sets of dispersed storage encoded slices associated with the first directory file from DSN memory;
dispersed storage error decoding the one or more sets of dispersed storage encoded slices associated with the first directory file to produce the first directory file;
identifying an entry of the first directory file corresponding to a snapshot identifier, wherein the snapshot identifier corresponds to the delete snapshot request; and
extracting the first directory file entry.
10 . The method of claim 1 , wherein the determining whether a second directory is indicated for a source name reference associated with the delete snapshot request further comprises:
accessing a linked directory source names field corresponding to the first directory file entry.
11 . The method of claim 1 , wherein the determining whether a snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry is based on extracting a snapshot identifier from a snapshot associated with the second directory file and comparing it to a snapshot identifier from a snapshot associated with the first directory file.
12 . The method of claim 1 , wherein the deleting a data file corresponding to the delete snapshot request comprises:
extracting a source name of the data file from first directory file entry;
outputting one or more delete encoded data slice messages to DSN memory; and
deleting the data file and a snapshot identifier associated with the delete snapshot request from DSN memory.
13 . A dispersed storage (DS) processing unit comprises:
a first module, when operable within a computing device, that causes the computing device to:
receive a delete snapshot request;
identify a first directory file associated with the delete snapshot request;
access a first directory file entry associated with the delete snapshot request, wherein the first directory file entry corresponds to the first directory; and
determine whether a second directory file is indicated for a source name reference associated with the delete snapshot request;
a second module, when operable within a computing device, that causes the computing device to:
when the second directory file is indicated for the source name reference associated with the delete snapshot request, access the second directory file;
access a second directory file entry, wherein the second directory file entry corresponds to the second directory file, and further wherein second directory file entry is associated with the source name reference;
remove the source name reference from the second directory file;
determine whether a snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry; and
when the snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry, delete a data file corresponding to the delete snapshot request.
14 . The DS processing unit of claim 13 , wherein the second module further causes the computing device to:
when the snapshot corresponding to the delete snapshot request is the most recent snapshot available for the first directory file entry, delete the first directory file entry; and
delete a segment allocation table (SAT) associated with the delete snapshot request.
15 . The DS processing unit of claim 14 , wherein the second module further causes the computing device to:
output one or more delete encoded slice messages to DSN memory, wherein the one or more delete encoded slice messages are associated with the SAT; and
delete one or more sets of encoded slices corresponding to the SAT.
16 . The DS processing unit of claim 13 , wherein the second module further causes the computing device to:
when the snapshot corresponding to the delete snapshot request is not the most recent snapshot available for the first directory file entry, delete the first directory file entry; and
delete a segment allocation table (SAT) associated with the delete snapshot request.
17 . The DS processing unit of claim 16 , wherein the second module further causes the computing device to:
output one or more delete encoded slice messages to DSN memory, wherein the one or more delete encoded slice messages are associated with the SAT; and
delete one or more sets of encoded slices corresponding to the SAT.
18 . The DS processing unit of claim 13 , wherein the delete snapshot request includes at least one of a snapshot identifier (ID), a file name, a first directory source name, and a vault ID.