diff options
| author | Gordon Ross <gwr@nexenta.com> | 2017-09-13 15:18:23 -0400 |
|---|---|---|
| committer | Gordon Ross <gwr@nexenta.com> | 2019-06-08 20:49:10 -0400 |
| commit | 479c108b209ea78791b37ea89ce0f9b6847d7c6b (patch) | |
| tree | 636b613bc3eaa48c06c3c0e42885d3ba05b241c0 /usr/src | |
| parent | 94047d49916b669576decf2f622a1ee718646882 (diff) | |
| download | illumos-gate-479c108b209ea78791b37ea89ce0f9b6847d7c6b.tar.gz | |
11017 Support Apple FULL_SYNC feature
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb2_aapl.c | 6 | ||||
| -rw-r--r-- | usr/src/uts/common/smbsrv/smb2_aapl.h | 18 |
2 files changed, 19 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb2_aapl.c b/usr/src/uts/common/fs/smbsrv/smb2_aapl.c index 0989fdaf6e..1c2e3bfdf9 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 c3dcf9c518..69f9043210 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,10 +111,22 @@ 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 * * uint32_t command_code = kAAPL_RESOLVE_ID; |
