Re: [3.0.0+][Regression][Bisected] CIFS: getdents() broken for large dirs

2011-08-02 Thread Jeff Layton
/distfiles/ | wc -l 47470 /usr/portage contains a lot of directories, /usr/portage/distfiles contains lots of files. A bisect in fs/cifs gives: $ git bisect bad c4d3396b261473ded6f370edd1e79ba34e089d7e is the first bad commit commit c4d3396b261473ded6f370edd1e79ba34e089d7e Author: Jeff Layton

Re: [3.0.0+][Regression][Bisected] CIFS: getdents() broken for large dirs

2011-08-02 Thread Jeff Layton
On Tue, 2 Aug 2011 06:44:55 -0400 Jeff Layton jlay...@redhat.com wrote: On Tue, 2 Aug 2011 02:30:35 +0200 Jan Seiffert kaffeemons...@googlemail.com wrote: Please CC, as not subscibed. Looks like something broke CIFS. Kernel 3.0.0 works, master after the CIFS merge does not ATM

Re: optimize mount.cifs for speed?

2011-08-03 Thread Jeff Layton
that in the not too distant future, but it requires some relatively major work to do it right. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH] CIFS: Fix missing a decrement of inFlight value

2011-08-03 Thread Jeff Layton
) { mutex_unlock(server-srv_mutex); + atomic_dec(server-inFlight); + wake_up(server-request_q); return -ENOMEM; } Good catch -- looks correct: Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line

regression with prefixpath mounts

2011-08-04 Thread Jeff Layton
...we may need to come up with a scheme more like NFS does. It will alter the tree when it discovers that a root dir that it previously was working on is actually a subdir of another mount. Thoughts? -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe

[PATCH] cifs: cope with negative dentries in cifs_get_root

2011-08-05 Thread Jeff Layton
://bugzilla.redhat.com/show_bug.cgi?id=727927 Reported-by: TR Bentley h...@trarbentley.net Reported-by: Iain Arnell iarn...@gmail.com Cc: Al Viro v...@zeniv.linux.org.uk Cc: sta...@kernel.org Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsfs.c |4 1 files changed, 4 insertions(+), 0

[PATCH] cifs: convert prefixpath delimiters in cifs_build_path_to_root

2011-08-05 Thread Jeff Layton
Cc: Pavel Shilovsky piastr...@gmail.com Cc: sta...@kernel.org Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/inode.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 9b018c8..a7b2dcd 100644 --- a/fs/cifs

[PATCH] cifs: demote cERROR in build_path_from_dentry to cFYI

2011-08-08 Thread Jeff Layton
during debugging. Cc: sta...@kernel.org Cc: Al Viro v...@zeniv.linux.org.uk Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/dir.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index ae576fb..72d448b 100644 --- a/fs/cifs/dir.c

Re: [PATCH] cifs: demote cERROR in build_path_from_dentry to cFYI

2011-08-08 Thread Jeff Layton
run I hit it 7 times within 1 second. I think this started with commit dc137bf553 which is pretty recent. Before that, the read_seqretry check wasn't present. -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message

Re: regression with prefixpath mounts

2011-08-09 Thread Jeff Layton
On Tue, 9 Aug 2011 20:49:57 +0400 Pavel Shilovsky piastr...@gmail.com wrote: 2011/8/4 Pavel Shilovsky piastr...@gmail.com: 2011/8/4 Jeff Layton jlay...@redhat.com: Hi Pavel, We have a bit of a problem...    https://bugzilla.redhat.com/show_bug.cgi?id=727834 The shared superblock

Re: Kernel 3.0: Instant kernel crash when mounting CIFS

