Directories to determine set of live les consider les

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview:   Approach taken in FAT, FFS (fsck), and many app- level recovery schemes (e.g., Word) FFS: Create a File Normal opera'on: •  Allocate data block •  Write data block •  Allocate inode •  Write inode block •  Update bitmap of free blocks •  Update directory with file name - > file number •  Update modify 'me for directory Recovery: •  Scan inode table •  If any unlinked files (not in any directory), delete •  Compare free block bitmap against inode trees •  Scan directories for missing update/access 'mes Time propor'onal to size of disk FFS: Move a File Normal opera'on: •  Remove filename from old directory •  Add filename to new directory Recovery: •  Scan all directories to determine set of live files •  Consider files with valid inodes and not in any directory –  New file being created? –  File move? –  File dele'on? FFS: Move and Grep Process A Process B move file from x to y grep across x and y mv x/file y/ grep x/* y/* Will grep always see contents of file? Careful Ordering •  Pros –  Works with minimal support in the disk drive –  Works for most mul'- step opera'ons •  Cons –  Can require 'me- consuming recovery aNer a failure –  Difficult to reduce every opera'on to a safely interrup'ble sequence of writes –  Difficult to achieve consistency when mul'ple opera'ons occur concurrently Reliability Approach #2: Copy on Write File Layout •  To update file system, write a new version of the file system containing the update –  Never update in place –  Reuse exis'ng unchanged disk blocks •  Seems expensive! But –  Updates can be batched –  Almost all disk writes can occur in parallel •  Approach taken in network file server appliances (WAFL, ZFS) Copy on Write/Write Anywhere Root Inode Slots Fixed Location Inode File’s Indirect Blocks Inode Array (in Inode File) Anywhere Indirect Blocks Dat...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online