STRUCT SYNC_FILE_INFO(9)
π 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:1means signaled,0means active, and anything<0means 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 ofstruct sync_fence_infowith 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_fencesis0, the field gets updated with the actual number of fences. like, it's a little "hey how many are there?" probe π - if
num_fencesis> 0, the system will use the pointer you provided onsync_fence_infoto return up tonum_fencesofstruct 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms