What is maximum SMB2 IOCTL(FSCTL_GET_SHADOW_COPY) response size.

Jeremy Allison jra at samba.org
Mon Jan 19 00:28:47 MST 2015


On Sun, Jan 18, 2015 at 10:13:02PM -0800, Hemanth Thummala wrote:
> Hi Richard,
> 
> Here is the exchange.
> 
> 1) Initially client asked for number of copies. Buffer size if 16 here.
> 
> SMB2 (Server Message Block Protocol version 2)
>     SMB2 Header
>     Ioctl Request (0x0b)
>         StructureSize: 0x0039
>         Function: FSCTL_GET_SHADOW_COPY_DATA (0x00144064)
>         GUID handle File:
>         Max Ioctl In Size: 0
>         Max Ioctl Out Size: 16
>         Flags: 0x00000001
>             .... .... .... .... .... .... .... ...1 = Is FSCTL: True
>         In Data: NO DATA
>             Offset: 0x00000078
>             Length: 0
>         Out Data: NO DATA
>             Offset: 0x00000078
>             Length: 0
> 
> 2) Server responded with 1730 volumes and informed client it requires ~86K
> buffer to send the response.
> 
> SMB2 (Server Message Block Protocol version 2)
>     SMB2 Header
>     Ioctl Response (0x0b)
>         StructureSize: 0x0031
>         unknown: 0000
>         Function: FSCTL_GET_SHADOW_COPY_DATA (0x00144064)
>         GUID handle File:
>         In Data: NO DATA
>             Offset: 0x00000070
>             Length: 0
>         Out Data
>             Offset: 0x00000070
>             Length: 16
>             Num Volumes: *1730*
>             Num Labels: 0
>             Count: *86506*
>             Label:
>             Label:
>             Label: [ Null ]
> 
> 3) Client requested back with 86K buffer to get the entire list.
> 
> SMB2 (Server Message Block Protocol version 2)
>     SMB2 Header
>     Ioctl Request (0x0b)
>         StructureSize: 0x0039
>         Function: FSCTL_GET_SHADOW_COPY_DATA (0x00144064)
>         GUID handle File:
>         Max Ioctl In Size: 0
>         Max Ioctl Out Size: *86518*
>         Flags: 0x00000001
>             .... .... .... .... .... .... .... ...1 = Is FSCTL: True
>         In Data: NO DATA
>             Offset: 0x00000078
>             Length: 0
>         Out Data: NO DATA
>             Offset: 0x00000078
>             Length: 0
> 
> ..
> There were quite a few TCP segments carrying the snapshot details to client.
> Client acknowledged few.
> ...
> After a while client disconnected the session.
> SMB2     138    [TCP ZeroWindow] [TCP ACKed unseen segment] Tree Disconnect
> Request

Oh, if this is happening over SMB2 you might be in
trouble. What are the length limits negotiated in the initial
connection setup ?


More information about the samba-technical mailing list