Size: 5160
Comment: add more file system info
|
Size: 5531
Comment: fill out the remaining file systems
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
Line 6: | Line 5: |
Line 10: | Line 8: |
==== interfaces that uses relative time_t/timespec/timeval ==== These can stay compatible, but we'd have to use a different type if we change time_t. |
|
Line 11: | Line 11: |
==== interfaces that uses relative time_t/timespec/timeval ==== These can stay compatible, but we'd have to use a different type if we change time_t. * nanosleep * select/pselect/poll/ppoll/epoll * getrusage * sched_rr_get_interval * sigtimedwait * alarm |
* nanosleep * select/pselect/poll/ppoll/epoll * getrusage * sched_rr_get_interval * sigtimedwait * alarm |
Line 24: | Line 19: |
Here, we are relatively free to change the start of the epoch in the kernel but convert to something else on the user space boundary. One possibility is to scale them to boot time and use ktime_t in the kernel. |
Here, we are relatively free to change the start of the epoch in the kernel but convert to something else on the user space boundary. One possibility is to scale them to boot time and use ktime_t in the kernel. |
Line 29: | Line 21: |
* getitimer/setitimer * timer_settime/timer_gettime * gettimeofday/settimeofday * adjtimex * clock_gettime/clock_settime/clock_adjtime/clock_nanosleep * time/stime * sysv ipc (msg, sem, shm) * sysinfo |
* getitimer/setitimer * timer_settime/timer_gettime * gettimeofday/settimeofday * adjtimex * clock_gettime/clock_settime/clock_adjtime/clock_nanosleep * time/stime * sysv ipc (msg, sem, shm) * sysinfo |
Line 39: | Line 31: |
These absolutely have to use something better than time_t both in user space and in the kernel so we can deal with old files. A lot of file systems need to be fixed as well so we can actually store the times, regardless of whether we are running a 32 or 64 bit kernel. |
These absolutely have to use something better than time_t both in user space and in the kernel so we can deal with old files. A lot of file systems need to be fixed as well so we can actually store the times, regardless of whether we are running a 32 or 64 bit kernel. |
Line 45: | Line 33: |
* stat/lstat/fstatat/ * utime/utimes/futimesat |
* stat/lstat/fstatat/ * utime/utimes/futimesat |
Line 49: | Line 37: |
Line 52: | Line 39: |
* audio time stamps * v4l time stamps * input event time stamps * socket time stamps * ... |
* audio time stamps * v4l time stamps * input event time stamps * socket time stamps * ... |
Line 59: | Line 46: |
Socket timestamps are exported to user space using a memory mapped interface defined in include/uapi/linux/if_packet.h. There are currently three versions of this interface, all use a 32-bit time type. We will likely need a version 4 to solve this. |
Socket timestamps are exported to user space using a memory mapped interface defined in include/uapi/linux/if_packet.h. There are currently three versions of this interface, all use a 32-bit time type. We will likely need a version 4 to solve this. |
Line 66: | Line 49: |
Each file system stores its file modification times in its own format on disk, and a lot of them have the same problem. |
Each file system stores its file modification times in its own format on disk, and a lot of them have the same problem. |
Line 74: | Line 55: |
|| afs || || || || autofs4 || internal || || || befs || || || || bfs || || || || btrfs || 64-bit second, 32-bit ns || never || || cachefiles || internal || || || ceph || unsigned 32-bit second/ns || 2106|| |
|| afs || s32 seconds (bug)||2038|| || autofs4 || internal || || || befs || 48-bit seconds|| never|| || bfs || u32 seconds|| 2106|| || btrfs || 64-bit seconds, 32-bit ns || never || || cachefiles || internal || || || ceph || unsigned 32-bit second/ns || 2106 || |
Line 84: | Line 65: |
|| configfs || internal || || | || configfs || internal || || |
Line 86: | Line 67: |
|| debugfs || internal || || || devpts || internal || || || dlm || internal || || || ecryptfs || internal || || || efivarfs || internal || || |
|| debugfs || internal || || || devpts || internal || || || dlm || internal || || || ecryptfs || internal || || || efivarfs || internal || || |
Line 93: | Line 74: |
|| exportfs || internal || || | || exportfs || internal || || |
Line 96: | Line 77: |
|| ext4 || 34 bit seconds / 30-bit ns || 2514|| | || ext4 || 34 bit seconds / 30-bit ns || 2514 || |
Line 99: | Line 80: |
|| freevxfs || || || || fscache || internal || || |
|| freevxfs || u32 seconds/u32 microseconds|| 2106|| || fscache || internal || || |
Line 102: | Line 83: |
|| gfs2 || || || | || gfs2 || u64 seconds/u32 ns|| never|| |
Line 105: | Line 86: |
|| hostfs || || || || hpfs || || || || hppfs || || || || hugetlbfs || internal || || || isofs || || || || jbd || internal || || || jbd2 || internal || || |
|| hostfs || timespec|| 2038|| || hpfs || u32 seconds|| 2106|| || hppfs || internal|| || || hugetlbfs || internal || || || isofs || 'char' year since 1900|| 2028 (!)|| || jbd || internal || || || jbd2 || internal || || |
Line 113: | Line 94: |
|| jfs || || || || kernfs || internal || || || lockd || internal || || |
|| jfs || u32 seconds/ns|| 2106|| || kernfs || internal || || || lockd || internal || || |
Line 117: | Line 98: |
|| minix || || || || ncpfs || || || |
|| minix || u32 seconds|| 2106|| || ncpfs || 7-bit year since 1980|| 2107|| |
Line 120: | Line 101: |
|| nfsv4 || u64 seconds/u32 ns|| never || || nfs_common || internal || || |
|| nfsv4 || u64 seconds/u32 ns || never || || nfs_common || internal || || |
Line 123: | Line 104: |
|| nilfs2 || || || || nls || internal || || || notify || internal || || |
|| nilfs2 || u64 seconds/u32 ns|| never|| || nls || internal || || || notify || internal || || |
Line 128: | Line 109: |
|| omfs || || || || openpromfs || internal || || || proc || internal || || || pstore || internal || || || qnx4 || || || || qnx6 || || || || quota || internal || || || ramfs || internal || || |
|| omfs || 64-bit milliseconds|| never|| || openpromfs || internal || || || proc || internal || || || pstore || internal || || || qnx4 || u32 seconds|| 2106|| || qnx6 || u32 seconds|| 2106|| || quota || internal || || || ramfs || internal || || |
Line 139: | Line 120: |
|| sysfs || internal || || || sysv || || || |
|| sysfs || internal || || || sysv || u32 seconds|| 2106|| |
Line 143: | Line 124: |
|| ufs || || || | || ufs1 ufs2 ||u32 seconds u64 seconds/u32 nanoseconds ||2106 never || |
The year 2038 problem
All 32-bit kernels to date use a signed 32-bit time_t type, which can only represent time until January 2038. Since embedded systems running 32-bit Linux are going to survive beyond that date, we have to change all current uses, in a backwards compatible way.
User space interfaces
We will likely keep the 32-bit time_t in all user space interfaces that currently use it, but add new interfaces with a 64-bit timespec or another type that can represent later times. Most importantly that impacts system calls, but also specific ioctl commands and a few other interfaces. User space programs have to be recompiled to use the new interfaces, and the policy whether to use the old or the time time is left to the C library. While that policy is a complex topic itself, we don't cover it here.
System calls
interfaces that uses relative time_t/timespec/timeval
These can stay compatible, but we'd have to use a different type if we change time_t.
- nanosleep
- select/pselect/poll/ppoll/epoll
- getrusage
- sched_rr_get_interval
- sigtimedwait
- alarm
interfaces that don't make sense for times in the past
Here, we are relatively free to change the start of the epoch in the kernel but convert to something else on the user space boundary. One possibility is to scale them to boot time and use ktime_t in the kernel.
- getitimer/setitimer
- timer_settime/timer_gettime
- gettimeofday/settimeofday
- adjtimex
- clock_gettime/clock_settime/clock_adjtime/clock_nanosleep
- time/stime
- sysv ipc (msg, sem, shm)
- sysinfo
interfaces that require absolute times
These absolutely have to use something better than time_t both in user space and in the kernel so we can deal with old files. A lot of file systems need to be fixed as well so we can actually store the times, regardless of whether we are running a 32 or 64 bit kernel.
- stat/lstat/fstatat/
- utime/utimes/futimesat
ioctl
There are numerous ioctl commands using a time argument. This list is incomplete
- audio time stamps
- v4l time stamps
- input event time stamps
- socket time stamps
- ...
memory mapped packet sockets
Socket timestamps are exported to user space using a memory mapped interface defined in include/uapi/linux/if_packet.h. There are currently three versions of this interface, all use a 32-bit time type. We will likely need a version 4 to solve this.
File systems
Each file system stores its file modification times in its own format on disk, and a lot of them have the same problem.
file system |
time type |
expiration year |
9p |
u32 seconds |
2106 |
adfs |
40-bit cs since 1900 |
2248 |
affs |
u32 days/mins/(secs/50) |
11760870 |
afs |
s32 seconds (bug) |
2038 |
autofs4 |
internal |
|
befs |
48-bit seconds |
never |
bfs |
u32 seconds |
2106 |
btrfs |
64-bit seconds, 32-bit ns |
never |
cachefiles |
internal |
|
ceph |
unsigned 32-bit second/ns |
2106 |
cifs (smb) |
7-bit years since 1980 |
2107 |
cifs (modern) |
64-bit 100ns since 1601 |
30328 |
coda |
timespec ioctl |
2038 |
configfs |
internal |
|
cramfs |
fixed |
1970 |
debugfs |
internal |
|
devpts |
internal |
|
dlm |
internal |
|
ecryptfs |
internal |
|
efivarfs |
internal |
|
efs |
u32 seconds |
2106 |
exofs |
s32 seconds |
2038 |
exportfs |
internal |
|
ext2 |
u32 seconds |
2106 |
ext3 |
u32 seconds |
2106 |
ext4 |
34 bit seconds / 30-bit ns |
2514 |
f2fs |
64-bit seconds / 32-bit ns |
never |
fat |
7-bit years since 1980, 2s resolution |
2107 |
freevxfs |
u32 seconds/u32 microseconds |
2106 |
fscache |
internal |
|
fuse |
64-bit second/32-bit ns |
never |
gfs2 |
u64 seconds/u32 ns |
never |
hfs |
u32 seconds since 1904 |
2040 |
hfsplus |
u32 seconds since 1904 |
2040 |
hostfs |
timespec |
2038 |
hpfs |
u32 seconds |
2106 |
hppfs |
internal |
|
hugetlbfs |
internal |
|
isofs |
'char' year since 1900 |
2028 (!) |
jbd |
internal |
|
jbd2 |
internal |
|
jffs2 |
u32 seconds |
2106 |
jfs |
u32 seconds/ns |
2106 |
kernfs |
internal |
|
lockd |
internal |
|
logfs |
u64 ns |
2554 |
minix |
u32 seconds |
2106 |
ncpfs |
7-bit year since 1980 |
2107 |
nfsv2,v3 |
u32 seconds/ns |
2106 |
nfsv4 |
u64 seconds/u32 ns |
never |
nfs_common |
internal |
|
nfsd |
u32 seconds/ns |
2106 |
nilfs2 |
u64 seconds/u32 ns |
never |
nls |
internal |
|
notify |
internal |
|
ntfs |
64-bit 100ns since 1601 |
30828 |
ocfs2 |
34-bit seconds/30-bit ns |
2514 |
omfs |
64-bit milliseconds |
never |
openpromfs |
internal |
|
proc |
internal |
|
pstore |
internal |
|
qnx4 |
u32 seconds |
2106 |
qnx6 |
u32 seconds |
2106 |
quota |
internal |
|
ramfs |
internal |
|
reiserfs |
u32 seconds |
2106 |
romfs |
fixed |
1970 |
squashfs |
u32 seconds |
2106 |
sysfs |
internal |
|
sysv |
u32 seconds |
2106 |
ubifs |
u64 second/u32 ns |
never |
udf |
u16 year |
2038 |
ufs1 ufs2 |
u32 seconds u64 seconds/u32 nanoseconds |
2106 never |
xfs |
u32 seconds/ns |
2106 |