]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: Fix enumerating snapshots to Azure
authorSteve French <stfrench@microsoft.com>
Fri, 29 Mar 2019 03:32:49 +0000 (22:32 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Apr 2019 19:33:34 +0000 (14:33 -0500)
commitbaef7d67f3445ef1b86c1c0238276caed05c2aef
treec4cc94644199173ea35a722fec2219758b437e49
parentb2a33d8ad5fdf0dd85cc75146b752536b886bc1f
smb3: Fix enumerating snapshots to Azure

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: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org> # 4.19+
fs/cifs/smb2file.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h