Patchset to add asynchronous open/close to master

simo idra at samba.org
Tue Jun 12 18:23:14 MDT 2012


On Tue, 2012-06-12 at 16:49 -0700, Jeremy Allison wrote:
> >From ad8aa7bc364e2badbf052c50511aae85b76c8eea Mon Sep 17 00:00:00
> 2001
> From: Jeremy Allison <jra at samba.org>
> Date: Tue, 12 Jun 2012 13:54:08 -0700
> Subject: [PATCH 05/13] Add new bool field async_open to struct
>  deferred_open_record. Not used yet.
> 
> ---
>  source3/smbd/open.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/source3/smbd/open.c b/source3/smbd/open.c
> index 3ea0759..f39b2c6 100644
> --- a/source3/smbd/open.c
> +++ b/source3/smbd/open.c
> @@ -35,6 +35,7 @@ extern const struct generic_mapping
> file_generic_mapping;
>  
>  struct deferred_open_record {
>          bool delayed_for_oplocks;
> +       bool async_open;
>          struct file_id id;
>  };
>  
> @@ -1529,6 +1530,7 @@ static void schedule_defer_open(struct
> share_mode_lock *lck,
>  
>         ZERO_STRUCT(state);
>         state.delayed_for_oplocks = True;
> +       state.async_open = false;
>         state.id = lck->data->id;
>  
>         if (!request_timed_out(request_time, timeout)) {
> @@ -2164,6 +2166,7 @@ static NTSTATUS
> open_file_ntcreate(connection_struct *conn,
>  
>                                 ZERO_STRUCT(state);
>                                 state.delayed_for_oplocks = False;
> +                               state.async_open = false;
>                                 state.id = id;
>  
>                                 if ((req != NULL)
> @@ -2306,6 +2309,7 @@ static NTSTATUS
> open_file_ntcreate(connection_struct *conn,
>  
>                         ZERO_STRUCT(state);
>                         state.delayed_for_oplocks = False;
> +                       state.async_open = false;
>                         state.id = id;
>  
>                         /* Do it all over again immediately. In the
> second

What's the point of setting this to false if you just zeroed the
struct ?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list