[linux-cifs-client] Re: [PATCH 3/3] cifs: have cifs_create use POSIX create if it's available

Jeff Layton jlayton at redhat.com
Wed Feb 11 17:07:19 GMT 2009


On Wed, 11 Feb 2009 10:51:12 -0600
Steve French <smfrench at gmail.com> wrote:

> On Wed, Feb 11, 2009 at 10:44 AM, Jeff Layton <jlayton at redhat.com> wrote:
> 
> > On Wed, 11 Feb 2009 10:41:07 -0600
> > Steve French <smfrench at gmail.com> wrote:
> >
> > > On Wed, Feb 11, 2009 at 7:08 AM, Jeff Layton <jlayton at redhat.com> wrote:
> > >
> > > > This reduces the number of calls to the server when creating files, and
> > > > also makes the force_create_mode option in samba work correctly.
> > > >
> > > > It also refactors some of the error handling in this function to
> > > > reduce layers of indentation.
> > > >
> > > > This is the second attempt at this patch. The first patch had a
> > > > bug in the open flag conversion routines and didn't try to enable
> > > > O_DIRECT on direct I/O mounts.
> > > >
> > >
> > > This is great, but wondering if the posix create code should be split out
> > to
> > > a different function - calling out early from cifs_create to a new
> > > posix_create (when the server supports posix extensions) to reduce the
> > size
> > > of this (now) 250+ line cifs_create function (as I had done in my earlier
> > > start on posix_create last month).
> > >
> >
> > Wouldn't hurt, though it may be a little while before I can get to it...
> >
> 
> Am looking at it now.
> 
> By the way, in your patch the line:
> 
>        FreeXid(xid);
> +       cFYI(1, ("cifs_create returned %d", rc));
>        return rc;
> 
> is not necessary.   FreeXid already includes the cFYI debug line.
> 

Yeah I thought about that. There was an earlier cFYI that that
replaced. I just moved it down in the function and changed it to print
as a signed int rather than in hex. I'm ok with removing it altogether
though.

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list