[PATCH 5/5] cifs: convert cifs_writepages to use async writes

2011-04-02 Thread Jeff Layton
lock until the response is received, release it after doing the send. This will reduce contention for the page lock and should prevent processes that have the file mmap'ed from being blocked unnecessarily. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/file.c | 256

[PATCH 4/5] cifs: add cifs_async_writev

2011-04-02 Thread Jeff Layton
Add the ability for CIFS to do an asynchronous write. The kernel will set the frame up as it would for a normal SMBWrite2 request, and use cifs_call_async to send it. The mid callback will then be configured to handle the result. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs

Re: slash appended to filesystem when mtab symlinked to proc

2011-04-05 Thread Jeff Layton
string. So, in addition to changing mount.cifs to fix this, the kernel routines that format /proc/mounts should also be fixed to handle backslashes correctly. Cheers, -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message

Re: [PATCH 2/5] cifs: remove unneeded variable initialization in cifs_reconnect_tcon

2011-04-05 Thread Jeff Layton
) - return 0; + return rc; ses = tcon-ses; server = ses-server; So instead of eliminating a useless variable initialization, we instead manufacture a use for it? That seems sort of counter-productive, no? -- Jeff Layton jlay...@redhat.com

Re: [PATCH 2/5] cifs: remove unneeded variable initialization in cifs_reconnect_tcon

2011-04-05 Thread Jeff Layton
On Tue, 5 Apr 2011 12:20:52 -0500 Steve French smfre...@gmail.com wrote: On Tue, Apr 5, 2011 at 12:17 PM, Jeff Layton jlay...@redhat.com wrote: On Tue, 5 Apr 2011 12:06:59 -0500 Steve French smfre...@gmail.com wrote: This is fine, but what about this alternative (initializing variables

Re: [PATCH 5/5] cifs: clean up various nits in unicode routines

2011-04-05 Thread Jeff Layton
*is* that line, then perhaps *sparse* is wrong... (0 is special after all). David No, it's because I'm abusing the __le16 on the stack and then fixing it up using cpu_to_le16. It's worth fixing, I think... -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe

[PATCH] cifs: clean up various nits in unicode routines (try #2)

2011-04-05 Thread Jeff Layton
in the string. Reported-and-acked-by: David Howells dhowe...@redhat.com Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifs_unicode.c | 35 +-- fs/cifs/cifs_unicode.h |2 +- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/fs/cifs

Re: [PATCH] mount.cifs: only convert '\' to '/' for dev_name

2011-04-05 Thread Jeff Layton
'\\' sanely in /proc/mounts is a separate (but related) issue, but passing in the raw devname directly is the most future-proof solution and shouldn't make the current situation any worse. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs

Re: Repeatable crash in 2.6.38 related to O_DIRECT

2011-04-05 Thread Jeff Layton
. -- Jeff Layton jlay...@redhat.com From 0f1c5ffdb246b3166a9040dfc10a59eddfdd9828 Mon Sep 17 00:00:00 2001 From: Jeff Layton jlay...@redhat.com Date: Tue, 5 Apr 2011 16:23:47 -0700 Subject: [PATCH] cifs: check for private_data before trying to put it cifs_close doesn't check that the filp-private_data

Re: Repeatable crash in 2.6.38 related to O_DIRECT

2011-04-05 Thread Jeff Layton
On Tue, 05 Apr 2011 16:34:17 -0700 Ben Greear gree...@candelatech.com wrote: On 04/05/2011 04:26 PM, Jeff Layton wrote: Does the attached patch fix it? It's probably stable material if so... I'll test your patch. I verified that cifs_file is NULL in cifsFileInfo_put and protecting

Re: [PATCH v4 2/6] cifs: Add support for mounting Windows 2008 DFS shares

2011-04-07 Thread Jeff Layton
when we have a valid tcon */ 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/majordomo-info.html

Re: [PATCH] CIFS: Assume passwords are encoded according to iocharset

2011-04-08 Thread Jeff Layton
; -- 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 -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] cifs: Fix extended security auth failure

2011-04-08 Thread Jeff Layton
= -EOPNOTSUPP; } + } else if (server-sec_mode SECMODE_PW_ENCRYPT) { + rc = -EIO; /* no crypt key only if plain text pwd */ + goto neg_err_exit; } else server-capabilities = ~CAP_EXTENDED_SECURITY; -- Jeff Layton jlay

