System and method for representing named data streams within an on-disk structure of a file system
First Claim
1. A method for providing an on-disk representation of a named data stream associated with at least one of a directory inode and file inode of a file system of a network storage appliance, the method comprising the steps of:
- allocating a first free inode of the file system;
inserting a stream_dir type into a first type field of the first free inode to thereby convert the first free inode to a stream directory inode, the stream directory inode having a first data section with a first pointer configured to reference a stream directory data block;
modifying a xinode field of the file inode to reference the stream directory inode;
allocating an entry of the stream directory data block to store a name of the named data stream, the allocated entry further allocating a second free inode of the file system; and
inserting a stream type into a second type field of the second free inode to convert the second free inode to a stream inode for the named data stream, the stream inode having a second data section with a second pointer that references a user data block associated with the named data stream.
2 Assignments
0 Petitions
Accused Products
Abstract
A technique provides on-disk representations of multiple named data streams for a file system of a network storage appliance. The network storage appliance or filer includes a file system that implements a Write Anywhere File Layout (WAFL) disk format, wherein files are described by inodes of which there may be various types, including directory and regular inodes. A named stream inode type is defined that represents named data streams in the WAFL file system. Multiple data streams may be stored on disk(s) of the filer as representations embodying the named stream inode type associated with a file. The names and file handles of the data streams are stored in a “hidden” directory within the file system that is referenced by the base mode. The hidden directory is represented as a stream_dir inode type.
222 Citations
29 Claims
-
1. A method for providing an on-disk representation of a named data stream associated with at least one of a directory inode and file inode of a file system of a network storage appliance, the method comprising the steps of:
-
allocating a first free inode of the file system;
inserting a stream_dir type into a first type field of the first free inode to thereby convert the first free inode to a stream directory inode, the stream directory inode having a first data section with a first pointer configured to reference a stream directory data block;
modifying a xinode field of the file inode to reference the stream directory inode;
allocating an entry of the stream directory data block to store a name of the named data stream, the allocated entry further allocating a second free inode of the file system; and
inserting a stream type into a second type field of the second free inode to convert the second free inode to a stream inode for the named data stream, the stream inode having a second data section with a second pointer that references a user data block associated with the named data stream. - View Dependent Claims (2, 3, 4, 5, 6, 7)
loading a root inode and its referenced data blocks from a disk into a memory of the network storage appliance; and
searching contents of the root inode data blocks for a directory name of the directory inode.
-
-
6. The method of claim 5 further comprising the steps of:
-
upon finding the directory name, loading the directory inode and its referenced data blocks into memory; and
searching contents of the directory inode data blocks for a filename of the file inode.
-
-
7. The method of claim 6 further comprising the step of, upon finding the filename, loading the file inode and its referenced data blocks into the memory.
-
8. A system for providing on-disk representations of multiple named data streams within a filer, the system comprising:
-
a processor;
a memory coupled to the processor and having locations addressable by the processor;
at least one disk coupled to the memory and processor; and
an operating system resident in the memory locations and invoking storage operations in support of a file system configured to logically organize information as a hierarchical structure of directory and file inodes on the disk, each named data stream stored on the disk as a representation embodying a stream inode associated with a file inode, each on-disk file inode having a default data stream and at least one named data stream inode. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer readable medium containing executable program instructions for providing an on-disk representation of a named data stream associated with at least one of a directory inode and file inode of a file system, the executable program instructions comprising program instructions for:
-
allocating a first free inode of the file system;
inserting a stream_dir type into a first type field of the first free inode to thereby convert the first free inode to a stream directory inode, the stream directory inode having a first data section with a first pointer configured to reference a stream directory data block;
modifying a xinode field of the file inode to reference the stream directory inode;
allocating an entry of the stream directory data block to store a name of the named data stream, the allocated entry further allocating a second free inode of the file system; and
inserting a stream type into a second type field of the second free inode to convert the second free inode to a stream inode for the named data stream, the stream inode having a second data section with a second pointer that references a user data block associated with the named data stream.
-
-
20. Apparatus for providing an on-disk representation of a named data stream associated with at least one of a directory inode and file inode of a file system of a filer;
- the apparatus comprising;
means for allocating a first free inode of the file system;
means for inserting a stream_dir type into a first type field of the first free inode to thereby convert the first free inode to a stream directory inode, the stream directory inode having a first data section with a first pointer configured to reference a stream directory data block;
means for modifying a xinode field of the file inode to reference the stream directory inode;
means for allocating an entry of the stream directory data block to store a name of the named data stream, the allocated entry further allocating a second free inode of the file system; and
means for inserting a stream type into a second type field of the second free inode to convert the second free inode to a stream inode for the named data stream, the stream inode having a second data section with a second pointer that references a user data block associated with the named data stream.
- the apparatus comprising;
-
21. A storage system for providing on-disk representations of multiple named data streams within a computer, the system comprising:
an operating system resident in a memory and invoking storage operations in support of a file system configured to logically organize information as a hierarchical structure of directory and file inodes on the disk, each named data stream stored on the disk as a representation embodying a stream inode associated with a file inode, each on-disk file inode having a default data stream and at least one named data stream inode.
-
22. A method for accessing an on-disk representation of a named data stream associated with at least one of a directory inode and file inode of a file system of a server computer, the method comprising the steps of:
-
sending a packet from a client to the server over a network medium, the packet encapsulating a record requesting a file service directed to the named data stream;
creating a message from the record and passing the message to a file system layer of the server;
loading a stream inode and a referenced data block for the named data stream from a disk into a memory of the server; and
processing the stream inode in accordance with the requested file service. - View Dependent Claims (23, 24, 25, 26)
loading a base inode of the stream inode from the disk into the memory;
updating a modification time stamp stored in the base inode for the named data stream;
updating the referenced data block as instructed by the write operation;
marking the referenced data block, the base inode and the stream inode dirty; and
flushing the marked block and inodes to the disk.
-
-
25. The method of claim 22 wherein the requested file service is a read operation.
-
26. The method of claim 25 further comprising the steps of:
-
loading a base inode of the stream inode from the disk into the memory;
updating an access time stamp stored in the base inode for the named data stream;
retrieving data contained in the referenced data block for delivery to the client;
marking the base inode dirty; and
flushing the marked inode to the disk.
-
-
27. A method for accessing an on-disk representation of a named data stream associated with at least one of a directory inode and file node of a file system of a server computer, the method comprising the steps of:
-
sending a packet from a client to the server over a network medium, the packet encapsulating a record requesting a file service directed to the named data stream;
creating a message from the record and passing the message to a file system layer of the server;
loading a base inode referenced by a file handle of the message from a disk into a memory of the server;
determining whether a predetermined flag of the base inode is asserted and, if so, loading a stream directory inode referenced by the base inode, along with a stream directory block referenced by the stream directory inode, into the memory;
loading a stream inode for the named data stream referenced by the stream directory block into the memory; and
retrieving (i) a name of the stream inode from the stream directory block and (ii) a size of the stream inode from the stream inode for delivery to the client.
-
-
28. A multi-protocol data access storage system for providing on-disk representations of multiple named data streams within a computer, the system comprising:
an operating system resident in a memory of the computer and invoking storage operations in support of a file system configured to logically organize information as a hierarchical structure of directory and file inodes on the disk, the operating system including a file system protocol layer configured to provide data access in support of a plurality of file system protocols, each named data stream stored on the disk as a representation embodying a stream inode associated with a file inode, each on-disk file inode having a default data stream and at least one named data stream inode. - View Dependent Claims (29)
Specification