Skip to main content

arbitrate_lease

Function arbitrate_lease 

Source
fn arbitrate_lease(
    server: &Arc<ServerShared>,
    conn: &Smb2Conn,
    path: &str,
    fid: [u8; 16],
    lr: &LeaseReq,
    signed: bool,
    is_dir: bool,
) -> (LeaseResp, Vec<Receiver<()>>)
Expand description

Arbitrate a caching lease for a lease-requesting CREATE ([MS-SMB2] §2.2.13.2). A sole opener gets the requested state (capped at RWH); an open reusing the same lease key shares the existing state; READ and HANDLE caching are shareable, so directory holders with distinct keys coexist, whereas a contending file open strips write caching from existing holders (RWH -> RH) via unsolicited LEASE_BREAKs and is itself capped at RH.