mode_t unx_mode = (mode_t)0;
int info;
uint32_t existing_dos_attributes = 0;
- struct timeval request_time = timeval_zero();
struct share_mode_lock *lck = NULL;
uint32_t open_access_mask = access_mask;
NTSTATUS status;
if (req) {
struct deferred_open_record *open_rec;
+ struct timeval request_time;
if (get_deferred_open_message_state(req,
&request_time,
&open_rec)) {
request with this mid. We'll use it later to
see if this has timed out. */
+ req->request_time = request_time;
+
/* If it was an async create retry, the file
didn't exist. */
fsp->posix_flags |= FSP_POSIX_FLAGS_ALL;
}
- if (timeval_is_zero(&request_time)) {
- request_time = fsp->open_time;
- }
-
if ((create_options & FILE_DELETE_ON_CLOSE) &&
(flags2 & O_CREAT) &&
!file_existed) {
* second to retry a non-blocking open until the time
* expires.
*/
- setup_kernel_oplock_poll_open(request_time,
- req,
- fsp->file_id);
+ setup_kernel_oplock_poll_open(
+ req->request_time,
+ req,
+ fsp->file_id);
DBG_DEBUG("No Samba oplock around after EWOULDBLOCK. "
"Retrying with poll\n");
return NT_STATUS_SHARING_VIOLATION;
create_disposition,
first_open_attempt);
if (delay) {
- schedule_defer_open(lck, fsp->file_id, request_time,
- req);
+ schedule_defer_open(
+ lck,
+ fsp->file_id,
+ req->request_time,
+ req);
TALLOC_FREE(lck);
DEBUG(10, ("Sent oplock break request to kernel "
"oplock holder\n"));
* second to retry a non-blocking open until the time
* expires.
*/
- setup_kernel_oplock_poll_open(request_time, req, fsp->file_id);
+ setup_kernel_oplock_poll_open(
+ req->request_time, req, fsp->file_id);
TALLOC_FREE(lck);
DBG_DEBUG("No Samba oplock around after EWOULDBLOCK. "
if (!NT_STATUS_IS_OK(fsp_open)) {
if (NT_STATUS_EQUAL(fsp_open, NT_STATUS_RETRY)) {
- schedule_async_open(request_time, req);
+ schedule_async_open(req->request_time, req);
}
return fsp_open;
}
create_disposition,
first_open_attempt);
if (delay) {
- schedule_defer_open(lck, fsp->file_id,
- request_time, req);
+ schedule_defer_open(
+ lck, fsp->file_id, req->request_time, req);
TALLOC_FREE(lck);
fd_close(fsp);
return NT_STATUS_SHARING_VIOLATION;
timeout = timeval_set(0, timeout_usecs);
- if (!request_timed_out(request_time, timeout)) {
- defer_open(lck, request_time, timeout, req,
- false, id);
+ if (!request_timed_out(req->request_time, timeout)) {
+ defer_open(lck,
+ req->request_time,
+ timeout,
+ req,
+ false,
+ id);
}
}