History

fuse: reserve byteswapped init opcodes

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.

Michael S. Tsirkin committed 7 years ago

Commit 501ae8e1 parent 15c8e721 file · +4 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/fuse.h+4−0
@@ -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
430enum fuse_notify_code {434enum fuse_notify_code {