virtio fs tunnels fuse over a virtio channel. One issue is two sides might be speaking different endian-ness. To detects this, host side looks at the opcode value in the FUSE_INIT command. Works fine at the moment but might fail if a future version of fuse will use such an opcode for initialization. Let's reserve this opcode so we remember and don't do this. Same for CUSE_INIT.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -425,6 +425,10 @@ enum fuse_opcode { · 424 unmodified lines | |||
| 425 | 425 | ||
| 426 | /* CUSE specific operations */ | 426 | /* CUSE specific operations */ |
| 427 | CUSE_INIT = 4096, | 427 | CUSE_INIT = 4096, |
| 428 | |||
| 429 | /* Reserved opcodes: helpful to detect structure endian-ness */ | ||
| 430 | CUSE_INIT_BSWAP_RESERVED = 1048576, /* CUSE_INIT << 8 */ | ||
| 431 | FUSE_INIT_BSWAP_RESERVED = 436207616, /* FUSE_INIT << 24 */ | ||
| 428 | }; | 432 | }; |
| 429 | 433 | ||
| 430 | enum fuse_notify_code { | 434 | enum fuse_notify_code { |