Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '6.4-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:

- deferred close fix for an important case when cached file should be
closed immediately

- two fixes for missing locks

- eight minor cleanup

* tag '6.4-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6:
cifs: update internal module version number for cifs.ko
smb3: move some common open context structs to smbfs_common
smb3: make query_on_disk_id open context consistent and move to common code
SMB3.1.1: add new tree connect ShareFlags
cifs: missing lock when updating session status
SMB3: Close deferred file handles in case of handle lease break
SMB3: Add missing locks to protect deferred close file list
cifs: Avoid a cast in add_lease_context()
cifs: Simplify SMB2_open_init()
cifs: Simplify SMB2_open_init()
cifs: Simplify SMB2_open_init()

+110 -152
+2 -2
fs/cifs/cifsfs.h
··· 162 162 #endif /* CONFIG_CIFS_NFSD_EXPORT */ 163 163 164 164 /* when changing internal version - update following two lines at same time */ 165 - #define SMB3_PRODUCT_BUILD 41 166 - #define CIFS_VERSION "2.42" 165 + #define SMB3_PRODUCT_BUILD 43 166 + #define CIFS_VERSION "2.43" 167 167 #endif /* _CIFSFS_H */
+6 -2
fs/cifs/connect.c
··· 1916 1916 /* ses_count can never go negative */ 1917 1917 WARN_ON(ses->ses_count < 0); 1918 1918 1919 + spin_lock(&ses->ses_lock); 1919 1920 if (ses->ses_status == SES_GOOD) 1920 1921 ses->ses_status = SES_EXITING; 1921 1922 1922 - cifs_free_ipc(ses); 1923 - 1924 1923 if (ses->ses_status == SES_EXITING && server->ops->logoff) { 1924 + spin_unlock(&ses->ses_lock); 1925 + cifs_free_ipc(ses); 1925 1926 xid = get_xid(); 1926 1927 rc = server->ops->logoff(xid, ses); 1927 1928 if (rc) 1928 1929 cifs_server_dbg(VFS, "%s: Session Logoff failure rc=%d\n", 1929 1930 __func__, rc); 1930 1931 _free_xid(xid); 1932 + } else { 1933 + spin_unlock(&ses->ses_lock); 1934 + cifs_free_ipc(ses); 1931 1935 } 1932 1936 1933 1937 spin_lock(&cifs_tcp_ses_lock);
+16
fs/cifs/file.c
··· 4882 4882 struct TCP_Server_Info *server = tcon->ses->server; 4883 4883 int rc = 0; 4884 4884 bool purge_cache = false; 4885 + struct cifs_deferred_close *dclose; 4886 + bool is_deferred = false; 4885 4887 4886 4888 wait_on_bit(&cinode->flags, CIFS_INODE_PENDING_WRITERS, 4887 4889 TASK_UNINTERRUPTIBLE); ··· 4919 4917 cifs_dbg(VFS, "Push locks rc = %d\n", rc); 4920 4918 4921 4919 oplock_break_ack: 4920 + /* 4921 + * When oplock break is received and there are no active 4922 + * file handles but cached, then schedule deferred close immediately. 4923 + * So, new open will not use cached handle. 4924 + */ 4925 + spin_lock(&CIFS_I(inode)->deferred_lock); 4926 + is_deferred = cifs_is_deferred_close(cfile, &dclose); 4927 + spin_unlock(&CIFS_I(inode)->deferred_lock); 4928 + 4929 + if (!CIFS_CACHE_HANDLE(cinode) && is_deferred && 4930 + cfile->deferred_close_scheduled && delayed_work_pending(&cfile->deferred)) { 4931 + cifs_close_deferred_file(cinode); 4932 + } 4933 + 4922 4934 /* 4923 4935 * releasing stale oplock after recent reconnect of smb session using 4924 4936 * a now incorrect file handle is not a data integrity issue but do
+7 -1
fs/cifs/misc.c
··· 749 749 list_for_each_entry(cfile, &cifs_inode->openFileList, flist) { 750 750 if (delayed_work_pending(&cfile->deferred)) { 751 751 if (cancel_delayed_work(&cfile->deferred)) { 752 + spin_lock(&cifs_inode->deferred_lock); 752 753 cifs_del_deferred_close(cfile); 754 + spin_unlock(&cifs_inode->deferred_lock); 753 755 754 756 tmp_list = kmalloc(sizeof(struct file_list), GFP_ATOMIC); 755 757 if (tmp_list == NULL) ··· 764 762 spin_unlock(&cifs_inode->open_file_lock); 765 763 766 764 list_for_each_entry_safe(tmp_list, tmp_next_list, &file_head, list) { 767 - _cifsFileInfo_put(tmp_list->cfile, true, false); 765 + _cifsFileInfo_put(tmp_list->cfile, false, false); 768 766 list_del(&tmp_list->list); 769 767 kfree(tmp_list); 770 768 } ··· 782 780 list_for_each_entry(cfile, &tcon->openFileList, tlist) { 783 781 if (delayed_work_pending(&cfile->deferred)) { 784 782 if (cancel_delayed_work(&cfile->deferred)) { 783 + spin_lock(&CIFS_I(d_inode(cfile->dentry))->deferred_lock); 785 784 cifs_del_deferred_close(cfile); 785 + spin_unlock(&CIFS_I(d_inode(cfile->dentry))->deferred_lock); 786 786 787 787 tmp_list = kmalloc(sizeof(struct file_list), GFP_ATOMIC); 788 788 if (tmp_list == NULL) ··· 819 815 if (strstr(full_path, path)) { 820 816 if (delayed_work_pending(&cfile->deferred)) { 821 817 if (cancel_delayed_work(&cfile->deferred)) { 818 + spin_lock(&CIFS_I(d_inode(cfile->dentry))->deferred_lock); 822 819 cifs_del_deferred_close(cfile); 820 + spin_unlock(&CIFS_I(d_inode(cfile->dentry))->deferred_lock); 823 821 824 822 tmp_list = kmalloc(sizeof(struct file_list), GFP_ATOMIC); 825 823 if (tmp_list == NULL)
+31 -86
fs/cifs/smb2pdu.c
··· 821 821 static int 822 822 add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode) 823 823 { 824 - struct smb2_create_req *req = iov[0].iov_base; 825 824 unsigned int num = *num_iovec; 826 825 827 826 iov[num].iov_base = create_posix_buf(mode); ··· 829 830 if (iov[num].iov_base == NULL) 830 831 return -ENOMEM; 831 832 iov[num].iov_len = sizeof(struct create_posix); 832 - if (!req->CreateContextsOffset) 833 - req->CreateContextsOffset = cpu_to_le32( 834 - sizeof(struct smb2_create_req) + 835 - iov[num - 1].iov_len); 836 - le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_posix)); 837 833 *num_iovec = num + 1; 838 834 return 0; 839 835 } ··· 2063 2069 static void 2064 2070 parse_query_id_ctxt(struct create_context *cc, struct smb2_file_all_info *buf) 2065 2071 { 2066 - struct create_on_disk_id *pdisk_id = (struct create_on_disk_id *)cc; 2072 + struct create_disk_id_rsp *pdisk_id = (struct create_disk_id_rsp *)cc; 2067 2073 2068 2074 cifs_dbg(FYI, "parse query id context 0x%llx 0x%llx\n", 2069 2075 pdisk_id->DiskFileId, pdisk_id->VolumeId); ··· 2166 2172 } 2167 2173 2168 2174 static int 2169 - add_lease_context(struct TCP_Server_Info *server, struct kvec *iov, 2175 + add_lease_context(struct TCP_Server_Info *server, 2176 + struct smb2_create_req *req, 2177 + struct kvec *iov, 2170 2178 unsigned int *num_iovec, u8 *lease_key, __u8 *oplock) 2171 2179 { 2172 - struct smb2_create_req *req = iov[0].iov_base; 2173 2180 unsigned int num = *num_iovec; 2174 2181 2175 2182 iov[num].iov_base = server->ops->create_lease_buf(lease_key, *oplock); ··· 2178 2183 return -ENOMEM; 2179 2184 iov[num].iov_len = server->vals->create_lease_size; 2180 2185 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_LEASE; 2181 - if (!req->CreateContextsOffset) 2182 - req->CreateContextsOffset = cpu_to_le32( 2183 - sizeof(struct smb2_create_req) + 2184 - iov[num - 1].iov_len); 2185 - le32_add_cpu(&req->CreateContextsLength, 2186 - server->vals->create_lease_size); 2187 2186 *num_iovec = num + 1; 2188 2187 return 0; 2189 2188 } ··· 2256 2267 add_durable_v2_context(struct kvec *iov, unsigned int *num_iovec, 2257 2268 struct cifs_open_parms *oparms) 2258 2269 { 2259 - struct smb2_create_req *req = iov[0].iov_base; 2260 2270 unsigned int num = *num_iovec; 2261 2271 2262 2272 iov[num].iov_base = create_durable_v2_buf(oparms); 2263 2273 if (iov[num].iov_base == NULL) 2264 2274 return -ENOMEM; 2265 2275 iov[num].iov_len = sizeof(struct create_durable_v2); 2266 - if (!req->CreateContextsOffset) 2267 - req->CreateContextsOffset = 2268 - cpu_to_le32(sizeof(struct smb2_create_req) + 2269 - iov[1].iov_len); 2270 - le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_durable_v2)); 2271 2276 *num_iovec = num + 1; 2272 2277 return 0; 2273 2278 } ··· 2270 2287 add_durable_reconnect_v2_context(struct kvec *iov, unsigned int *num_iovec, 2271 2288 struct cifs_open_parms *oparms) 2272 2289 { 2273 - struct smb2_create_req *req = iov[0].iov_base; 2274 2290 unsigned int num = *num_iovec; 2275 2291 2276 2292 /* indicate that we don't need to relock the file */ ··· 2279 2297 if (iov[num].iov_base == NULL) 2280 2298 return -ENOMEM; 2281 2299 iov[num].iov_len = sizeof(struct create_durable_handle_reconnect_v2); 2282 - if (!req->CreateContextsOffset) 2283 - req->CreateContextsOffset = 2284 - cpu_to_le32(sizeof(struct smb2_create_req) + 2285 - iov[1].iov_len); 2286 - le32_add_cpu(&req->CreateContextsLength, 2287 - sizeof(struct create_durable_handle_reconnect_v2)); 2288 2300 *num_iovec = num + 1; 2289 2301 return 0; 2290 2302 } ··· 2287 2311 add_durable_context(struct kvec *iov, unsigned int *num_iovec, 2288 2312 struct cifs_open_parms *oparms, bool use_persistent) 2289 2313 { 2290 - struct smb2_create_req *req = iov[0].iov_base; 2291 2314 unsigned int num = *num_iovec; 2292 2315 2293 2316 if (use_persistent) { ··· 2306 2331 if (iov[num].iov_base == NULL) 2307 2332 return -ENOMEM; 2308 2333 iov[num].iov_len = sizeof(struct create_durable); 2309 - if (!req->CreateContextsOffset) 2310 - req->CreateContextsOffset = 2311 - cpu_to_le32(sizeof(struct smb2_create_req) + 2312 - iov[1].iov_len); 2313 - le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_durable)); 2314 2334 *num_iovec = num + 1; 2315 2335 return 0; 2316 2336 } ··· 2339 2369 static int 2340 2370 add_twarp_context(struct kvec *iov, unsigned int *num_iovec, __u64 timewarp) 2341 2371 { 2342 - struct smb2_create_req *req = iov[0].iov_base; 2343 2372 unsigned int num = *num_iovec; 2344 2373 2345 2374 iov[num].iov_base = create_twarp_buf(timewarp); 2346 2375 if (iov[num].iov_base == NULL) 2347 2376 return -ENOMEM; 2348 2377 iov[num].iov_len = sizeof(struct crt_twarp_ctxt); 2349 - if (!req->CreateContextsOffset) 2350 - req->CreateContextsOffset = cpu_to_le32( 2351 - sizeof(struct smb2_create_req) + 2352 - iov[num - 1].iov_len); 2353 - le32_add_cpu(&req->CreateContextsLength, sizeof(struct crt_twarp_ctxt)); 2354 2378 *num_iovec = num + 1; 2355 2379 return 0; 2356 2380 } ··· 2467 2503 static int 2468 2504 add_sd_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode, bool set_owner) 2469 2505 { 2470 - struct smb2_create_req *req = iov[0].iov_base; 2471 2506 unsigned int num = *num_iovec; 2472 2507 unsigned int len = 0; 2473 2508 ··· 2474 2511 if (iov[num].iov_base == NULL) 2475 2512 return -ENOMEM; 2476 2513 iov[num].iov_len = len; 2477 - if (!req->CreateContextsOffset) 2478 - req->CreateContextsOffset = cpu_to_le32( 2479 - sizeof(struct smb2_create_req) + 2480 - iov[num - 1].iov_len); 2481 - le32_add_cpu(&req->CreateContextsLength, len); 2482 2514 *num_iovec = num + 1; 2483 2515 return 0; 2484 2516 } ··· 2504 2546 static int 2505 2547 add_query_id_context(struct kvec *iov, unsigned int *num_iovec) 2506 2548 { 2507 - struct smb2_create_req *req = iov[0].iov_base; 2508 2549 unsigned int num = *num_iovec; 2509 2550 2510 2551 iov[num].iov_base = create_query_id_buf(); 2511 2552 if (iov[num].iov_base == NULL) 2512 2553 return -ENOMEM; 2513 2554 iov[num].iov_len = sizeof(struct crt_query_id_ctxt); 2514 - if (!req->CreateContextsOffset) 2515 - req->CreateContextsOffset = cpu_to_le32( 2516 - sizeof(struct smb2_create_req) + 2517 - iov[num - 1].iov_len); 2518 - le32_add_cpu(&req->CreateContextsLength, sizeof(struct crt_query_id_ctxt)); 2519 2555 *num_iovec = num + 1; 2520 2556 return 0; 2521 2557 } ··· 2672 2720 rc = add_posix_context(iov, &n_iov, mode); 2673 2721 if (rc) 2674 2722 goto err_free_req; 2723 + req->CreateContextsOffset = cpu_to_le32( 2724 + sizeof(struct smb2_create_req) + 2725 + iov[1].iov_len); 2675 2726 pc_buf = iov[n_iov-1].iov_base; 2676 2727 } 2677 2728 ··· 2812 2857 (oparms->create_options & CREATE_NOT_FILE)) 2813 2858 req->RequestedOplockLevel = *oplock; /* no srv lease support */ 2814 2859 else { 2815 - rc = add_lease_context(server, iov, &n_iov, 2860 + rc = add_lease_context(server, req, iov, &n_iov, 2816 2861 oparms->fid->lease_key, oplock); 2817 2862 if (rc) 2818 2863 return rc; 2819 2864 } 2820 2865 2821 2866 if (*oplock == SMB2_OPLOCK_LEVEL_BATCH) { 2822 - /* need to set Next field of lease context if we request it */ 2823 - if (server->capabilities & SMB2_GLOBAL_CAP_LEASING) { 2824 - struct create_context *ccontext = 2825 - (struct create_context *)iov[n_iov-1].iov_base; 2826 - ccontext->Next = 2827 - cpu_to_le32(server->vals->create_lease_size); 2828 - } 2829 - 2830 2867 rc = add_durable_context(iov, &n_iov, oparms, 2831 2868 tcon->use_persistent); 2832 2869 if (rc) ··· 2826 2879 } 2827 2880 2828 2881 if (tcon->posix_extensions) { 2829 - if (n_iov > 2) { 2830 - struct create_context *ccontext = 2831 - (struct create_context *)iov[n_iov-1].iov_base; 2832 - ccontext->Next = 2833 - cpu_to_le32(iov[n_iov-1].iov_len); 2834 - } 2835 - 2836 2882 rc = add_posix_context(iov, &n_iov, oparms->mode); 2837 2883 if (rc) 2838 2884 return rc; ··· 2833 2893 2834 2894 if (tcon->snapshot_time) { 2835 2895 cifs_dbg(FYI, "adding snapshot context\n"); 2836 - if (n_iov > 2) { 2837 - struct create_context *ccontext = 2838 - (struct create_context *)iov[n_iov-1].iov_base; 2839 - ccontext->Next = 2840 - cpu_to_le32(iov[n_iov-1].iov_len); 2841 - } 2842 - 2843 2896 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time); 2844 2897 if (rc) 2845 2898 return rc; ··· 2856 2923 set_owner = false; 2857 2924 2858 2925 if (set_owner | set_mode) { 2859 - if (n_iov > 2) { 2860 - struct create_context *ccontext = 2861 - (struct create_context *)iov[n_iov-1].iov_base; 2862 - ccontext->Next = cpu_to_le32(iov[n_iov-1].iov_len); 2863 - } 2864 - 2865 2926 cifs_dbg(FYI, "add sd with mode 0x%x\n", oparms->mode); 2866 2927 rc = add_sd_context(iov, &n_iov, oparms->mode, set_owner); 2867 2928 if (rc) ··· 2863 2936 } 2864 2937 } 2865 2938 2866 - if (n_iov > 2) { 2867 - struct create_context *ccontext = 2868 - (struct create_context *)iov[n_iov-1].iov_base; 2869 - ccontext->Next = cpu_to_le32(iov[n_iov-1].iov_len); 2870 - } 2871 2939 add_query_id_context(iov, &n_iov); 2940 + 2941 + if (n_iov > 2) { 2942 + /* 2943 + * We have create contexts behind iov[1] (the file 2944 + * name), point at them from the main create request 2945 + */ 2946 + req->CreateContextsOffset = cpu_to_le32( 2947 + sizeof(struct smb2_create_req) + 2948 + iov[1].iov_len); 2949 + req->CreateContextsLength = 0; 2950 + 2951 + for (unsigned int i = 2; i < (n_iov-1); i++) { 2952 + struct kvec *v = &iov[i]; 2953 + size_t len = v->iov_len; 2954 + struct create_context *cctx = 2955 + (struct create_context *)v->iov_base; 2956 + 2957 + cctx->Next = cpu_to_le32(len); 2958 + le32_add_cpu(&req->CreateContextsLength, len); 2959 + } 2960 + le32_add_cpu(&req->CreateContextsLength, 2961 + iov[n_iov-1].iov_len); 2962 + } 2872 2963 2873 2964 rqst->rq_nvec = n_iov; 2874 2965 return 0;
-20
fs/cifs/smb2pdu.h
··· 132 132 #define SMB2_LEASE_HANDLE_CACHING_HE 0x02 133 133 #define SMB2_LEASE_WRITE_CACHING_HE 0x04 134 134 135 - struct create_durable { 136 - struct create_context ccontext; 137 - __u8 Name[8]; 138 - union { 139 - __u8 Reserved[16]; 140 - struct { 141 - __u64 PersistentFileId; 142 - __u64 VolatileFileId; 143 - } Fid; 144 - } Data; 145 - } __packed; 146 135 147 136 /* See MS-SMB2 2.2.13.2.11 */ 148 137 /* Flags */ ··· 157 168 } Fid; 158 169 __u8 CreateGuid[16]; 159 170 __le32 Flags; /* see above DHANDLE_FLAG_PERSISTENT */ 160 - } __packed; 161 - 162 - /* See MS-SMB2 2.2.14.2.9 */ 163 - struct create_on_disk_id { 164 - struct create_context ccontext; 165 - __u8 Name[8]; 166 - __le64 DiskFileId; 167 - __le64 VolumeId; 168 - __u32 Reserved[4]; 169 171 } __packed; 170 172 171 173 /* See MS-SMB2 2.2.14.2.12 */
-33
fs/ksmbd/smb2pdu.h
··· 70 70 __u8 CreateGuid[16]; 71 71 } __packed; 72 72 73 - struct create_durable_reconn_req { 74 - struct create_context ccontext; 75 - __u8 Name[8]; 76 - union { 77 - __u8 Reserved[16]; 78 - struct { 79 - __u64 PersistentFileId; 80 - __u64 VolatileFileId; 81 - } Fid; 82 - } Data; 83 - } __packed; 84 - 85 73 struct create_durable_reconn_v2_req { 86 74 struct create_context ccontext; 87 75 __u8 Name[8]; ··· 97 109 __le64 AppInstanceVersionLow; 98 110 } __packed; 99 111 100 - struct create_mxac_req { 101 - struct create_context ccontext; 102 - __u8 Name[8]; 103 - __le64 Timestamp; 104 - } __packed; 105 - 106 112 struct create_alloc_size_req { 107 113 struct create_context ccontext; 108 114 __u8 Name[8]; ··· 117 135 __u8 Name[8]; 118 136 __le32 Timeout; 119 137 __le32 Flags; 120 - } __packed; 121 - 122 - struct create_mxac_rsp { 123 - struct create_context ccontext; 124 - __u8 Name[8]; 125 - __le32 QueryStatus; 126 - __le32 MaximalAccess; 127 - } __packed; 128 - 129 - struct create_disk_id_rsp { 130 - struct create_context ccontext; 131 - __u8 Name[8]; 132 - __le64 DiskFileId; 133 - __le64 VolumeId; 134 - __u8 Reserved[16]; 135 138 } __packed; 136 139 137 140 /* equivalent of the contents of SMB3.1.1 POSIX open context response */
+48 -8
fs/smbfs_common/smb2pdu.h
··· 327 327 #define SMB2_SHAREFLAG_NO_CACHING 0x00000030 328 328 #define SHI1005_FLAGS_DFS 0x00000001 329 329 #define SHI1005_FLAGS_DFS_ROOT 0x00000002 330 - #define SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS 0x00000100 331 - #define SHI1005_FLAGS_FORCE_SHARED_DELETE 0x00000200 332 - #define SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING 0x00000400 333 - #define SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM 0x00000800 334 - #define SHI1005_FLAGS_FORCE_LEVELII_OPLOCK 0x00001000 335 - #define SHI1005_FLAGS_ENABLE_HASH_V1 0x00002000 336 - #define SHI1005_FLAGS_ENABLE_HASH_V2 0x00004000 330 + #define SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS 0x00000100 331 + #define SMB2_SHAREFLAG_FORCE_SHARED_DELETE 0x00000200 332 + #define SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING 0x00000400 333 + #define SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM 0x00000800 334 + #define SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK 0x00001000 335 + #define SMB2_SHAREFLAG_ENABLE_HASH_V1 0x00002000 336 + #define SMB2_SHAREFLAG_ENABLE_HASH_V2 0x00004000 337 337 #define SHI1005_FLAGS_ENCRYPT_DATA 0x00008000 338 338 #define SMB2_SHAREFLAG_IDENTITY_REMOTING 0x00040000 /* 3.1.1 */ 339 339 #define SMB2_SHAREFLAG_COMPRESS_DATA 0x00100000 /* 3.1.1 */ 340 - #define SHI1005_FLAGS_ALL 0x0014FF33 340 + #define SMB2_SHAREFLAG_ISOLATED_TRANSPORT 0x00200000 341 + #define SHI1005_FLAGS_ALL 0x0034FF33 341 342 342 343 /* Possible share capabilities */ 343 344 #define SMB2_SHARE_CAP_DFS cpu_to_le32(0x00000008) /* all dialects */ ··· 1172 1171 __u32 Reserved; 1173 1172 } __packed; 1174 1173 1174 + /* See MS-SMB2 2.2.13.2.3 and MS-SMB2 2.2.13.2.4 */ 1175 + struct create_durable { 1176 + struct create_context ccontext; 1177 + __u8 Name[8]; 1178 + union { 1179 + __u8 Reserved[16]; 1180 + struct { 1181 + __u64 PersistentFileId; 1182 + __u64 VolatileFileId; 1183 + } Fid; 1184 + } Data; 1185 + } __packed; 1186 + 1187 + /* See MS-SMB2 2.2.13.2.5 */ 1188 + struct create_mxac_req { 1189 + struct create_context ccontext; 1190 + __u8 Name[8]; 1191 + __le64 Timestamp; 1192 + } __packed; 1193 + 1194 + /* See MS-SMB2 2.2.14.2.5 */ 1195 + struct create_mxac_rsp { 1196 + struct create_context ccontext; 1197 + __u8 Name[8]; 1198 + __le32 QueryStatus; 1199 + __le32 MaximalAccess; 1200 + } __packed; 1201 + 1175 1202 #define SMB2_LEASE_NONE_LE cpu_to_le32(0x00) 1176 1203 #define SMB2_LEASE_READ_CACHING_LE cpu_to_le32(0x01) 1177 1204 #define SMB2_LEASE_HANDLE_CACHING_LE cpu_to_le32(0x02) ··· 1209 1180 1210 1181 #define SMB2_LEASE_KEY_SIZE 16 1211 1182 1183 + /* See MS-SMB2 2.2.13.2.8 */ 1212 1184 struct lease_context { 1213 1185 __u8 LeaseKey[SMB2_LEASE_KEY_SIZE]; 1214 1186 __le32 LeaseState; ··· 1217 1187 __le64 LeaseDuration; 1218 1188 } __packed; 1219 1189 1190 + /* See MS-SMB2 2.2.13.2.10 */ 1220 1191 struct lease_context_v2 { 1221 1192 __u8 LeaseKey[SMB2_LEASE_KEY_SIZE]; 1222 1193 __le32 LeaseState; ··· 1239 1208 __u8 Name[8]; 1240 1209 struct lease_context_v2 lcontext; 1241 1210 __u8 Pad[4]; 1211 + } __packed; 1212 + 1213 + /* See MS-SMB2 2.2.14.2.9 */ 1214 + struct create_disk_id_rsp { 1215 + struct create_context ccontext; 1216 + __u8 Name[8]; 1217 + __le64 DiskFileId; 1218 + __le64 VolumeId; 1219 + __u8 Reserved[16]; 1242 1220 } __packed; 1243 1221 1244 1222 /* See MS-SMB2 2.2.31 and 2.2.32 */