syncfs on x64
commit filesystem caches to disk
sys_syncfs(int fd)
| number | 306 (0x132) |
|---|---|
| abi | common |
| entry point | sys_syncfs |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | syncfs(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 306, the syscall number |
rdi | int fd |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 344
- arm64 267
- arm 373
- riscv64 267
- ia32 344
- x32 1073742130
- loongarch64 267
- ppc64 348
- ppc 348
- s390x 338
- mips64 5301
- mipsn32 6306
- mipso32 4342
- alpha 500
- arc 267
- blackfin 378, removed in 4.17
- cris 346, removed in 4.17
- csky 267
- hexagon 267
- ia64 1329, removed in 6.7
- m68k 343
- metag 267, removed in 4.17
- microblaze 374
- nds32 267, removed in 5.18
- nios2 267
- openrisc 267
- parisc 327
- score 267, removed in 4.17
- sh 362
- sparc 335
- sparc64 335
- tilegx 267, removed in 4.17
- tilepro 267, removed in 4.17
- xtensa 179
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/syncfs