@@ -40,13 +40,46 @@ On 64bit systems, even if all overlay layers are not on the same
40
40
underlying filesystem, the same compliant behavior could be achieved
41
41
with the "xino" feature. The "xino" feature composes a unique object
42
42
identifier from the real object st_ino and an underlying fsid index.
43
+
43
44
If all underlying filesystems support NFS file handles and export file
44
45
handles with 32bit inode number encoding (e.g. ext4), overlay filesystem
45
46
will use the high inode number bits for fsid. Even when the underlying
46
47
filesystem uses 64bit inode numbers, users can still enable the "xino"
47
48
feature with the "-o xino=on" overlay mount option. That is useful for the
48
49
case of underlying filesystems like xfs and tmpfs, which use 64bit inode
49
- numbers, but are very unlikely to use the high inode number bit.
50
+ numbers, but are very unlikely to use the high inode number bits. In case
51
+ the underlying inode number does overflow into the high xino bits, overlay
52
+ filesystem will fall back to the non xino behavior for that inode.
53
+
54
+ The following table summarizes what can be expected in different overlay
55
+ configurations.
56
+
57
+ Inode properties
58
+ ````````````````
59
+
60
+ +--------------+------------+------------+-----------------+----------------+
61
+ | Configuration | Persistent | Uniform | st_ino == d_ino | d_ino == i_ino |
62
+ | | st_ino | st_dev | | [*] |
63
+ +==============+=====+======+=====+======+========+========+========+=======+
64
+ | | dir | !dir | dir | !dir | dir + !dir | dir | !dir |
65
+ +--------------+-----+------+-----+------+--------+--------+--------+-------+
66
+ | All layers | Y | Y | Y | Y | Y | Y | Y | Y |
67
+ | on same fs | | | | | | | | |
68
+ +--------------+-----+------+-----+------+--------+--------+--------+-------+
69
+ | Layers not | N | Y | Y | N | N | Y | N | Y |
70
+ | on same fs, | | | | | | | | |
71
+ | xino=off | | | | | | | | |
72
+ +--------------+-----+------+-----+------+--------+--------+--------+-------+
73
+ | xino=on/auto | Y | Y | Y | Y | Y | Y | Y | Y |
74
+ | | | | | | | | | |
75
+ +--------------+-----+------+-----+------+--------+--------+--------+-------+
76
+ | xino=on/auto,| N | Y | Y | N | N | Y | N | Y |
77
+ | ino overflow | | | | | | | | |
78
+ +--------------+-----+------+-----+------+--------+--------+--------+-------+
79
+
80
+ [*] nfsd v3 readdirplus verifies d_ino == i_ino. i_ino is exposed via several
81
+ /proc files, such as /proc/locks and /proc/self/fdinfo/<fd> of an inotify
82
+ file descriptor.
50
83
51
84
52
85
Upper and Lower
@@ -427,7 +460,8 @@ guarantee that the values of st_ino and st_dev returned by stat(2) and the
427
460
value of d_ino returned by readdir(3) will act like on a normal filesystem.
428
461
E.g. the value of st_dev may be different for two objects in the same
429
462
overlay filesystem and the value of st_ino for directory objects may not be
430
- persistent and could change even while the overlay filesystem is mounted.
463
+ persistent and could change even while the overlay filesystem is mounted, as
464
+ summarized in the `Inode properties `_ table above.
431
465
432
466
433
467
Changes to underlying filesystems
0 commit comments