diff options
Diffstat (limited to 'usr/src/uts/common/smbsrv')
-rw-r--r-- | usr/src/uts/common/smbsrv/smb_kproto.h | 25 | ||||
-rw-r--r-- | usr/src/uts/common/smbsrv/smb_ktypes.h | 16 |
2 files changed, 27 insertions, 14 deletions
diff --git a/usr/src/uts/common/smbsrv/smb_kproto.h b/usr/src/uts/common/smbsrv/smb_kproto.h index 3ffc10f15e..4a231051ff 100644 --- a/usr/src/uts/common/smbsrv/smb_kproto.h +++ b/usr/src/uts/common/smbsrv/smb_kproto.h @@ -267,6 +267,7 @@ int smb_net_id(uint32_t); * Common oplock functions */ uint32_t smb_oplock_request(smb_request_t *, smb_ofile_t *, uint32_t *); +uint32_t smb_oplock_request_LH(smb_request_t *, smb_ofile_t *, uint32_t *); uint32_t smb_oplock_ack_break(smb_request_t *, smb_ofile_t *, uint32_t *); uint32_t smb_oplock_break_PARENT(smb_node_t *, smb_ofile_t *); uint32_t smb_oplock_break_OPEN(smb_node_t *, smb_ofile_t *, @@ -280,6 +281,16 @@ uint32_t smb_oplock_break_WRITE(smb_node_t *, smb_ofile_t *); uint32_t smb_oplock_break_SETINFO(smb_node_t *, smb_ofile_t *ofile, uint32_t InfoClass); uint32_t smb_oplock_break_DELETE(smb_node_t *, smb_ofile_t *); +void smb_oplock_close(smb_ofile_t *); + +void smb_oplock_ind_break(smb_ofile_t *, uint32_t, boolean_t, uint32_t); +void smb_oplock_ind_break_in_ack(smb_request_t *, smb_ofile_t *, + uint32_t, boolean_t); +void smb_oplock_send_break(smb_request_t *); + +uint32_t smb_oplock_wait_ack(smb_request_t *, uint32_t); +uint32_t smb_oplock_wait_break(smb_request_t *, smb_node_t *, int); +uint32_t smb_oplock_wait_break_fem(smb_node_t *, int); void smb_oplock_move(smb_node_t *, smb_ofile_t *, smb_ofile_t *); @@ -287,16 +298,12 @@ void smb_oplock_move(smb_node_t *, smb_ofile_t *, smb_ofile_t *); * Protocol-specific oplock functions * (and "server-level" functions) */ +void smb1_oplock_ack_break(smb_request_t *, uchar_t); void smb1_oplock_acquire(smb_request_t *, boolean_t); -void smb1_oplock_break_notification(smb_request_t *, uint32_t); -void smb2_oplock_break_notification(smb_request_t *, uint32_t); -void smb2_lease_break_notification(smb_request_t *, uint32_t, boolean_t); -void smb_oplock_ind_break(smb_ofile_t *, uint32_t, boolean_t, uint32_t); -void smb_oplock_ind_break_in_ack(smb_request_t *, smb_ofile_t *, - uint32_t, boolean_t); -void smb_oplock_send_brk(smb_request_t *); -uint32_t smb_oplock_wait_break(smb_request_t *, smb_node_t *, int); -uint32_t smb_oplock_wait_break_fem(smb_node_t *, int); +void smb1_oplock_send_break(smb_request_t *); +void smb2_oplock_send_break(smb_request_t *); +void smb2_lease_ofile_close(smb_ofile_t *); +void smb2_lease_send_break(smb_request_t *); /* * range lock functions - node operations diff --git a/usr/src/uts/common/smbsrv/smb_ktypes.h b/usr/src/uts/common/smbsrv/smb_ktypes.h index f29a5b24c0..f871fe76b2 100644 --- a/usr/src/uts/common/smbsrv/smb_ktypes.h +++ b/usr/src/uts/common/smbsrv/smb_ktypes.h @@ -598,9 +598,11 @@ typedef struct smb_oplock { */ typedef struct smb_oplock_grant { /* smb protocol-level state */ - uint32_t og_state; /* latest sent to client */ - uint32_t og_breaking; /* BREAK_TO... flags */ + uint32_t og_state; /* what client has now */ + uint32_t og_breakto; /* level breaking to */ + boolean_t og_breaking; uint16_t og_dialect; /* how to send breaks */ + kcondvar_t og_ack_cv; /* Wait for ACK */ /* File-system level state */ uint8_t onlist_II; uint8_t onlist_R; @@ -613,7 +615,7 @@ typedef struct smb_oplock_grant { typedef struct smb_lease { list_node_t ls_lnd; /* sv_lease_ht */ - kmutex_t ls_mutex; + kmutex_t ls_mutex; /* for ls_refcnt */ smb_llist_t *ls_bucket; struct smb_node *ls_node; /* @@ -622,10 +624,12 @@ typedef struct smb_lease { */ void *ls_oplock_ofile; uint32_t ls_refcnt; - uint32_t ls_state; - uint32_t ls_breaking; /* BREAK_TO... flags */ + uint32_t ls_state; /* what client has now */ + uint32_t ls_breakto; /* level breaking to */ uint16_t ls_epoch; uint16_t ls_version; + boolean_t ls_breaking; + kcondvar_t ls_ack_cv; /* Wait for ACK */ uint8_t ls_key[SMB_LEASE_KEY_SZ]; uint8_t ls_clnt[SMB_LEASE_KEY_SZ]; } smb_lease_t; @@ -1657,7 +1661,9 @@ typedef struct smb_arg_lock { typedef struct smb_arg_olbrk { uint32_t NewLevel; + uint32_t OldLevel; boolean_t AckRequired; + uint8_t LeaseKey[SMB_LEASE_KEY_SZ]; } smb_arg_olbrk_t; /* |