forked from hisilicon/overlayfs-progs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
69 lines (55 loc) · 2.77 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Todo list
=========
Common
------
1. Overlay filesystem mounted check ---doing
Prevent fscking when overlay is online. Now, we cannot distinguish mounted
directories if overlayfs was mounted with relative path. Should modify
Linux kernel together to support.
2. Check symbolic link with absolute path in lower layer
Symbolic link in the underlying layers with absolute path which point to
the target out of overlay filesystem or in the lower layers may lead to
modifing the wrong target, this not handled by Linux kernel now.
3. Xattr support check
If basic file system not support xattr, a lot of check points should skip.
4. Signal detect
Register SIGINT and SIGTERM sigaction handler to abort fsck safely.
4. Log
Export the optionally fsck log and results to the system log subsystem.
5. ...
Features
--------
1. overaly filesystem feature set support ---doing
Current fsck do not support new features introduced in >= Linux kernel
4.13, such as index and nfs_export features, but fsck cannot detect
unknown features in the underlying dirs itself, so in order to avoid
corrupting overlayfs which has unknown feature when reparing the
underlying layers, fsck.overlay need to support "feature set" and
refuse checking overlayfs if unknown feature detected.
2. Remove and fallback overlay feature ---doing
User can add some overlayfs features through mount options, but cannot
remove any feature once it was enabled. If user mounting an overlay
which has backward compatible fearures on a kernel that doesn't support
these features will lead to unexpected results, so we need to introduce
this "feature conversion" feature into fsck.overlay. If user give option
"-o xxx=off" (e.g. redirect_dir=off) when running fsck.overlay, it will
remove the specified feature and make sure consistency.
3. Check origin xattr --- doing
Check basic elements in the origin xattr, verify it's corrupt or not, and
decode the file handle to check the corresponding origin target... Should
ask user to remove the corrupt and stale origin xattr.
4. Check index dir when "index=on"
1) Verify the origin xattr in the index dir, it should match the upper
root dir.
2) Check index files (not dir and whiteout) in the index dir, check
file name and decode the file handle to check the origin target,
and check the nlink... Should ask user to remove the corrupt, stale
and orphan index file.
5. Check index dir when "nfs_export=on" (depend on "index=on")
1) Verify the 'upper' xattr in the index dir. Encode the upper root dir
and compare with the file handle in the 'upper' xattr...
2) Check index-dirs in the index dir, check dirname and decode the
corresponding upper target to verify the file handle... Should remove
(or whiteout) the corrput, stale and orphan index-dirs.
3) Check index whiteouts in the index dir...
4. ...