diff --git a/usr/src/uts/common/fs/smbsrv/smb2_aapl.c b/usr/src/uts/common/fs/smbsrv/smb2_aapl.c index 0989fdaf6edd..1c2e3bfdf985 100644 --- a/usr/src/uts/common/fs/smbsrv/smb2_aapl.c +++ b/usr/src/uts/common/fs/smbsrv/smb2_aapl.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. All rights reserved. */ /* @@ -40,6 +40,8 @@ uint64_t smb2_aapl_server_caps = * modes only when we have a trivial ACL. */ +uint64_t smb2_aapl_volume_caps = kAAPL_SUPPORTS_FULL_SYNC; + /* * Normally suppress file IDs for MacOS because it * requires them to be unique per share, and ours @@ -130,7 +132,7 @@ smb2_aapl_srv_query(smb_request_t *sr, (void) smb_mbc_encodef(mbcout, "q", server_caps); } if ((server_bitmap & kAAPL_VOLUME_CAPS) != 0) { - (void) smb_mbc_encodef(mbcout, "q", 0); + (void) smb_mbc_encodef(mbcout, "q", smb2_aapl_volume_caps); } /* Pad2, null model string. */ diff --git a/usr/src/uts/common/smbsrv/smb2_aapl.h b/usr/src/uts/common/smbsrv/smb2_aapl.h index c3dcf9c51851..69f904321013 100644 --- a/usr/src/uts/common/smbsrv/smb2_aapl.h +++ b/usr/src/uts/common/smbsrv/smb2_aapl.h @@ -22,8 +22,8 @@ */ /* - * This content was published as: smb-759.0/kernel/netsmb/smb_2.h - * in http://opensource.apple.com/source/smb/smb-759.0.tar.gz + * This file contains excerpts of content published under: + * http://opensource.apple.com/source/smb/smb-759.40.1.1 */ #ifndef _SMB2AAPL_H @@ -111,9 +111,21 @@ enum { /* Define Volume Capabilities bitmap */ enum { kAAPL_SUPPORT_RESOLVE_ID = 0x01, - kAAPL_CASE_SENSITIVE = 0x02 + kAAPL_CASE_SENSITIVE = 0x02, + kAAPL_SUPPORTS_FULL_SYNC = 0x04 }; +/* + * kAAPL_SUPPORTS_FULL_SYNC - Full Sync Request + * If the volume supports Full Sync, then when a F_FULLSYNC is done on the + * client side, the client will flush its buffers and then a SMB Flush Request + * with Reserved1 (uint16_t) set to 0xFFFF will be sent to the server. The + * server should flush all its buffer for that file and then call the + * filesystem to perform a F_FULLSYNC on that file. + * Refer to "man fsync" and "man fcntl" in OS X for more information on + * F_FULLSYNC + */ + /* * Resolve ID Request *