Re: [PATCH] CIFS: Add shared superblock capability

2011-04-08 Thread Jeff Layton
*/ - cleanup_volume_info(volume_info); FreeXid(xid); return rc; } @@ -3338,7 +3467,7 @@ out: return tcon; } -static inline struct tcon_link * +inline struct tcon_link * cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb) { return cifs_sb-master_tlink; -- Jeff Layton

Re: [PATCH v4 3/6] cifs: cifs_parse_mount_options: do not tokenize mount options in-place

2011-04-08 Thread Jeff Layton
by not saving the iocharset and just setting the nls struct in here instead, but that's a minor nit and could be fixed up later. Reviwed-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

Re: [PATCH v4 4/6] cifs: Simplify handling of submount options in cifs_mount.

2011-04-08 Thread Jeff Layton
so we can not end */ /* up accidently freeing someone elses tcon struct */ if (tcon) 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

Re: [PATCH v4 5/6] cifs: Use kstrndup for cifs_sb-mountdata

2011-04-08 Thread Jeff Layton
are equivalent currently, but that might not be the case in the future. It might not hurt to change that in these patches though if you're respinning them anyway. Either way, you can add my: Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH v4 6/6] cifs: Unconditionally copy mount options to superblock info

2011-04-08 Thread Jeff Layton
, volume_info)) { + if (cifs_parse_mount_options(cifs_sb-mountdata, devname, + volume_info)) { rc = -EINVAL; goto out; } Nice cleanup. Always nice to get rid of nasty #ifdef-ery: Reviewed-by: Jeff Layton jlay...@redhat.com

Re: [PATCH] CIFS: Assume passwords are encoded according to iocharset

2011-04-08 Thread Jeff Layton
On Fri, 8 Apr 2011 16:11:12 +0200 Oskar Liljeblad os...@osk.mine.nu wrote: On Friday, April 08, 2011 at 09:48, Jeff Layton wrote: On Sun, 27 Mar 2011 14:56:48 +0200 Oskar Liljeblad os...@osk.mine.nu wrote: Modify cifs to assume that the supplied password is encoded according

Re: [PATCH 3/3] CIFS: Migrate to shared superblock model

2011-04-10 Thread Jeff Layton
...and... //server/share/foo/bar ...shouldn't the inodes for files/directories accessable via both mounts be shared in that case? -- 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

Re: [PATCH] CIFS: Assume passwords are encoded according to iocharset

2011-04-11 Thread Jeff Layton
: %d, __func__, rc);                return rc; With this patch, I am unable to mount a share if user's password happens to contain characters like $ e.g. aa$a. A Windows client can. If you compare traces in wireshark, are there differences in how the username is encoded? -- Jeff Layton

Re: [PATCH 4/5] cifs: add cifs_async_writev

2011-04-12 Thread Jeff Layton
On Tue, 12 Apr 2011 13:43:07 +0400 Pavel Shilovsky piastr...@gmail.com wrote: 2011/4/2 Jeff Layton jlay...@redhat.com: Add the ability for CIFS to do an asynchronous write. The kernel will set the frame up as it would for a normal SMBWrite2 request, and use cifs_call_async to send

Re: [PATCH 5/5] cifs: convert cifs_writepages to use async writes

2011-04-12 Thread Jeff Layton
On Tue, 12 Apr 2011 14:07:04 +0400 Pavel Shilovsky piastr...@gmail.com wrote: 2011/4/2 Jeff Layton jlay...@redhat.com: Have cifs_writepages issue asynchronous writes instead of waiting on each write call to complete before issuing another. This also allows us to return more quickly from

[PATCH] cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3)

2011-04-12 Thread Jeff Layton
until the write call has completed. With this, we can also remove the sign_zero_copy module option and always inline the pages when writing. Signed-off-by: Jeff Layton jlay...@redhat.com Signed-off-by: Steve French sfre...@us.ibm.com --- fs/cifs/cifsfs.c |4 --- fs/cifs/cifsglob.h |1

Re: shrinking set of cifs fixes to merge for 2.6.39 to small set