2011-08-15 Thread Jeff Layton
again: 80975d21aae2136ccae1ce914a1602dc1d8b0795 f9e8c45002cacad536b338dfa9e910e341a49c31 Cheers, -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: Kernel 3.0: Instant kernel crash when mounting CIFS (also crashes with linux-3.1-rc2

2011-08-17 Thread Jeff Layton
that might be helpful is turning on page poisoning and redoing this test, that might make it crash sooner and point out the source of the corruption. Even better would be a bisect to track down the cause... -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe

Re: Q: cifs, freeing volume_info-UNCip

2011-08-17 Thread Jeff Layton
(volume_info-iocharset); kfree(volume_info-prepath); Looks correct, nice catch. Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: Q: cifs, freeing volume_info-UNCip

2011-08-18 Thread Jeff Layton
(volume_info-iocharset); kfree(volume_info-prepath); Also, this patch should obviously go to stable too. -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: Kernel 3.0: Instant kernel crash when mounting CIFS (also crashes with linux-3.1-rc2

2011-08-18 Thread Jeff Layton
. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Kernel 3.0: Instant kernel crash when mounting CIFS (also crashes with linux-3.1-rc2

2011-08-18 Thread Jeff Layton
On Thu, 18 Aug 2011 12:25:50 -0500 Steve French smfre...@gmail.com wrote: On Thu, Aug 18, 2011 at 12:16 PM, Justin Piszcz jpis...@lucidpixels.com wrote: On Thu, 18 Aug 2011, Jeff Layton wrote: On Thu, 18 Aug 2011 09:15:36 -0400 (EDT) Justin Piszcz jpis...@lucidpixels.com wrote

Re: Kernel 3.0: Instant kernel crash when mounting CIFS (also crashes with linux-3.1-rc2

2011-08-18 Thread Jeff Layton
, but that just recently changed... Reads are done using relatively small buffers and then copied to pagecache. Part of what I'm working on will be to allow for much larger reads directly into the pagecache. That should also help performance significantly. -- Jeff Layton jlay...@samba.org

[PATCH] cifs: switch CIFSSMBQAllEAs to use memcmp

2011-08-19 Thread Jeff Layton
...as that's more efficient when we know that the lengths are equal. Reported-by: David Howells dhowe...@redhat.com Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifssmb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c

[PATCH] cifs: use memcpy for magic string in cifs signature generation BSRSPYL

2011-08-19 Thread Jeff Layton
...it's more efficient since we know the length. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsencrypt.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index e76bfeb..f11dfb6 100644 --- a/fs/cifs

[PATCH] cifs: get rid of unused xid in cifs_get_root

2011-08-19 Thread Jeff Layton
Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsfs.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f93eb94..eac8e087 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -530,7 +530,6 @@ cifs_get_root(struct

[PATCH] cifs: untangle server-maxBuf and CIFSMaxBufSize

2011-08-19 Thread Jeff Layton
interchangeably in the code. This makes little sense as these two values are not related at all. Separate them and make sure the code uses the right values in the right places. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifssmb.c | 33 ++--- fs/cifs/connect.c | 11

[PATCH 00/14] cifs: cleanup and overhaul of the receive codepath

2011-08-19 Thread Jeff Layton
once these changes are in place. Comments and suggestions welcome... Jeff Layton (14): cifs: trivial: remove obsolete comment cifs: make smb_msg local to read_from_socket cifs: check for unresponsive server every time we call kernel_recvmsg cifs: simplify read_from_socket cifs: turn

[PATCH 01/14] cifs: trivial: remove obsolete comment

2011-08-19 Thread Jeff Layton
Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0ffba09..55efd1d 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -694,12 +694,6 @@ incomplete_rcv

[PATCH 02/14] cifs: make smb_msg local to read_from_socket

2011-08-19 Thread Jeff Layton
If msg_controllen is 0, then the socket layer should never touch these fields. Thus, there's no need to continually reset them. Also, there's no need to keep this field on the stack for the demultiplex thread, just make it a local variable in read_from_socket. Signed-off-by: Jeff Layton jlay

[PATCH 03/14] cifs: check for unresponsive server every time we call kernel_recvmsg

2011-08-19 Thread Jeff Layton
If the server stops sending data while in the middle of sending a response then we still want to reconnect it if it doesn't come back. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 33 ++--- 1 files changed, 22 insertions(+), 11 deletions

[PATCH 04/14] cifs: simplify read_from_socket

2011-08-19 Thread Jeff Layton
the same way. Also, make it return an int (since we'll never receive enough to worry about the sign bit anyway), and simply make it return the amount of bytes read or a negative error code. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 77

[PATCH 05/14] cifs: turn read_from_socket into a wrapper around a vectorized version

2011-08-19 Thread Jeff Layton
to use a copy of the kvec array and refresh that copy on each pass through the loop. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 72 +++- 1 files changed, 65 insertions(+), 7 deletions(-) diff --git a/fs/cifs/connect.c b/fs

[PATCH 06/14] cifs: clean up check_rfc1002_header

2011-08-19 Thread Jeff Layton
a new receive phase and normalize the cFYI messages. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 63 +--- 1 files changed, 30 insertions(+), 33 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 430e563

[PATCH 07/14] cifs: add a third receive phase to cifs_demultiplex_thread

2011-08-19 Thread Jeff Layton
Have the demultiplex thread receive just enough to get to the MID, and then find it before receiving the rest. Later, we'll use this to swap in a preallocated receive buffer for some calls. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 31

[PATCH 08/14] cifs: clean up checkSMB

2011-08-19 Thread Jeff Layton
. Finally, change checkSMB to return a real error code (-EIO) when it finds an error. That will help simplify some coming changes in the callers. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c |2 +- fs/cifs/misc.c| 51 +-- 2

[PATCH 09/14] cifs: move mid finding into separate routine

2011-08-19 Thread Jeff Layton
-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 113 +++-- 1 files changed, 66 insertions(+), 47 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 28007fd..bfd9622 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs

[PATCH 10/14] cifs: eliminate is_multi_rsp parm to find_cifs_mid

2011-08-19 Thread Jeff Layton
as well and just pass by value. If a mid is found, then we can just mark it as malformed. If one isn't found, then the value of length won't change anyway. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 35 --- 1 files changed, 16 insertions

[PATCH 11/14] cifs: move buffer pointers into TCP_Server_Info

2011-08-19 Thread Jeff Layton
We have several functions that need to access these pointers. Currently that's done with a lot of double pointer passing. Instead, move them into the TCP_Server_Info and simplify the handling. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |4 ++ fs/cifs/connect.c

[PATCH 12/14] cifs: find mid earlier in receive codepath

2011-08-19 Thread Jeff Layton
In order to receive directly into a preallocated buffer, we need to ID the mid earlier, before the bulk of the response is read. Call the mid finding routine as soon as we're able to read the mid. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 24

[PATCH 13/14] cifs: break out 3rd receive phase into separate function

2011-08-19 Thread Jeff Layton
Move the entire 3rd phase of the receive codepath into a separate function in preparation for the addition of a pluggable receive function. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 101 +++-- 1 files changed, 59

[PATCH 14/14] cifs: add a callback function to receive the rest of the frame

2011-08-19 Thread Jeff Layton
the mid_q_entry has been identified in order to receive the rest of the SMB. If the mid can't be identified or the receive pointer is unset, then the standard 3rd phase receive function will be called. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h | 23

Re: [PATCH] CIFS: Fix ERR_PTR dereference in cifs_get_root

2011-08-21 Thread Jeff Layton
)); _FreeXid(xid); kfree(full_path); What exactly does this fix? The only possible thing I could see it is if sb-s_root was a negative dentry, and I'm not sure that would ever happen. Would it? -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux

[PATCH] cifs: fix possible memory corruption in CIFSFindNext

2011-08-23 Thread Jeff Layton
this by making the name_len an unsigned value in CIFSFindNext. Cc: sta...@kernel.org Reported-by: Darren Lavender d...@hppine99.gbr.hp.com Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifssmb.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/cifs/cifssmb.c b

Re: [PATCH] cifs: fix possible memory corruption in CIFSFindNext

2011-08-23 Thread Jeff Layton
On Tue, 23 Aug 2011 17:55:25 +0530 Suresh Jayaraman sjayara...@suse.de wrote: On 08/23/2011 04:51 PM, Jeff Layton wrote: The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some

Re: [PATCH 1/5] cifs-utils: cifsacl utilities: Create file cifsacl.h

2011-08-23 Thread Jeff Layton
these perms */ +}; -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 4/5] cifs-utils: cifsacl utilities: Add configure and make directives

2011-08-23 Thread Jeff Layton
-- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 0/5] cifs-utils: cifsacl utilities: Implement getcifsacl and setcifsacl

2011-08-23 Thread Jeff Layton
, but this certainly doesn't preclude that, and seems useful. One minor nit: you should add the manpages before the autoconf changes to make sure that bisectability is preserved. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message

[PATCH] autoconf: fix help message for --enable-cifsidmap

2011-08-23 Thread Jeff Layton
It currently says no is the default, but it should be yes. Reported-by: Elias Pipping pipp...@lavabit.com Signed-off-by: Jeff Layton jlay...@samba.org --- configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 780abe7..6a9ad75

Re: [PATCH] cifs: Add mount option named backup

2011-08-23 Thread Jeff Layton
with the appropriate flag. If all the backup users were in a certan group, for instance, then you could use that info to decide whether to set the flag in the open calls. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message

Re: [PATCH] autoconf: fix help message for --enable-cifsidmap

2011-08-23 Thread Jeff Layton
, but if the necessary stuff wasn't present then it would be autodisabled. That's how cifs.upcall works too. If default=auto is more illustrative of this situation then I'll respin the patch and fix the cifs.upcall help text too. Quoting Jeff Layton jlay...@samba.org: It currently says no is the default

Re: [PATCH] CIFS: Fix ERR_PTR dereference in cifs_get_root

2011-08-24 Thread Jeff Layton
On Sun, 21 Aug 2011 12:22:51 -0400 Jeff Layton jlay...@samba.org wrote: On Sun, 21 Aug 2011 19:30:15 +0400 Pavel Shilovsky piastr...@gmail.com wrote: move it to the beginning of the loop. Signed-off-by: Pavel Shilovsky piastr...@gmail.com --- fs/cifs/cifsfs.c | 10

Re: [PATCH] [CIFS] ls on mounts to WindowsCE failing with invalid level message

2011-08-24 Thread Jeff Layton
; } + error_exit: kfree(full_path); cifs_put_tlink(tlink); -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] cifs-utils: Add uid/gid to SID mapping functions (try #4)

2011-08-25 Thread Jeff Layton
to review the kernel pieces however. If Steve plans to review and commit those, then I'll plan to pull the userspace patch into the next cifs-utils release. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord

Re: [PATCH 7/8] cifs-utils: cifsacl utilities: Add configure and make directives for cifsacl (try #2)

2011-08-25 Thread Jeff Layton
autoconf tests pull in extra includes, but I don't have my autoconf book handy. Shirish, can you look into this, fix it and resubmit this patch? Simo tells me there's an open samba bug to fix this... -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 7/8] cifs-utils: cifsacl utilities: Add configure and make directives for cifsacl (try #2)

2011-08-25 Thread Jeff Layton
On Thu, 25 Aug 2011 13:50:06 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Thu, Aug 25, 2011 at 1:40 PM, Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Thu, Aug 25, 2011 at 1:34 PM, Jeff Layton jlay...@samba.org wrote: On Tue, 23 Aug 2011 14:04:24 -0500

[PATCH] autoconf: work around broken wbclient.h file

2011-08-25 Thread Jeff Layton
Some versions of wbclient.h have function declarations with bool type args, but they don't include wbclient.h themselves. Make sure that we can deal with that by telling the autoconf test to include stdbool.h explicitly. Signed-off-by: Jeff Layton jlay...@samba.org --- configure.ac | 59

Re: [PATCH] CIFS: Fix NT_STATUS_ACCESS_DENIED for mounts with prefixpath option

2011-08-26 Thread Jeff Layton
of dcache trickery, but I tend to think we probably ought to follow NFS' example here. It has sort of an opportunistic mechanism for filling in the dcache for a particular superblock. This is detailed in the comments on commit 54ceac45. David, any thoughts here? -- Jeff Layton jlay...@redhat.com

Re: [PATCH] autoconf: work around broken wbclient.h file

2011-08-26 Thread Jeff Layton
On Thu, 25 Aug 2011 15:55:14 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Thu, Aug 25, 2011 at 3:31 PM, Jeff Layton jlay...@samba.org wrote: Some versions of wbclient.h have function declarations with bool type Jeff, did not understand this verbiage, did you mean winbind

[PATCH 00/16] cifs: cleanup and overhaul of the receive codepath (try #2)

2011-08-26 Thread Jeff Layton
this infrastructure to allow for a larger rsize. Jeff Layton (16): cifs: clean up checkSMB cifs: consolidate signature generating code cifs: trivial: remove obsolete comment cifs: make smb_msg local to read_from_socket cifs: check for unresponsive server every time we call kernel_recvmsg

[PATCH 01/16] cifs: clean up checkSMB

2011-08-26 Thread Jeff Layton
. Finally, change checkSMB to return a real error code (-EIO) when it finds an error. That will help simplify some coming changes in the callers. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/misc.c | 51 +-- 1 files changed, 25 insertions

[PATCH 02/16] cifs: consolidate signature generating code

2011-08-26 Thread Jeff Layton
We have two versions of signature generating code. A vectorized and non-vectorized version. Eliminate a large chunk of cut-and-paste code by turning the non-vectorized version into a wrapper around the vectorized one. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsencrypt.c | 103

[PATCH 04/16] cifs: make smb_msg local to read_from_socket

2011-08-26 Thread Jeff Layton
If msg_controllen is 0, then the socket layer should never touch these fields. Thus, there's no need to continually reset them. Also, there's no need to keep this field on the stack for the demultiplex thread, just make it a local variable in read_from_socket. Signed-off-by: Jeff Layton jlay

[PATCH 03/16] cifs: trivial: remove obsolete comment

2011-08-26 Thread Jeff Layton
Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0ffba09..55efd1d 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -694,12 +694,6 @@ incomplete_rcv

[PATCH 05/16] cifs: check for unresponsive server every time we call kernel_recvmsg

2011-08-26 Thread Jeff Layton
If the server stops sending data while in the middle of sending a response then we still want to reconnect it if it doesn't come back. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 33 ++--- 1 files changed, 22 insertions(+), 11 deletions

[PATCH 06/16] cifs: simplify read_from_socket

2011-08-26 Thread Jeff Layton
the same way. Also, make it return an int (since we'll never receive enough to worry about the sign bit anyway), and simply make it return the amount of bytes read or a negative error code. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 77

[PATCH 07/16] cifs: turn read_from_socket into a wrapper around a vectorized version

2011-08-26 Thread Jeff Layton
to use a copy of the kvec array and refresh that copy on each pass through the loop. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 72 +++- 1 files changed, 65 insertions(+), 7 deletions(-) diff --git a/fs/cifs/connect.c b/fs

[PATCH 08/16] cifs: keep a reusable kvec array for receives

2011-08-26 Thread Jeff Layton
Having to continually allocate a new kvec array is expensive. Allocate one that's big enough, and only reallocate it as needed. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |2 ++ fs/cifs/connect.c | 26 -- 2 files changed, 22 insertions

[PATCH 09/16] cifs: clean up check_rfc1002_header

2011-08-26 Thread Jeff Layton
a new receive phase and normalize the cFYI messages. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 63 +--- 1 files changed, 30 insertions(+), 33 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f7bd9ba

[PATCH 10/16] cifs: add a third receive phase to cifs_demultiplex_thread

2011-08-26 Thread Jeff Layton
Have the demultiplex thread receive just enough to get to the MID, and then find it before receiving the rest. Later, we'll use this to swap in a preallocated receive buffer for some calls. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 31

[PATCH 12/16] cifs: eliminate is_multi_rsp parm to find_cifs_mid

2011-08-26 Thread Jeff Layton
as well and just pass by value. If a mid is found, then we can just mark it as malformed. If one isn't found, then the value of length won't change anyway. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 35 --- 1 files changed, 16 insertions

[PATCH 13/16] cifs: move buffer pointers into TCP_Server_Info

2011-08-26 Thread Jeff Layton
We have several functions that need to access these pointers. Currently that's done with a lot of double pointer passing. Instead, move them into the TCP_Server_Info and simplify the handling. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |4 ++ fs/cifs/connect.c

[PATCH 14/16] cifs: find mid earlier in receive codepath

2011-08-26 Thread Jeff Layton
In order to receive directly into a preallocated buffer, we need to ID the mid earlier, before the bulk of the response is read. Call the mid finding routine as soon as we're able to read the mid. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 24

[PATCH 3/5] cifs: convert cifs_readpages to use async reads

2011-08-26 Thread Jeff Layton
. The rest is handled by the async readv infrastructure. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/file.c | 260 +++ 1 files changed, 90 insertions(+), 170 deletions(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index fd57165..2f263bd

[PATCH 4/5] cifs: allow for larger rsize= options and set default to 1M

2011-08-26 Thread Jeff Layton
and wsize are less than PAGE_CACHE_SIZE. Although it has never been enforced at mount time, cifs.ko has never handled those cases properly. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 101 +++-- fs/cifs/file.c| 12 +- 2

[PATCH 5/5] cifs: don't discard readahead pages that are beyond EOF

2011-08-26 Thread Jeff Layton
in the response, and the page is beyond the server-eof, then simply zero it out, set it uptodate and leave it in place. This ensures that the VFS won't keep trying to issue reads for these regions. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifssmb.c | 15 +++ 1 files changed, 15

[PATCH 2/5] cifs: add cifs_async_readv

2011-08-26 Thread Jeff Layton
embedded in struct page. Once the read completes, the pages are added to the LRU list, set Uptodate and unlocked. While this may seem like an odd way to handle the pagecache, it does prevent the VFS from attempting to issue duplicate reads on the same pages. Signed-off-by: Jeff Layton jlay

Re: [PATCH] CIFS: Fix NT_STATUS_ACCESS_DENIED for mounts with prefixpath option

2011-08-26 Thread Jeff Layton
On Sat, 27 Aug 2011 00:11:57 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: 2011/8/26 Jeff Layton jlay...@redhat.com: On Fri, 26 Aug 2011 10:52:21 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: Reorganize code and make it send qpath info request only for a full path (//server/share

Re: [PATCH] CIFS: Fix the conflict between rwpidforward and rw mount options

2011-08-27 Thread Jeff Layton
On Sat, 27 Aug 2011 14:41:36 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: 2011/8/27 Jeff Layton jlay...@poochiereds.net: On Fri, 26 Aug 2011 22:03:03 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: Both these options are started with rw - that's why the first one isn't switched

Re: Kernel 3.0: Instant kernel crash when mounting CIFS (also crashes with linux-3.1-rc2

2011-08-27 Thread Jeff Layton
. Thanks, -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 04/16] cifs: make smb_msg local to read_from_socket

2011-08-29 Thread Jeff Layton
If msg_controllen is 0, then the socket layer should never touch these fields. Thus, there's no need to continually reset them. Also, there's no need to keep this field on the stack for the demultiplex thread, just make it a local variable in read_from_socket. Signed-off-by: Jeff Layton jlay

[PATCH 03/16] cifs: trivial: remove obsolete comment

2011-08-29 Thread Jeff Layton
Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b5f0d90..5667964 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -694,12 +694,6 @@ incomplete_rcv

[PATCH 01/16] cifs: clean up checkSMB

2011-08-29 Thread Jeff Layton
. Finally, change checkSMB to return a real error code (-EIO) when it finds an error. That will help simplify some coming changes in the callers. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/misc.c | 51 +-- 1 files changed, 25 insertions

[PATCH 00/16] cifs: cleanup and overhaul of the receive codepath (try #3)

2011-08-29 Thread Jeff Layton
in this code. I feel that's essential as bugs in the receive path can be very subtle and hard to detect. Being able to bisect to find bugs is a generally a good thing. Hence, I highly recommend committing these in order. Jeff Layton (16): cifs: clean up checkSMB cifs: consolidate signature generating

[PATCH 05/16] cifs: check for unresponsive server every time we call kernel_recvmsg

2011-08-29 Thread Jeff Layton
If the server stops sending data while in the middle of sending a response then we still want to reconnect it if it doesn't come back. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 33 ++--- 1 files changed, 22 insertions(+), 11 deletions

[PATCH 06/16] cifs: simplify read_from_socket

2011-08-29 Thread Jeff Layton
the same way. Also, make it return an int (since we'll never receive enough to worry about the sign bit anyway), and simply make it return the amount of bytes read or a negative error code. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 77

[PATCH 07/16] cifs: turn read_from_socket into a wrapper around a vectorized version

2011-08-29 Thread Jeff Layton
to use a copy of the kvec array and refresh that copy on each pass through the loop. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 72 +++- 1 files changed, 65 insertions(+), 7 deletions(-) diff --git a/fs/cifs/connect.c b/fs

[PATCH 08/16] cifs: keep a reusable kvec array for receives

2011-08-29 Thread Jeff Layton
Having to continually allocate a new kvec array is expensive. Allocate one that's big enough, and only reallocate it as needed. Also, we need to use GFP_NOFS here to ensure that this doesn't deadlock. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |2 ++ fs/cifs

[PATCH 10/16] cifs: add a third receive phase to cifs_demultiplex_thread

2011-08-29 Thread Jeff Layton
Have the demultiplex thread receive just enough to get to the MID, and then find it before receiving the rest. Later, we'll use this to swap in a preallocated receive buffer for some calls. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 31

[PATCH 11/16] cifs: move mid finding into separate routine

2011-08-29 Thread Jeff Layton
-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 113 +++-- 1 files changed, 66 insertions(+), 47 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index bc16873..6b4fcb3 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs

[PATCH 12/16] cifs: eliminate is_multi_rsp parm to find_cifs_mid

2011-08-29 Thread Jeff Layton
as well so just pass by value. If a mid is found, then we can just mark it as malformed. If one isn't found, then the value of length won't change anyway. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 35 --- 1 files changed, 16 insertions

[PATCH 13/16] cifs: move buffer pointers into TCP_Server_Info

2011-08-29 Thread Jeff Layton
We have several functions that need to access these pointers. Currently that's done with a lot of double pointer passing. Instead, move them into the TCP_Server_Info and simplify the handling. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |4 ++ fs/cifs/connect.c

[PATCH 15/16] cifs: break out 3rd receive phase into separate function

2011-08-29 Thread Jeff Layton
Move the entire 3rd phase of the receive codepath into a separate function in preparation for the addition of a pluggable receive function. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 101 +++-- 1 files changed, 59

[PATCH 16/16] cifs: add a callback function to receive the rest of the frame

2011-08-29 Thread Jeff Layton
the mid_q_entry has been identified in order to receive the rest of the SMB. If the mid can't be identified or the receive pointer is unset, then the standard 3rd phase receive function will be called. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h | 23

[PATCH 0/4] cifs: allow cifs to do readpages larger and asynchronously (try #2)

2011-08-29 Thread Jeff Layton
or on higher-latency connections. Steve, I'd like to see both of these sets go into 3.2 if at all possible. Both of these sets should be bisectable, so committing them in order is highly recommended. Jeff Layton (4): cifs: fix protocol definition for READ_RSP cifs: add cifs_async_readv cifs: convert

[PATCH 1/4] cifs: fix protocol definition for READ_RSP

2011-08-29 Thread Jeff Layton
There is no pad, and it simplifies the code to remove the Data field. None of the existing code relies on these fields, or on the READ_RSP being a particular length. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifspdu.h |4 +--- 1 files changed, 1 insertions(+), 3 deletions

[PATCH 2/4] cifs: add cifs_async_readv

2011-08-29 Thread Jeff Layton
that to receive the rest of the frame. cifs_readv_receive will then marshal up a kvec array with kmapped pages from the pagecache, which eliminates one copy of the data. Once the data is received, the pages are added to the pagecache, set uptodate, and unlocked. Signed-off-by: Jeff Layton jlay...@redhat.com

[PATCH 3/4] cifs: convert cifs_readpages to use async reads

2011-08-29 Thread Jeff Layton
Now that we have code in place to do asynchronous reads, convert cifs_readpages to use it. The new cifs_readpages walks the page_list that gets passed in, sets up cifs_readdata to handle the reads. The rest is handled by the async readv infrastructure. Signed-off-by: Jeff Layton jlay

[PATCH 4/4] cifs: allow for larger rsize= options and change defaults

2011-08-29 Thread Jeff Layton
handled those cases properly. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 113 fs/cifs/file.c| 12 +- 2 files changed, 79 insertions(+), 46 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c

Re: [PATCH][Trivial] CIFS: Don't free volume_info-UNC until we are entirely done with it.

2011-08-29 Thread Jeff Layton
-UNCip); + kfree(volume_info-UNC); kfree(volume_info-domainname); kfree(volume_info-iocharset); kfree(volume_info-prepath); Seems reasonable for silencing the checker... Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line

Re: [PATCH 0/5] cifs-utils: cifsacl utilities: Implement getcifsacl and setcifsacl (try #2)

2011-08-29 Thread Jeff Layton
unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Latest set of 8 patches committed. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body

Re: [PATCH] autoconf: fix help message for --enable-cifsidmap

2011-08-29 Thread Jeff Layton
On Tue, 23 Aug 2011 09:03:23 -0400 Jeff Layton jlay...@samba.org wrote: It currently says no is the default, but it should be yes. Reported-by: Elias Pipping pipp...@lavabit.com Signed-off-by: Jeff Layton jlay...@samba.org --- configure.ac |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH] autoconf: work around broken wbclient.h file

2011-08-29 Thread Jeff Layton
On Thu, 25 Aug 2011 16:31:03 -0400 Jeff Layton jlay...@samba.org wrote: Some versions of wbclient.h have function declarations with bool type args, but they don't include wbclient.h themselves. Make sure that we can deal with that by telling the autoconf test to include stdbool.h explicitly

Re: [PATCH] mount.cifs: fix the conflict between rwpidforward and rw mount options

2011-08-29 Thread Jeff Layton
; if (strncmp(token, ro, 2) == 0) return OPT_RO; - if (strncmp(token, rw, 2) == 0) + if (strncmp(token, rw, 2) == 0 strlen(token) == 2) return OPT_RW; if (strncmp(token, remount, 7) == 0) return OPT_REMOUNT; Committed. -- Jeff

Re: [PATCH] cifs: Add mount option named backup

2011-08-29 Thread Jeff Layton
On Mon, 29 Aug 2011 16:24:33 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Tue, Aug 23, 2011 at 8:15 AM, Jeff Layton jlay...@samba.org wrote: On Mon, 22 Aug 2011 08:33:49 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Fri, Aug 12, 2011 at 11:33 AM

Re: [PATCH] cifs: Add mount option named backup

2011-08-30 Thread Jeff Layton
On Mon, 29 Aug 2011 20:11:13 -0500 Steve French smfre...@gmail.com wrote: On Mon, Aug 29, 2011 at 7:29 PM, Jeff Layton jlay...@samba.org wrote: On Mon, 29 Aug 2011 16:24:33 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Tue, Aug 23, 2011 at 8:15 AM, Jeff Layton jlay

<    4   5   6   7   8   9   10   11   12   13   >