mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Be more forgiving on client oplock break failure (as Windows does). Remove a global.
Jeremy.
This commit is contained in:
parent
ed6fa379ef
commit
895b99fd6b
@ -591,7 +591,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Ignore oplock requests if oplocks are disabled. */
|
/* Ignore oplock requests if oplocks are disabled. */
|
||||||
if (!lp_oplocks(SNUM(conn)) || global_client_failed_oplock_break ||
|
if (!lp_oplocks(SNUM(conn)) ||
|
||||||
IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) {
|
IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) {
|
||||||
/* Mask off everything except the private Samba bits. */
|
/* Mask off everything except the private Samba bits. */
|
||||||
oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK;
|
oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK;
|
||||||
|
@ -112,7 +112,6 @@ char *sparse_buf = NULL;
|
|||||||
/* Current number of oplocks we have outstanding. */
|
/* Current number of oplocks we have outstanding. */
|
||||||
int32_t exclusive_oplocks_open = 0;
|
int32_t exclusive_oplocks_open = 0;
|
||||||
int32_t level_II_oplocks_open = 0;
|
int32_t level_II_oplocks_open = 0;
|
||||||
bool global_client_failed_oplock_break = false;
|
|
||||||
struct kernel_oplocks *koplocks = NULL;
|
struct kernel_oplocks *koplocks = NULL;
|
||||||
|
|
||||||
int am_parent = 1;
|
int am_parent = 1;
|
||||||
|
@ -122,7 +122,6 @@ extern char *sparse_buf;
|
|||||||
/* Current number of oplocks we have outstanding. */
|
/* Current number of oplocks we have outstanding. */
|
||||||
extern int32_t exclusive_oplocks_open;
|
extern int32_t exclusive_oplocks_open;
|
||||||
extern int32_t level_II_oplocks_open;
|
extern int32_t level_II_oplocks_open;
|
||||||
extern bool global_client_failed_oplock_break;
|
|
||||||
extern struct kernel_oplocks *koplocks;
|
extern struct kernel_oplocks *koplocks;
|
||||||
|
|
||||||
extern int am_parent;
|
extern int am_parent;
|
||||||
|
@ -1593,7 +1593,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ignore any oplock requests if oplocks are disabled */
|
/* ignore any oplock requests if oplocks are disabled */
|
||||||
if (!lp_oplocks(SNUM(conn)) || global_client_failed_oplock_break ||
|
if (!lp_oplocks(SNUM(conn)) ||
|
||||||
IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) {
|
IS_VETO_OPLOCK_PATH(conn, smb_fname->base_name)) {
|
||||||
/* Mask off everything except the private Samba bits. */
|
/* Mask off everything except the private Samba bits. */
|
||||||
oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK;
|
oplock_request &= SAMBA_PRIVATE_OPLOCK_MASK;
|
||||||
|
@ -320,10 +320,6 @@ static void oplock_timeout_handler(struct event_context *ctx,
|
|||||||
TALLOC_FREE(fsp->oplock_timeout);
|
TALLOC_FREE(fsp->oplock_timeout);
|
||||||
DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n",
|
DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n",
|
||||||
fsp_str_dbg(fsp)));
|
fsp_str_dbg(fsp)));
|
||||||
/* Only set this for SMB1.. */
|
|
||||||
if (!smbd_server_conn->allow_smb2) {
|
|
||||||
global_client_failed_oplock_break = True;
|
|
||||||
}
|
|
||||||
remove_oplock(fsp);
|
remove_oplock(fsp);
|
||||||
reply_to_oplock_break_requests(fsp);
|
reply_to_oplock_break_requests(fsp);
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,6 @@ static void oplock_revoked_handler(uint64_t id)
|
|||||||
DEBUG(0,("Level 1 oplock break failed for file %s. Forcefully "
|
DEBUG(0,("Level 1 oplock break failed for file %s. Forcefully "
|
||||||
"revoking oplock\n", fsp_str_dbg(fsp)));
|
"revoking oplock\n", fsp_str_dbg(fsp)));
|
||||||
|
|
||||||
global_client_failed_oplock_break = True;
|
|
||||||
remove_oplock(fsp);
|
remove_oplock(fsp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user