• Pavel Shilovsky's avatar
    CIFS: Properly process SMB3 lease breaks · 90b58f82
    Pavel Shilovsky authored
    [ Upstream commit 9bd45408 ]
    
    Currenly we doesn't assume that a server may break a lease
    from RWH to RW which causes us setting a wrong lease state
    on a file and thus mistakenly flushing data and byte-range
    locks and purging cached data on the client. This leads to
    performance degradation because subsequent IOs go directly
    to the server.
    
    Fix this by propagating new lease state and epoch values
    to the oplock break handler through cifsFileInfo structure
    and removing the use of cifsInodeInfo flags for that. It
    allows to avoid some races of several lease/oplock breaks
    using those flags in parallel.
    Signed-off-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    90b58f82
smb2pdu.h 36 KB