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

Steve French smfrench at gmail.com
Fri Feb 13 20:56:49 GMT 2009


On Fri, Feb 13, 2009 at 8:44 AM, Jeff Layton <jlayton at redhat.com> wrote:

> On Wed, 11 Feb 2009 11:44:26 -0500
> Jeff Layton <jlayton at redhat.com> wrote:
>
> > > 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...
> >
>
> I had a look at doing this and I'm not convinced that you're really
> going gain much from trying to break the posix create code into a
> separate function. There are a lot of things that will need to be
> passed back and forth so the argument list is going to be pretty long...
>
> The thing that *would* probably help would be to unify cifs_create and
> cifs_open. i.e., turn them into wrappers around a common function. That
> would also probably make it easier to call that function from the
> lookup like you suggested. I think though, that that would be better
> suited to a separate cleanup patch.
>
> Would it be reasonable to take this patch as-is now, and look at
> unifying those routines later?
>
>
I have used some of your patch (testing it now), but changed a few things -
moved the posix_create call up to a distinct helper function and checked to
make sure that the server claimed support for posix extensions before
calling it (you were only checking if unix extensions were on).

-- 
Thanks,

Steve
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list