CS430 Lab 2: btrfs Scavanger Hunt

Due Friday, September 20

btrfs is an abbreviation of "B-Tree Filesystem". It is the successor to the previous Linux B-tree file system ReiserFS. NTFS, introduced with Windows NT and used on all recent Windows desktop operating systems, also uses a B-tree approach to file storage.
Lab does not require you to determine how btrfs works! That will be covered in general in lecture, and pieces of source code may be covered.
  1. How many lines of code are in btrfs? The code is located in fs/btrfs under the kernel source, and you may assume all lines of code in that directory are part of btrfs (probably true).
  2. How many distinct structs are used within the btrfs code? Within 20 or so is close enough.
  3. Where in the file ctree.h is a macro defined with a loop inside it? Hint: There are a lot of macros in the file. Look for loops first, then figure out which one is in a macro.

Turning in the assignment

Upload your results to the class upload area.