• Steve French's avatar
    smb3: Fix enumerating snapshots to Azure · 153322f7
    Steve French authored
    Some servers (see MS-SMB2 protocol specification
    section 3.3.5.15.1) expect that the FSCTL enumerate snapshots
    is done twice, with the first query having EXACTLY the minimum
    size response buffer requested (16 bytes) which refreshes
    the snapshot list (otherwise that and subsequent queries get
    an empty list returned).  So had to add code to set
    the maximum response size differently for the first snapshot
    query (which gets the size needed for the second query which
    contains the actual list of snapshots).
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
    Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    CC: Stable <stable@vger.kernel.org> # 4.19+
    153322f7
smb2file.c 7.73 KB