Download presentation
Presentation is loading. Please wait.
1
Modular approaches In file system development
The problem of creeping featurism and upgrading the old abstraction basis
2
Edward Shishkin edward.shishkin@gmail.com edward@redhat.com
3
VFSw (Sun Microsystems, 1985)
Logical FS sys_mount() sys_open() sys_read() sys_write() .... VFS file_operations inode_operations address_space_operations FS VFSw: Virtual File System switches
4
Switches (example) Name resolution root while() { ...
inode_ops = get_inode_ops(); inode_ops->lookup(); } root ext4 xfs
5
Extended Attributes (Xattrs)
VFS FS xattrs
6
Journalling VFS FS xattrs journalling
7
Extents and delayed allocation
VFS FS journalling xattrs extents delayed allocation
8
Tail packing VFS xattrs journalling FS extents delayed allocation
9
Tail<->extent conversion
VFS FS journalling xattrs extents delayed allocation t-e conversion tail packing
10
Delayed balancing VFS xattrs journalling FS extents delayed allocation
t-e conversion tail packing delayed balancing
11
Transparent compression
VFS FS journalling xattrs extents delayed allocation t-e conversion tail packing compression delayed balancing
12
Transparent encryption
VFS FS journalling xattrs extents delayed allocation t-e conversion tail packing compression encryption delayed balancing
13
Delay of actions Action What is affected external fragmentation,
performance 1. Allocation internal fragmentation, performance 2. Balancing 3. Compression performance 4. Encryption performance
14
Sub-volumes VFS xattrs journalling FS extents delayed allocation
t-e conversion tail packing compression delayed balancing encryption sub-volumes
15
Sub-volumes A B C D A' B' C' D'
16
Snapshots and WA-logging
VFS FS xattrs journalling extents delayed allocation t-e conversion tail packing compression delayed balancing WA-logs encryption sub-volumes snapshots
17
Logging techniques Journal I. Journalling (overwrite) Permanent
location New permanent location II. WA-logging (relocate)
18
Checksums VFS xattrs journalling FS checksums extents delayed
allocation t-e conversion tail packing compression delayed balancing WA logs encryption sub-volumes snapshots
19
Data de-duplication VFS xattrs journalling FS checksums extents
delayed allocation t-e conversion tail packing compression delayed balancing WA logs encryption sub-volumes snapshots data de-dup
20
Raid and LVM in FS layer FS VFS xattrs journalling checksums delayed
allocation extents t-e conversion tail packing compression delayed balancing encryption WA logs sub-volumes snapshots data de-dup raid LVM
21
1) How to maintain? 2) How to change?
VFS FS xattrs journalling checksums delayed allocation extents t-e conversion tail packing compression delayed balancing encryption COW sub-volumes snapshots data de-dup raid LVM
22
Possible ways to implement a new feature in the FS layer:
Write a new FS from scratch Add this feature to an existing FS Possible ways to implement a new feature in the FS layer:
23
Cost of a modern local FS
Kernel module: 25 human years Fsck and user-space utilities: 8 human years Conclusion: We should refuse the first way: writing FS from scratch is too expensive (and the cost tends to increase with years)!
24
How FS should be designed to minimize overheads when adding a new feature? To answer on this question we need to possess a deep understanding of what a file system feature is. And some progress in this direction is possible with 2 different approaches: Approach #1: DAGI, plugins (Reiser4) Approach #2: Translators (GlusterFS)
25
Introducing a new interface is not overdesign if at least one of the following takes place:
encapsulating disk formats switches transitions chances that it will be used by other subsystems
26
VFS TREE ->search_by_key(); ->insert_object(balance_flags); ->cut_object(balance_flags); ->balance(); FS TREE
27
VFS NODE ->lookup(); ->create_item(); ->delete_item(); ->shift(); ... FS TREE ITEM ->lookup(); ->number_of_units(); ->mergeable(this, neighbor); ->read(); ->write(); ->read_pages(); ... ITEM NODE
28
Managing transactions
VFS TXM ->init_context(); ->exit_context(); ->capture_block(); ... FS TXM TREE ATOM ATOM ->mark_block_dirty(); ->flush(); ->commit(); ... ITEM NODE Managing transactions
29
Delayed actions VFS SPACE ->alloc_extent(); ->free_extent(); ...
TXM TREE ATOM COMPRESS ->compress(); ->decompress(); ... ITEM NODE COMPRESS SPACE Delayed actions
30
Snapshots SNPM ->create_subvolume(); ... VFS FS TXM SNPM TREE ATOM
ITEM NODE NODE COMPRESS SPACE Snapshots
31
Trivially graded DAGI-Graded (old abstraction, Sun 1985)
(Namesys, 2004) VFS VFS FS FS TXM SNPM TREE ATOM ITEM NODE COMPRESS SPACE DAGI: Direct Acyclic Graph of Interfaces with weak CS relationships
32
Polymorphism of zero order
X Polymorphism of zero order C Z x->y Y A C1 X C2 Polymorphism of first order Z C3 x->x z->x z->y Y B->A
33
GlusterFS: Client Server chains of interfaces with
X1 VFS X2 Client FS ... Xn Xn+1 Server GlusterFS: chains of interfaces with strong CS-relationships ...
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.