[linux-cifs-client] Re: lookup intent patch

Shirish Pargaonkar shirishpargaonkar at gmail.com
Fri Mar 27 15:15:21 GMT 2009


On Thu, Mar 19, 2009 at 3:36 PM, Shirish Pargaonkar
<shirishpargaonkar at gmail.com> wrote:
> On Fri, Feb 27, 2009 at 2:34 PM, Shirish Pargaonkar
> <shirishpargaonkar at gmail.com> wrote:
>> While there are pending issues related to broken Samba server posix
>> code/behaviour,
>> I thought I will run by you the patch for lookup intent nonetheless.
>>
>> It worked on 2.6.29-rc3 kernel with some of the testing I have done, I
>> just downloaded
>> the git sources from Steve's tree and ported the patch, that is what this is.
>> I am building those sources and should boot with that kernel and test
>> the patch and post
>> the results here.
>>
>> Regards,
>>
>> Shirish
>>
>
> Here is the second version of the lookup intent patch that takes into
> consideration the samba posix open bug.
>
> I ran modified connectathon test1 to create 5000 files.
> I am not sure whether existing code when does not send SET_PATH_INFO
> with info level
> SMB_SET_FILE_END_OF_FILE_INFO2  for O_TRUNC flag to a file open/creat
> is a bug or not,
> looking into it.
>
>
> With the cthon test1 test, the files are created using
> creat(<file_name>, 0666) meaning flags of
> O_WRONLY, O_CREAT, O_TRUNC.
>
> With the current code, the O_TRUNC is not honoured i.e. I do not
> see SMB_SET_FILE_END_OF_FILE_INFO2 info level going over the wire,
> hence the faster creation of the files.
>
> I changed the code in test1.c by changing the call
>  creat(name, CHMOD_RW)
> to
>  open(name, O_WRONLY | O_CREAT, CHMOD_RW)
> and I can see open with lookup intent is definitely faster (28%).
>
>
>
> ---------------------- lookup intent and cifs_posix_open with creat
> --------------------
>
> + date
> Thu Mar 19 11:26:03 CDT 2009
> + ./test1 -f
> ./test1: File and directory creation test
>  test1 files 2  created 5000 files 1 directories 1 levels deep
>        ./test1 ok.
> + date
> Thu Mar 19 11:26:29 CDT 2009
>
>
> SMB_POSIX_OPEN
> SMB_SET_FILE_END_OF_FILE_INFO2
> SMB_SET_FILE_UNIX_BASIC
>
>
> ---------------------- no lookup intent and cifs_posix_open with creat
> ------------------
>
> + date
> Thu Mar 19 11:28:43 CDT 2009
> + ./test1 -f
>
> ./test1: File and directory creation test
>  test1 files 2  created 5000 files 1 directories 1 levels deep
>        ./test1 ok.
> + date
> Thu Mar 19 11:29:01 CDT 2009
>
> SMB_POSIX_OPEN
>
> -----------------------------------------------------------------------------
>
>
>
>
> ---------------------- lookup intent and cifs_posix_open with open
> --------------------
>
> + date
> Thu Mar 19 15:19:32 CDT 2009
> + ./test1 -f
> ./test1: File and directory creation test
>  test1 files 2  created 5000 files 0 directories 1 levels deep
>        ./test1 ok.
> + date
> Thu Mar 19 15:19:45 CDT 2009
>
>
> ---------------------- no lookup intent and cifs_posix_open with open
> ------------------
>
> + date
> Thu Mar 19 15:21:07 CDT 2009
> + ./test1 -f
> ./test1: File and directory creation test
>  test1 files 2  created 5000 files 0 directories 1 levels deep
>        ./test1 ok.
> + date
> Thu Mar 19 15:21:25 CDT 2009
>
>
> -----------------------------------------------------------------------------
>

Here is the third iteration of the lookup intent patch for cifs, this
time mode is set with taking umaks into consideration.

Regards,

Shirish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: li.3.patch
Type: application/octet-stream
Size: 7966 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20090327/cde3fe0c/li.3.obj


More information about the linux-cifs-client mailing list