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.

fields will remain the same. However, if a file system designer need to change the<br />

configuration <strong>of</strong> other fields, <strong>for</strong> instance number <strong>of</strong> indirect block in inode<br />

configuration, he should change the code manually.<br />

On storage allocation mechanism, <strong>Gannet</strong>FS inode is dynamically allocated which<br />

allocates block space to a file as needed. As at the creation <strong>of</strong> an inode, array <strong>of</strong> data<br />

blocks is not allocated. Those data blocks are being allocated only when there is data<br />

to be stored on data blocks. Hence, file system is efficient in term <strong>of</strong> space usage.<br />

Direct block represents a list <strong>of</strong> blocks <strong>of</strong> a file. In this design, inode can store first 4<br />

blocks addresses on inode itself directly to simplify finding file data. This allows the<br />

first 192 byte <strong>of</strong> data to be located directly by using simple indexed lookup.<br />

Providing enough direct blocks in the inode to map the data improves the<br />

per<strong>for</strong>mance. However, there is a trade-<strong>of</strong>f between the size <strong>of</strong> the inode <strong>and</strong> how<br />

much data on inode can map.<br />

However, <strong>for</strong> file which has size greater than 192 byte, direct block cannot<br />

accommodate the entire file. In order to overcome this constraint, <strong>Gannet</strong>FS inode<br />

can use single indirect block, block_indirect1. When an inode uses an indirect block,<br />

it stores the block address <strong>of</strong> the indirect block instead <strong>of</strong> block addresses <strong>of</strong> the<br />

data. Indirect block contains pointers to the blocks that make up the data <strong>of</strong> the file.<br />

It does not contain metadata about the file, only pointers to the blocks <strong>of</strong> the file.<br />

Thus, with one block address, indirect block can access a much larger number <strong>of</strong><br />

data blocks.<br />

In <strong>Gannet</strong>FS file system, data block addresses are 4 byte (32 bit). Thus, given a file<br />

system block size <strong>of</strong> 64 bytes <strong>and</strong> a block address size <strong>of</strong> 4 byte, an indirect block<br />

can refer to 16 blocks. There<strong>for</strong>e, by using single indirect block, <strong>Gannet</strong>FS can store<br />

file with maximum size 1024 byte.<br />

38

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

Saved successfully!

Ooh no, something went wrong!