opinfo_read_handle_to_read(9)
π opinfo_read_handle_to_read β from the Kernel API Manual, bestie π
Okay so picture this: you're deep in the kernel API manual (yes, that manual β we're fancy now β¨) and you stumble on opinfo_read_handle_to_read. It's not giving main-character energy on its own, but it's a supporting icon and we're gonna understand it. Periodt.
β¨ NAME β¨
opinfo_read_handle_to_read β the glow-up function: it converts a read/handle oplock into a plain old read oplock. Lowkey a makeover montage in C. π¦
π SYNOPSIS π
int opinfo_read_handle_to_read (struct oplock_info *opinfo );
That's it. One function, one argument, no drama. Ngl it's giving "small but mighty." π
πΈ ARGUMENTS πΈ
opinfoβ the current oplock info. Like, the actual oplock object you're working with rn. Hand it over and it gets the transformation. π
β RETURN β
0on success β we love a clean win, no notes, ate. π- otherwise
-EINVALβ something was off with what you passed in, so bestie, go check your args. π
π SEE ALSO π
Alright, this is the group chat of related functions β not one of them gets left on read. These all live in the kernel file ./fs/smb/server/oplock.c, and they all pull up in the same friend group:
- Oplock conversions, the whole squad β
alloc_opinfo(9),opinfo_write_to_read(9),opinfo_write_to_none(9),opinfo_read_to_none(9) - Lease upgrades & transitions β
lease_read_to_write(9),lease_none_upgrade(9) - Closing & granting β
close_id_del_oplock(9),grant_write_oplock(9),grant_read_oplock(9),grant_none_oplock(9),same_client_has_lease(9) - Break notifications, the dramatic ones β
__smb2_oplock_break_noti(9),smb2_oplock_break_noti(9),__smb2_lease_break_noti(9),smb2_lease_break_noti(9) - Granting & breaking at scale β
smb_grant_oplock(9),smb_break_all_write_oplock(9),__smb_break_all_levII_oplock(9),smb_break_all_oplock(9) - Mapping & buffers β
smb2_map_lease_to_oplock(9),create_lease_buf(9),parse_lease_state(9),smb2_find_context_vals(9),create_durable_rsp_buf(9),create_durable_v2_rsp_buf(9),create_mxac_rsp_buf(9),create_posix_rsp_buf(9),create_aapl_rsp_buf(9),lookup_lease_in_table(9)
Fr fr, that's all 29 of them. Don't come for me if you skim β they're all up there. π
And that's the whole page! Shoutout to ./fs/smb/server for being the home base, dated October 2026, filed under opinfo_read_handle_to_read(9) β she's iconic, she's documented, she's done. π«Άππ
π¦ 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