STRUCT SYNC_FILE_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct sync_file_info(9)

okay so bestie, welcome to the struct sync_file_info(9) page β€” straight out of the Kernel API Manual, and honestly? it's giving "I hold all the tea about your sync_file" ✨ like, this is the struct that SYNC_IOC_FILE_INFO hands you back when you wanna know what's actually going on with a sync_file. no cap, it's a whole vibe.


🌸 NAME 🌸

struct sync_file_info β€” literally the SYNC_IOC_FILE_INFO moment where you get detailed information on a sync_file. that's it, that's the whole thing πŸ’…


✨ SYNOPSIS ✨

struct sync_file_info {
    char name[32];
    __s32 status;
    __u32 flags;
    __u32 num_fences;
    __u32 pad;
    __u64 sync_fence_info;
 };

look at her. iconic. let's meet the members one by one 🫢


πŸŽ€ Members πŸŽ€

  • name β€” the name of the fence, bestie. that's her whole government name πŸ’–
  • status β€” status of the fence, and the numbers MATTER so pay attention: 1 means signaled, 0 means active, and anything <0 means error 😭
  • flags β€” the sync_file_info flags. yes queen, flags πŸ’…
  • num_fences β€” the number of fences in the sync_file. count 'em πŸ”₯
  • pad β€” padding for 64-bit alignment, and it should always be zero. like, don't be quirky with this one, fr fr πŸ™ˆ
  • sync_fence_info β€” a pointer to an array of struct sync_fence_info with all the fences in the sync_file. this is where the detailed lore lives πŸ‘‘

πŸ¦‹ Description πŸ¦‹

so this ioctl takes a struct sync_file_info and then the behaviour splits into two whole moods, iykyk:

  • if num_fences is 0, the field gets updated with the actual number of fences. like, it's a little "hey how many are there?" probe 😌
  • if num_fences is > 0, the system will use the pointer you provided on sync_fence_info to return up to num_fences of struct sync_fence_info, with detailed fence information. so you're getting the full receipt 🧾✨
bestie the field you pass in genuinely changes what happens, so don't just set num_fences to something random and expect main character energy to save you πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/sync_file.h β€” that's the address, go say hi 🏑
  • struct sync_merge_data(9)
  • struct sync_fence_info(9)
  • struct sync_set_deadline(9)

go read those too, they're all part of the friend group 🫢


and that's the page, bestie! πŸŽ€ this lil beauty comes from ./include/uapi/linux, dated October 2026, and she's filed under struct sync_file_info(9) β€” mwah, slay, periodt πŸ’œβœ¨

πŸ“¦ where this page comes from