2011-04-12 Thread Jeff Layton
On Tue, 12 Apr 2011 07:30:14 -0500 Steve French smfre...@gmail.com wrote: On Tue, Apr 12, 2011 at 6:51 AM, Jeff Layton jlay...@redhat.com wrote: On Mon, 11 Apr 2011 20:33:42 -0500 Steve French smfre...@gmail.com wrote: Since it is already past the merge window (was waiting to discuss

Re: [PATCH 2/2] CIFS: Simplify invalidate part

2011-04-12 Thread Jeff Layton
CIFS_MOUNT_OVERR_GID)) + stat-gid = current_fsgid(); + } + return rc; } static int cifs_truncate_page(struct address_space *mapping, loff_t from) -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body

Re: [PATCH] CIFS: Add wine mount option (try #2)

2011-04-12 Thread Jeff Layton
in the future? Would it make more sense to have one mount option that enables this new mode of PID handling, and keep forcemand and strictcache separate? -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord

[PATCH 0/7] cifs: asynchronous writepages support (try #2)

2011-04-13 Thread Jeff Layton
a 20% increase in sequential write performance. Not sure if that will hold now that we're respecting the max_pending value. Review and test feedback would be welcome. Jeff Layton (7): cifs: consolidate SendReceive response checks cifs: make cifs_send_async take a kvec array cifs: don't call

[PATCH 1/7] cifs: consolidate SendReceive response checks

2011-04-13 Thread Jeff Layton
. Reviewed-by: Pavel Shilovsky pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h |4 +- fs/cifs/netmisc.c |2 +- fs/cifs/transport.c | 158 ++- 3 files changed, 46 insertions(+), 118 deletions(-) diff --git

[PATCH 2/7] cifs: make cifs_send_async take a kvec array

2011-04-13 Thread Jeff Layton
We'll need this for async writes, so convert the call to take a kvec array. CIFSSMBEcho is changed to put a kvec on the stack and pass in the SMB buffer using that. Reviewed-by: Pavel Shilovsky pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h |4

[PATCH 3/7] cifs: don't call mid_q_entry-callback under the Global_MidLock

2011-04-13 Thread Jeff Layton
pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |7 +++ fs/cifs/connect.c | 32 +--- fs/cifs/smb2transport.c | 14 -- fs/cifs/transport.c | 23 --- 4 files changed, 40

[PATCH 4/7] cifs: add ignore_pend flag to cifs_call_async

2011-04-13 Thread Jeff Layton
The current code always ignores the max_pending limit. Have it instead only optionally ignore the pending limit. For CIFSSMBEcho, we need to ignore it to make sure they always can go out. For async reads, writes and potentially other calls, we need to respect it. Signed-off-by: Jeff Layton jlay

[PATCH 5/7] cifs: add cifs_async_writev

2011-04-13 Thread Jeff Layton
-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h | 20 + fs/cifs/cifssmb.c | 212 +++ 2 files changed, 232 insertions(+), 0 deletions(-) diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index c621b45..37e8c35 100644 --- a/fs/cifs

[PATCH 6/7] cifs: convert cifs_writepages to use async writes

2011-04-13 Thread Jeff Layton
lock until the response is received, release it after doing the send. This will reduce contention for the page lock and should prevent processes that have the file mmap'ed from being blocked unnecessarily. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/file.c | 292

[PATCH 7/7] cifs: clean up wsize negotiation and allow for larger wsize

2011-04-13 Thread Jeff Layton
. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 62 +++- 1 files changed, 42 insertions(+), 20 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8f737d2..dc4de86 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs

Re: [PATCH 7/7] cifs: clean up wsize negotiation and allow for larger wsize

2011-04-13 Thread Jeff Layton
On Wed, 13 Apr 2011 07:43:14 -0400 Jeff Layton jlay...@redhat.com wrote: Now that we can handle larger wsizes in writepages, fix up the negotiation of the wsize to allow for that. Make the code default to a wsize of (128k - PAGE_CACHE_SIZE). That gives us a size that goes up to the max frame

Re: [PATCH 2/3] cifs: Invoke id mapping functions (try #14)

2011-04-13 Thread Jeff Layton
cifs_sid *); extern int compare_sids(const struct cifs_sid *, const struct cifs_sid *); By Jove, I think he's got it... 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

Re: [PATCH 2/3] cifs: Invoke id mapping functions (try #14)

2011-04-13 Thread Jeff Layton
On Wed, 13 Apr 2011 15:59:55 -0400 Jeff Layton jlay...@redhat.com wrote: On Fri, 8 Apr 2011 20:20:15 -0500 shirishpargaon...@gmail.com wrote: From: Shirish Pargaonkar shirishpargaon...@gmail.com --- fs/cifs/cifsacl.c | 304

Re: [PATCH 4/5] cifs: add cifs_async_writev

2011-04-15 Thread Jeff Layton
without CONFIG_CIFS_STATS. Ahh yeah, that function gets compiled out to nothing when CONFIG_CIFS_STATS isn't set. I guess I can get rid of the separate tcon stack var and just inline the tlink_tcon call there. I'll fix it in my next set. Thanks. -- Jeff Layton jlay...@redhat.com

[PATCH] mount.cifs: fix test for strtoul failure in mount.cifs

2011-04-15 Thread Jeff Layton
warning about cruid being uninitialized. Signed-off-by: Jeff Layton jlay...@samba.org --- mount.cifs.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mount.cifs.c b/mount.cifs.c index 29b0d4c..9d7e107 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -861,7 +861,7

Re: [PATCH] CIFS: Fix memory over bound bug in cifs_parse_mount_options

2011-04-15 Thread Jeff Layton
])) { /* reinsert comma */ value[temp_len] = separator[0]; Ok, looks plausible. This code to parse out the password really makes me want to vomit though. It would be nice to clean that up. Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send

Re: mids and cifs sendrcv2

2011-04-15 Thread Jeff Layton
;/* both received */ }; Using different structs here means that you need an entirely different set of code to deal with them. IMO, the memory savings (if any) isn't worth the duplicate code that'll be necessary. -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line

