Thesis (759K PDF)

Thesis (759K PDF)

An Object Store for The Walnut Kernel by Stewart Smith, BCompSc Thesis Submitted by Stewart Smith in partial fulfillment of the Requirements for the Degree of Bachelor of Computer Science with Honours (1608) in the School of Computer Science and Software Engineering at Monash University Monash University November, 2003 c Copyright by Stewart Smith 2003 To all those times where a data store has irritated you, and all the hours you spent fscking the fscking disk, and those long hours spent mkfsing with ext2, please remember those bad blocks that made ReiserV3 go to goo. When CVS irritated you heaps, its branching has been known to make grown men weep. But most of all, we must remember the accidental delete and save that left you without that important something, that you just couldn't get. And that paragraph that you had last week, which you just wish you had now. This thesis is definitely not dedicated to fsck. iii Contents List of Figures : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : vii Abstract : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : x Acknowledgments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : xii 1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 2 Literature Review : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3 2.1 Persistent Systems . 3 2.1.1 The Walnut Kernel . 4 2.1.2 Mungi . 9 2.1.3 Consistency in Persistent Systems . 10 2.2 Existing File Systems . 10 2.2.1 BSD FFS . 11 2.2.2 Linux ext2 . 15 2.2.3 Linux ext3 . 16 2.2.4 Network Appliance's WAFL . 16 2.2.5 Reiser FS . 17 2.2.6 BeOS BeFS . 19 2.2.7 SGI's XFS . 20 2.2.8 MacOS and MacOS X's HFS and HFS Plus . 22 2.2.9 BSD LFS . 23 2.3 Revision Tracking . 24 2.4 Conclusions . 25 iv 3 Constraints on a Walnut Object Store : : : : : : : : : : : : : : : : : : : : : 26 3.1 Constraints from attributes of physical disks . 26 3.2 Walnut Requirements . 27 3.3 Walnut niceties . 28 3.3.1 Networked Volumes and Caching . 28 3.3.2 Backup . 28 3.4 Inter-Object Dependencies . 28 3.5 Generally good requirements . 29 3.5.1 Magic Numbers . 29 3.6 Revision Tracking . 29 3.6.1 Flexibility and Extensibility . 30 4 Design of a Walnut Object Store : : : : : : : : : : : : : : : : : : : : : : : : 32 4.1 Volume Identification - the Super Block . 32 4.2 Block Addressing . 34 4.2.1 Block Runs/Extents . 34 4.2.2 Allocation (Cylinder) Groups . 35 4.2.3 Block Size . 35 4.3 Free Block Tracking . 36 4.3.1 Block Bitmap . 36 4.3.2 Block B+Tree . 37 4.3.3 Our Implementation . 37 4.4 Storing Objects . 37 4.5 Object Node (o-node) . 37 4.5.1 In o-node data . 38 4.5.2 Object Forks and Meta-Data design . 38 4.5.3 Access control to meta-data . 40 4.6 Revision Tracking . 41 4.6.1 Temporal Windowing . 44 4.7 Object Indexing . 46 4.7.1 Hashing Object IDs . 46 4.7.2 Sparse File approach . 47 v 4.7.3 B+Tree approach . 47 5 Implementation of a Walnut Object Store : : : : : : : : : : : : : : : : : : 50 5.1 General Implementation Notes . 50 5.1.1 Endianness . 50 5.2 Super Block . 51 5.2.1 Superblock fields . 51 5.2.2 Superblock Constants . 53 5.2.3 FCFS Super Block Flags . 54 5.3 Block Run . 54 5.3.1 Special cases . 56 5.3.2 Corruption . 56 5.4 O-Node . 57 5.4.1 O-Node fields . 57 5.4.2 O-Node Flags . 58 5.5 Forks . 58 5.6 O-Node Index . 60 5.6.1 O-node Index Node . 60 5.6.2 O-node Index Leaf . 60 5.7 Revision Tracking . 62 5.7.1 Revision Information fork . 62 5.7.2 Revision Data Fork . 64 6 Conclusion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 66 References : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 68 Simulation Source Code : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 72 .1 Source Code License . 72 .2 Testkit Block Device Simulator . 79 .3 FCFS Source . 99 vi List of Figures 2.1 Structure of a Walnut Kernel Capability . 4 2.2 Walnut Disk Layout . 7 2.3 Survey of disk usage on various UNIX based systems . 8 2.4 Direct, Indirect, Doubly Indirect and Triply indirect blocks in file systems such as FFS and ext2 . 12 2.5 FFS Cylinder Group . 14 2.6 User Access to Snapshots in WAFL . 17 2.7 WAFL Before and After Snapshot . 17 2.8 BeFS Block Run . 20 2.9 BSD LFS IFILE . 23 3.1 Separated Magic Numbers . 31 4.1 FCFS Design thought process . 33 4.2 FCFS Allocation Group on disk layout . 35 4.3 Reference to data block vs. data inside the o-node block . 39 4.4 Meta-Data Design 1 . 41 4.5 Meta-Data Design 2 . 42 4.6 FCFS O-Node layout . 43 4.7 Revision Tracking . 45 4.8 Revision Tracking - On Disk . 46 4.9 Sparse object index wasted space . 47 4.10 FCFS O-Node Index Tree . 49 vii Listings 5.1 struct fcfs sb . 52 5.2.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    184 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us