[cifs-protocol] 119111524002315 Create Context SMB2_CREATE_QUERY_ON_DISK_ID payload

Obaid Farooqi obaidf at microsoft.com
Mon Nov 18 16:09:56 UTC 2019

Hi Aurelian:
We define the diskID in section " SMB2_CREATE_QUERY_ON_DISK_ID" in MS-SMB2. As you will notice in this section that this is an implementation dependent value so both Samba and EMC can do what their implementation dictates.

Please let me know if it does not answer your question.

Obaid Farooqi
Escalation Engineer | Microsoft

-----Original Message-----
From: Sreekanth Nadendla <srenaden at microsoft.com> 
Sent: Friday, November 15, 2019 9:25 AM
To: Aurélien Aptel <aaptel at suse.com>; cifs-protocol at lists.samba.org
Cc: support <support at mail.support.microsoft.com>
Subject: 119111524002315 Create Context SMB2_CREATE_QUERY_ON_DISK_ID payload

Dochelp in Bcc
Casemail in Cc

Hi Aurelien,
Thank you for your inquiry about Microsoft open specifications. We have created an incident 119111524002315  for investigating this issue. One of the Open specifications team member will contact you shortly.

Sreekanth Nadendla
Microsoft Windows Open Specifications

-----Original Message-----
From: Aurélien Aptel <aaptel at suse.com> 
Sent: Fri, November 15, 2019 6:49 AM
To: cifs-protocol at lists.samba.org
Cc: Interoperability Documentation Help <dochelp at microsoft.com>
Subject: Create Context SMB2_CREATE_QUERY_ON_DISK_ID payload

[[ Gah, sorry about duplicate email, hit the wrong keys... ]] [[ I forgot to CC dochelp in my initial one ]]


There is a create context SMB2_CREATE_QUERY_ON_DISK_ID that MS-SMB2 describes as, for the request:

    The client is requesting that the server return a 32-
    byte opaque BLOB that uniquely identifies the file
    being opened on disk. No data is passed to the
    server by the client.

for the response:

    The server returned DiskID of the open file in a volume.
    SMB2_CREATE_CONTEXT Response takes the same
    form as defined in section

So on one side it reads "32-byte opaque blob" but on the other "DiskID". I could not find a reference to what is a DiskId.

After some testing Windows Server seems to return the persistent file id
+ something, which Samba does as well, with the following note:

    /* From conversations with Microsoft engineers at
       the MS plugfest. The first 8 bytes are the "volume index"
       == inode, the second 8 bytes are the "volume id",
       == dev. This will be updated in the SMB2 doc. */

Samba returns
- file id (8 bytes)
- device id (4 bytes)
- padded to 32 bytes with garbage

We started to rely on the first 8 bytes being the FileId in the linux kernel client but recently we had a customer with a Dell EMC server that doesn't do that.

Could we clarify the situation on the meaning of this payload, or at least the first 8 bytes being the FileId?

Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)

More information about the cifs-protocol mailing list