Re: [PATCH] mount.cifs: fix test for strtoul failure in mount.cifs

2011-04-18 Thread Jeff Layton
On Fri, 15 Apr 2011 07:25:53 -0400 Jeff Layton jlay...@samba.org wrote: It currently test to see if errno == -EINVAL and whether the endptr is '\0'. That's not correct however. What we really want it to do is check to see if any error occurred by setting errno to 0 before the conversion

Re: [PATCH] cifs: Fix extended security auth failure

2011-04-18 Thread Jeff Layton
On Mon, 18 Apr 2011 07:16:36 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Fri, Apr 8, 2011 at 8:49 AM, Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Fri, Apr 8, 2011 at 8:40 AM, Jeff Layton jlay...@poochiereds.net wrote: On Wed,  6 Apr 2011 08:46:06 -0500

Re: [PATCH 2/2] cifs: Invoke id mapping functions (try #15)

2011-04-18 Thread Jeff Layton
these values be based on HZ too? You're making an assumption about the jiffies per second here, right? -- 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: [PATCH] cifs: guard against entries being deleted from open file list

2011-04-18 Thread Jeff Layton
think this patch will probably just trade one set of problems for another. I think the real fix is overhauling how all of the reopen_file stuff works, but fixing it looks anything but straightforward. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] cifs: guard against entries being deleted from open file list

2011-04-19 Thread Jeff Layton
On Mon, 18 Apr 2011 22:02:21 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:50 AM, Jeff Layton jlay...@samba.org wrote: On Mon, 18 Apr 2011 08:44:35 -0500 shirishpargaon...@gmail.com wrote: From: Shirish Pargaonkar shirishpargaon...@gmail.com

