30.07.2013 Views

Development and Implementation of a File System for Gannet Virtual ...

Development and Implementation of a File System for Gannet Virtual ...

Development and Implementation of a File System for Gannet Virtual ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

is quite small. Furthermore, the size <strong>of</strong> data block can be configured to be bigger to<br />

allow storing large files.<br />

2.4.2 Metadata Representation <strong>of</strong> a Directory<br />

Unix directories are considered as files whose data blocks maintain list <strong>of</strong> entries.<br />

The list stores the names <strong>and</strong> inodes id <strong>for</strong> each file <strong>and</strong> directory reside within it.<br />

The structure design <strong>for</strong> the list determines the per<strong>for</strong>mance <strong>of</strong> traversal operation<br />

<strong>and</strong> fast r<strong>and</strong>om lookup to locate a file (Wang et al. 2006).<br />

Thus, the mapping <strong>of</strong> name to inode numbers on directory is very important. There<br />

are several ways to maintain the name to inode number mapping. Unix-style file<br />

systems use a simple linear list to store the entries <strong>of</strong> a directory (McKusick et al.<br />

1996). The major advantage is space effective as it is simple to implement. However,<br />

the disadvantage rise when there are considerable amount <strong>of</strong> files reside in a<br />

directory. This implementation works fine in small number <strong>of</strong> files, but will<br />

degraded significantly as the number <strong>of</strong> files increases since the time complexity is<br />

O(n).<br />

Another approach to mapping the name <strong>and</strong> inode number is to use a B+trees as<br />

implemented on BeFS <strong>and</strong> also XFS (Sweeney 1996). The data structure stores pairs<br />

<strong>of</strong> key <strong>and</strong> value as name <strong>and</strong> inode number respectively, in a balanced tree<br />

structure. By using B+trees data structure, the time complexity can be reduced to<br />

O(Log n) to look up an item. Furthermore, BeFS <strong>and</strong> XFS also need B+tree data<br />

structure <strong>for</strong> indexing the file attributes.<br />

Another approach is used a hashing table (Fagin et al. 1979) as directory<br />

representation. The structure is built by a hierarchy <strong>of</strong> hash tables, using file names<br />

as keys <strong>and</strong> inode numbers as values. By using hash table data structure, the time<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!