Bug 172194

Summary: Missing files when listing an NT4 share
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: jbaron, staubach, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-05 17:27:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 430698    
Attachments:
Description Flags
linux-2.6.9-smbfs-wrong-packet-size.patch none

Description Bastien Nocera 2005-11-01 14:22:38 UTC
Using smbfs on a 2.6.9-11.EL kernel, with the server being a Win2k, Win2k3,
Win9x, NT4 or Samba3, when listing a directory with a large number of files, and
some long names, some files end up missing in the listing.

From the comments in RHEL4's linux-2.6.9/fs/smbfs/request.c:
        /*
         * max parameters + max data + max setup == bufsize to make NT4 happy
         * and not abort the transfer or split into multiple responses. It also
         * makes smbfs happy as handling packets larger than the buffer size
         * is extra work.
         *
         * OS/2 is probably going to hate me for this ...
         */

So:
max data = bufsize - max parameters - max setup
which means:
mdata = req->rq_bufsize - SMB_TRANS2_MAX_PARAM - server->opt.max_xmit - 100; /*
the -100 being to make OS/2 happy, apparently */

The current code doesn't do that...

Comment 1 Bastien Nocera 2005-11-01 14:22:39 UTC
Created attachment 120601 [details]
linux-2.6.9-smbfs-wrong-packet-size.patch

Comment 4 Bastien Nocera 2005-12-01 11:51:43 UTC
Adding a blocker. Work will be done on the RHEL3 version.

Comment 7 Bastien Nocera 2006-05-10 14:23:40 UTC
Comment on attachment 120601 [details]
linux-2.6.9-smbfs-wrong-packet-size.patch

Patch is broken.

Comment 10 RHEL Program Management 2007-05-09 11:09:49 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Jeff Layton 2007-06-07 15:53:50 UTC
I've not been able to reproduce this problem at all with a client running my
current peoplepage kernels. I've tried samba 3.0.25 (running on f7 and fc6), and
a win2k server. I've also tried having the script create varying amounts of
files (700, 900, 1000, and 7000). I always seem to get the correct number of
files returned.

Can you verify whether this bug is already fixed in 4.5 kernels and/or the
kernels on my peoplepage:

http://people.redhat.com/jlayton


Comment 12 RHEL Program Management 2007-09-07 19:46:57 UTC
This request was previously evaluated by Red Hat Product Management
for inclusion in the current Red Hat Enterprise Linux release, but
Red Hat was unable to resolve it in time.  This request will be
reviewed for a future Red Hat Enterprise Linux release.

Comment 14 Jeff Layton 2007-12-05 17:27:58 UTC
Closing this BZ since there's been no activity on it for a long time and the IT
associated with it has closed. Please reopen if this is still an issue.