]> git.neil.brown.name Git - LaFS.git/blob - super.doc
README update
[LaFS.git] / super.doc
1
2 Superblocks - for there are many.
3
4 A LaFS system can involve quite a number of superblocks.
5 - There is one for each device.  This needed as sometimes
6   generic code wants to find a superblock from a device
7   id (get_super, user_get_super) for such things as:
8   + ustat system call (statfs on a device)
9   + flush a device
10          fsync_bdev called from
11              invalidate_partition - which also calls invalidate_device
12              BLKPG_DEL_PARTITION and BLKFLSBUF ioctls
13   + freeze a device prior to LVM snapshots (freeze_bdev)
14   + invalidate a device (__invalidate_device) e.g. when device
15      seems to change.
16   + quota management
17        sys_quotactl is given a device number!
18
19 - There is one for each active fileset and
20   one for each active snapshot of a fileset.
21   These are the ones that are mounted and have interesting s_root
22
23 The s_fs_info for each points to the one 'struct fs' which
24 describes the entire filesystem.
25
26 'struct fs' contains pointers to all device inodes and to all
27 To the root of all mounted snapshots.  Subordinate filesystems
28 aren't currently recorded in 'struct fs' but probably aren't
29 needed there...
30
31 One of the device superblock is chosen as the 'prime_sb' and this
32 is also the superblock for the primary fileset.
33 This with only one device and no mounted snapshots or subordinate
34 filesets, there is only one superblock.