Re: [PATCH 2/2] cifs: Invoke id mapping functions (try #16)

2011-04-20 Thread Jeff Layton
long time; + unsigned long retry; Why, exactly do we need time and retry? Wouldn't one timestamp field do here? + unsigned long state; + char *sidstr; + struct rb_node rbnode; + struct cifs_sid sid; +}; + -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from

Re: [PATCH 2/2] cifs: Invoke id mapping functions (try #16)

2011-04-20 Thread Jeff Layton
On Wed, 20 Apr 2011 12:27:31 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Wed, Apr 20, 2011 at 12:07 PM, Jeff Layton jlay...@poochiereds.net wrote: On Tue, 19 Apr 2011 08:21:09 -0500 shirishpargaon...@gmail.com wrote: From: Shirish Pargaonkar shirishpargaon...@gmail.com

Re: mids and cifs sendrcv2

2011-04-22 Thread Jeff Layton
by the protocol. Once a socket has had a NEGOTIATE done on it, you can't go back and re-do another one. -- 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: [PATCH 2/2] cifs: Invoke id mapping functions (try #17)

2011-04-22 Thread Jeff Layton
*/ + extern int match_sid(struct cifs_sid *); extern int compare_sids(const struct cifs_sid *, const struct cifs_sid *); -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org

Re: [PATCH 2/2] CIFS: Simplify invalidate part (try #2)

2011-04-22 Thread Jeff Layton
be bogus. -- 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 2/2] CIFS: Simplify invalidate part (try #2)

2011-04-22 Thread Jeff Layton
is retryable. -- 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 2/2] CIFS: Simplify invalidate part (try #2)

2011-04-22 Thread Jeff Layton
On Fri, 22 Apr 2011 09:02:18 -0500 Steve French smfre...@gmail.com wrote: On Fri, Apr 22, 2011 at 6:50 AM, Jeff Layton jlay...@redhat.com wrote: On Fri, 22 Apr 2011 12:09:20 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: After conversation with Steve, we decided to drop

Re: [PATCH 2/2] CIFS: Simplify invalidate part (try #2)

2011-04-22 Thread Jeff Layton
On Fri, 22 Apr 2011 09:54:10 -0500 Steve French smfre...@gmail.com wrote: On Fri, Apr 22, 2011 at 9:10 AM, Jeff Layton jlay...@redhat.com wrote: On Fri, 22 Apr 2011 09:02:18 -0500 Steve French smfre...@gmail.com wrote: On Fri, Apr 22, 2011 at 6:50 AM, Jeff Layton jlay...@redhat.com wrote

Re: [PATCH 2/2] CIFS: Simplify invalidate part (try #2)

2011-04-22 Thread Jeff Layton
On Fri, 22 Apr 2011 23:02:00 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: 2011/4/22 Jeff Layton jlay...@redhat.com: Used to be synchronous. One of the goals of the async write patchset I'm working on is to change that. In this case, what do you think about to call filemap_fdatawait

Re: [PATCH] CIFS: Simplify invalidate part (try #5)

2011-04-25 Thread Jeff Layton
cifs_truncate_page(struct address_space *mapping, loff_t from) Looks good to me. Reviewed-by: 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-utils: Handle cifs_idmap type of key to map a SID to either an uid or gid (try #17)

2011-04-25 Thread Jeff Layton
); + goto out; + } + have = decode_key_description(buf, arg); SAFE_FREE(buf); if ((have DKD_MUSTHAVE_SET) != DKD_MUSTHAVE_SET) { -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord

[PATCH 1/5] cifs: change bleft in decode_unicode_ssetup back to signed type

2011-04-26 Thread Jeff Layton
check could potentially lead to a buffer overrun since it increments bleft without checking to see whether it falls off the end of the buffer. Cc: sta...@kernel.org Reported-by: David Howells dhowe...@redhat.com Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/sess.c | 15

[PATCH 3/5] cifs: sanitize length checking in coalesce_t2

2011-04-26 Thread Jeff Layton
of the field sizes to 32 bits to ensure that they don't wrap without being detected. Cc: sta...@kernel.org Reported-by: David Howells dhowe...@redhat.com Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions

Re: [PATCH 3/5] cifs: sanitize length checking in coalesce_t2

2011-04-26 Thread Jeff Layton
On Tue, 26 Apr 2011 15:27:32 +0100 David Howells dhowe...@redhat.com wrote: Jeff Layton jlay...@redhat.com wrote: - __u16 byte_count, total_data_size, total_in_buf, total_in_buf2; + unsigned int byte_count, total_in_buf; + __u16 total_data_size, total_in_buf2; There's

[PATCH 3/5] cifs: sanitize length checking in coalesce_t2 (try #2)

2011-04-27 Thread Jeff Layton
stack variables to 32 bits to ensure that they don't wrap without being detected. Finally, change the error codes to be a bit more descriptive of any problems detected. -EINVAL isn't very accurate. Cc: sta...@kernel.org Reported-by: David Howells dhowe...@redhat.com Signed-off-by: Jeff Layton jlay

Re: [PATCH] cifs: Don't offer NFS export in Kconfig if nfsd is not enabled

2011-04-27 Thread Jeff Layton
way to look up inodes by filehandle and so it simply can never work. Acked-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/majordomo

Re: [PATCH 0/5] cifs: fix some bounds checking problems

2011-04-27 Thread Jeff Layton
for 2.6.39? -- 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: fix some bounds checking problems

2011-04-27 Thread Jeff Layton
On Wed, 27 Apr 2011 10:07:18 -0500 Steve French smfre...@gmail.com wrote: On Wed, Apr 27, 2011 at 10:06 AM, Steve French smfre...@gmail.com wrote: On Wed, Apr 27, 2011 at 10:04 AM, Jeff Layton jlay...@samba.org wrote: On Wed, 27 Apr 2011 09:59:52 -0500 Steve French smfre...@gmail.com wrote

Re: [PATCH 0/5] cifs: fix some bounds checking problems

2011-04-29 Thread Jeff Layton
: check for bytes_remaining going to zero in CIFS_SessSetup cifs: sanitize length checking in coalesce_t2 That would be because I'm an idiot and pushed the branch to my tree w/o stg pushing the last two patches onto the stack. They're there now. Sorry about that... -- Jeff Layton jlay

Re: CIFS Not Responding Error On Working System

2011-04-29 Thread Jeff Layton
/majordomo-info.html May be some issues like firewall etc.? Can you capture wireshark traces on either side and see if you see any network in response to a mount reuqest from a cifs client? To be clear... What sort of host is peart here? WinXP? -- Jeff Layton jlay...@samba.org -- To unsubscribe

Re: [PATCH 2/2] CIFS: Add rwpidforward mount option

2011-04-29 Thread Jeff Layton
semantics when locking unix applications, right? IOW, you'd be less likely to block in a read or write operation. Can you give an example of some use case that would break if you were to do this unconditionally? -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from this list: send the line

[PATCH] cifs: keep BCC in little-endian format (try #2)

2011-04-29 Thread Jeff Layton
from the accessor functions since that's now implied. While we're at it, switch all of the places that read the ByteCount directly to use the get_bcc inline which should also clean up some unaligned accesses. Signed-off-by: Jeff Layton jlay...@redhat.com Signed-off-by: Steve French sfre

Re: [PATCH 3/4] CIFS: Migrate from prefixpath logic

2011-04-29 Thread Jeff Layton
(inode, full_path, NULL, sb, xid, + NULL); if (!inode) { inode = ERR_PTR(rc); -- 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

Re: CIFS Not Responding Error On Working System

2011-04-29 Thread Jeff Layton
On Fri, 29 Apr 2011 08:06:49 -0700 Mike Dillinger mi...@softtalker.com wrote: On 04/29/11 06:32 AM, Jeff Layton wrote: On Fri, 29 Apr 2011 07:13:05 -0500 Shirish Pargaonkarshirishpargaon...@gmail.com wrote: On Thu, Apr 28, 2011 at 2:27 PM, Mikemi...@softtalker.com wrote

Re: [PATCH] cifs-utils: Handle cifs_idmap type of key to map a SID to either an uid or gid (try #17 repost)

2011-05-02 Thread Jeff Layton
needed libs aren't present. -- 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 2/2] CIFS: Add rwpidforward mount option

2011-05-02 Thread Jeff Layton
On Fri, 29 Apr 2011 18:41:54 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: 2011/4/29 Jeff Layton jlay...@poochiereds.net: On Thu, 21 Apr 2011 17:26:35 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: Add rwpidforward mount option that switches on a mode when we forward pid

Re: [PATCH 2/2] CIFS: Add rwpidforward mount option

2011-05-02 Thread Jeff Layton
On Mon, 2 May 2011 08:13:35 -0400 Jeff Layton jlay...@samba.org wrote: On Fri, 29 Apr 2011 18:41:54 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: 2011/4/29 Jeff Layton jlay...@poochiereds.net: On Thu, 21 Apr 2011 17:26:35 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: Add

Re: [PATCH 2/4] CIFS: Simplify mount code for further shared sb capability

2011-05-02 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

[PATCH 0/8] cifs: asynchronous writepages support (try #3)

2011-05-02 Thread Jeff Layton
seems to be a bit out of date though, so once it has been updated, I'll rebase this again to fix up the merge conflicts. Review and test feedback would be welcome. Jeff Layton (8): cifs: consolidate SendReceive response checks cifs: make cifs_send_async take a kvec array cifs: don't call

[PATCH 1/8] cifs: consolidate SendReceive response checks

2011-05-02 Thread Jeff Layton
. Reviewed-by: Pavel Shilovsky pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h |4 +- fs/cifs/netmisc.c |2 +- fs/cifs/transport.c | 158 ++- 3 files changed, 46 insertions(+), 118 deletions(-) diff --git

[PATCH 2/8] cifs: make cifs_send_async take a kvec array

2011-05-02 Thread Jeff Layton
We'll need this for async writes, so convert the call to take a kvec array. CIFSSMBEcho is changed to put a kvec on the stack and pass in the SMB buffer using that. Reviewed-by: Pavel Shilovsky pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h |4

[PATCH 3/8] cifs: don't call mid_q_entry-callback under the Global_MidLock

2011-05-02 Thread Jeff Layton
pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |7 +++ fs/cifs/connect.c | 30 -- fs/cifs/smb2transport.c | 14 -- fs/cifs/transport.c | 23 --- 4 files changed, 39

[PATCH 4/8] cifs: add ignore_pend flag to cifs_call_async

2011-05-02 Thread Jeff Layton
The current code always ignores the max_pending limit. Have it instead only optionally ignore the pending limit. For CIFSSMBEcho, we need to ignore it to make sure they always can go out. For async reads, writes and potentially other calls, we need to respect it. Signed-off-by: Jeff Layton jlay

[PATCH 5/8] cifs: add cifs_async_writev

2011-05-02 Thread Jeff Layton
-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h | 18 fs/cifs/cifssmb.c | 238 +++ 2 files changed, 256 insertions(+), 0 deletions(-) diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index c621b45..d35019b 100644 --- a/fs/cifs

[PATCH 6/8] cifs: convert cifs_writepages to use async writes

2011-05-02 Thread Jeff Layton
and should prevent processes that have the file mmap'ed from being blocked unnecessarily. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/file.c | 224 --- 1 files changed, 82 insertions(+), 142 deletions(-) diff --git a/fs/cifs/file.c b/fs

[PATCH 7/8] cifs: clean up wsize negotiation and allow for larger wsize

2011-05-02 Thread Jeff Layton
. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/connect.c | 60 +++- 1 files changed, 40 insertions(+), 20 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4667cfa..b5e4b75 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs

[PATCH 8/8] cifs: use the server's MaxMpxCount to determine max requests in flight

2011-05-02 Thread Jeff Layton
-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsfs.c| 12 fs/cifs/cifsglob.h | 14 +- fs/cifs/connect.c |5 +++-- fs/cifs/transport.c |6 +++--- 4 files changed, 7 insertions(+), 30 deletions(-) diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index fb6a2ad

Re: [PATCH 5/8] cifs: add cifs_async_writev

2011-05-02 Thread Jeff Layton
On Mon, 2 May 2011 10:04:26 -0400 Jeff Layton jlay...@redhat.com wrote: Add the ability for CIFS to do an asynchronous write. The kernel will set the frame up as it would for a normal SMBWrite2 request, and use cifs_call_async to send it. The mid callback will then be configured to handle

Re: [PATCH 4/5] cifs: refactor mid finding loop in cifs_demultiplex_thread

2011-05-03 Thread Jeff Layton
? I have some patches that are based on that branch that will probably need to be respun now... -- 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: [PATCH 8/8] cifs: use the server's MaxMpxCount to determine max requests in flight

2011-05-04 Thread Jeff Layton
On Wed, 4 May 2011 14:38:07 +0400 Pavel Shilovsky piastr...@gmail.com wrote: 2011/5/2 Jeff Layton jlay...@redhat.com: Currently, we have a default cap of 50 outstanding requests and a hard cap of 256. However, the server sends us how many requests it can handle simultaneously via

Re: [PATCH] cifs: keep BCC in little-endian format (try #2)

2011-05-04 Thread Jeff Layton
On Wed, 4 May 2011 09:11:15 +0400 Pavel Shilovsky piastr...@gmail.com wrote: 2011/4/29 Jeff Layton jlay...@redhat.com: This is the same patch as originally posted, just with some merge conflicts fixed up for some patches that went late into 2.6.39. Currently, the ByteCount is usually

[PATCH] cifs: keep BCC in little-endian format

2011-05-04 Thread Jeff Layton
implied. While we're at it, switch all of the places that read the ByteCount directly to use the get_bcc inline which should also clean up some unaligned accesses. Signed-off-by: Jeff Layton jlay...@redhat.com Signed-off-by: Steve French sfre...@us.ibm.com --- fs/cifs/cifs_debug.c |2 +- fs

[PATCH] cifs: fix some unused variable warnings in id_rb_search

2011-05-04 Thread Jeff Layton
Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsacl.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index a4aa0f0..bfb5ba5 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -211,19 +211,14 @@ id_rb_search(struct

Re: [PATCH] cifs: Change key name to cifs.idmap, misc. clean-up

2011-05-16 Thread Jeff Layton
exit_cifs_idmap(); +out_register_key_type: #endif #ifdef CONFIG_CIFS_UPCALL unregister_key_type(cifs_spnego_key_type); +out_destroy_request_bufs: #endif cifs_destroy_request_bufs(); out_destroy_mids: Looks fine. Reviewed-by: Jeff Layton jlay...@redhat.com -- To unsubscribe

[PATCH] cifs: add fallback in is_path_accessible for old servers

2011-05-17 Thread Jeff Layton
The is_path_accessible check uses a QPathInfo call, which isn't supported by ancient win9x era servers. Fall back to an older SMBQueryInfo call if it fails with the magic error codes. Cc: sta...@kernel.org Reported-and-Tested-by: Sandro Bonazzola sandro.bonazz...@gmail.com Signed-off-by: Jeff

[PATCH] cifs: fix cifsConvertToUCS() for the mapchars case

2011-05-17 Thread Jeff Layton
fix it. Cc: sta...@kernel.org # .38.x: 581ade4: cifs: clean up various nits in unicode routines (try #2) Reported-by: Stefan Metzmacher me...@samba.org Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifs_unicode.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions

Re: [PATCH] cifs-utils: Create new binary cifs.idmap for sid to uid/gid mapping

2011-05-18 Thread Jeff Layton
On Tue, 17 May 2011 21:06:53 -0500 Shirish Pargaonkar shirishpargaon...@gmail.com wrote: On Tue, May 17, 2011 at 11:09 AM, Jeff Layton jlay...@redhat.com wrote: On Fri,  6 May 2011 02:33:59 -0500 shirishpargaon...@gmail.com wrote: From: Shirish Pargaonkar shirishpargaon...@gmail.com

Re: [PATCH] CIFS: Simplify invalidate part (try #5)

2011-05-19 Thread Jeff Layton
) 'bigfile' has size -2130066000, should be 1048576 basic tests failed Pavel, can you track this down? Steve, in the meantime I suggest that this patch not be pushed when the merge window opens. -- Jeff Layton jlay...@redhat.com -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH] CIFS: Simplify invalidate part (try #5)

2011-05-19 Thread Jeff Layton
On Thu, 19 May 2011 14:01:32 -0400 Jeff Layton jlay...@redhat.com wrote: On Sat, 23 Apr 2011 17:30:17 +0400 Pavel Shilovsky pias...@etersoft.ru wrote: Simplify many places when we call cifs_revalidate/invalidate to make it do what it exactly needs. Signed-off-by: Pavel Shilovsky pias

[PATCH 1/7] cifs: consolidate SendReceive response checks

2011-05-19 Thread Jeff Layton
. Reviewed-by: Pavel Shilovsky pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h |4 +- fs/cifs/netmisc.c |2 +- fs/cifs/transport.c | 157 +- 3 files changed, 45 insertions(+), 118 deletions(-) diff --git

[PATCH 3/7] cifs: don't call mid_q_entry-callback under the Global_MidLock

2011-05-19 Thread Jeff Layton
pias...@etersoft.ru Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsglob.h |6 +++--- fs/cifs/connect.c | 30 -- fs/cifs/transport.c | 23 --- 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/fs/cifs/cifsglob.h

[PATCH 5/7] cifs: add cifs_async_writev

2011-05-19 Thread Jeff Layton
-by: Jeff Layton jlay...@redhat.com --- fs/cifs/cifsproto.h | 18 fs/cifs/cifssmb.c | 236 +++ 2 files changed, 254 insertions(+), 0 deletions(-) diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 6931631..41db348 100644 --- a/fs/cifs

[PATCH 4/7] cifs: add ignore_pend flag to cifs_call_async

2011-05-19 Thread Jeff Layton
The current code always ignores the max_pending limit. Have it instead only optionally ignore the pending limit. For CIFSSMBEcho, we need to ignore it to make sure they always can go out. For async reads, writes and potentially other calls, we need to respect it. Signed-off-by: Jeff Layton jlay

<    2   3   4   5   6   7   8   9   10   11   >