[PATCH] vfs: ignore shared VHDX create context by default
Uri Simchoni
uri at samba.org
Fri Mar 11 17:52:39 UTC 2016
On 03/11/2016 06:50 PM, Steve French wrote:
> On Wed, Feb 24, 2016 at 11:32 PM, Uri Simchoni <uri at samba.org> wrote:
>> Hi,
>>
>> Attached is a fix for https://bugzilla.samba.org/show_bug.cgi?id=11753.
>>
>> This patch causes smbd to ignore SVHDX_OPEN_DEVICE_CONTEXT or
>> SVHDX_OPEN_DEVICE_CONTEXT_V2 create contexts by default.
>>
>> The default can be overriden by a VFS module if this module adds support for
>> RSVD protocol (not sure all the pieces are in there).
>>
>> This fixes Windows backup against Samba 4.3.x series.
>>
>> [MS-SMB2] rev 48.0 states (3.3.5.9.14) that the open should fail if this
>> create context is specified and the server does not support RSVD (a.k.a.
>> SCSI tunneling) protocol. However, according to discussions with
>> dochelp at microsoft.com, the context should be ignored in this case.
>>
>> Review/push appreciated.
>>
>> Thanks,
>> Uri.
>
> I also saw this context used in VHD/VHDX creation, and with
> current 4-4-stable (and 4-4-test) branch, from the Windows 2012R2
> GUIs for creating virtual machines:
>
> Computer Management -> Disk Management -> More Actions -> Create VHDX
>
> I can create a VHDX on a NET USEd drive to current Samba 4.4-rc
>
> but, I have a second apparently identical Windows 2012R2 server
> for which I get an "Incorrect Function" pop up error doing the
> same thing. Comparing the wireshark traces I don't
> see obvious reasons for the error, the ioctl errors
> are the expected ones (set resiliency, integrity, compression)
> and no obvious create errors.
>
> Any ideas why HyperV VHDX creation would fail to current
> Samba (to the same server) in some cases (Windows 2012R2
> install/config as client to Samba) but not others?
>
The problem could be with resiliency support.
Windows 2012R2 needs all automatic updates applied to it in order to
create a vhdx without resilency support. Specifically it needs update
rollup 2919355: https://support.microsoft.com/en-us/kb/2919355
Windows 2012 requires a hotfix that you don't get via automatic updates,
in order to create vhdx without resiliency support -
https://support.microsoft.com/en-us/kb/2920193
Windows 10/Server 2016 do not require any updates.
HTH,
Uri.
More information about the samba-technical
mailing list