kern/78953: [smbfs] [patch] smbfs getdirentries() failure causes CVS to fail

Antony Mawer fbsd at mawer.org
Wed Nov 15 07:50:07 UTC 2006


The following reply was made to PR kern/78953; it has been noted by GNATS.

From: Antony Mawer <fbsd at mawer.org>
To: bug-followup at FreeBSD.org,  zmetzing at warthog.com
Cc: jim at carroll.com,  linimon at freebsd.org,  bp at freebsd.org, 
 tjr at freebsd.org
Subject: Re: kern/78953: [smbfs] [patch] smbfs getdirentries() failure causes
 CVS to fail
Date: Wed, 15 Nov 2006 18:47:13 +1100

 (CC'ing people in the PR, and a few others who have had to do with 
 smbfs, in the hope of getting this committed...)
 
 Following up on this, I've finally gotten around to testing the patch by 
 Jim Carroll. I ran a simple rsync with before and after the patch, with 
 the results being what I would expect (slightly anonymised).
 
 First, the run with a 6.2-PRERELEASE as of about a week ago, showing the 
 Bad file descriptor errors that were previously being seen:
 
 > [root at hostname] ~$ mount /media/smb1
 > [root at hostname] ~$ rsync -a --dry-run /media/smb1/ /tmp
 > rsync: readdir("/media/smb1/Profiles/USER1/Application Data/Microsoft/MSN Messenger/0123456789"): Bad file descriptor (9)
 > rsync: readdir("/media/smb1/Profiles/USER2/Application Data/Macromedia/Dreamweaver 8/Configuration/Temp/FlashElements/ImageViewer"): Bad file descriptor (9)
 > rsync: readdir("/media/smb1/Profiles/USER3/Desktop/docs"): Bad file descriptor (9)
 > rsync: readdir("/media/smb1/Programs/Programming/SDK"): Bad file descriptor (9)
 > rsync: readdir("/media/smb1/Users/USER1/packages"): Bad file descriptor (9)
 > rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
 > [root at hostname] ~$
 
 
 The next run is after patching sys/fs/smbfs/smbfs_smb.c with Jim's 
 patch, and then rebuilding/reinstalling the kernel and rebooting:
 
 > [root at hostname] ~$ rsync -a --dry-run /media/smb1/ /tmp
 > [root at hostname] ~$
 
 I also did a comparison of the file & directory listing both before and 
 after the patching process, by doing a:
 
      rsync -av --dry-run /media/smb1 /tmp > (before|after)-patch.txt
 
 Comparing the output of these two, the only difference was in the 
 overall size, as a result of a file being updated on the server in 
 between the two rsync ouputs:
 
 [root at hostname] ~$ diff -u2 before-patch.txt after-patch.txt
 --- before-patch.txt    Wed Nov 15 18:40:03 2006
 +++ after-patch.txt     Wed Nov 15 18:25:23 2006
 @@ -136903,3 +136903,3 @@
 
   sent 3505335 bytes  received 821426 bytes  163274.00 bytes/sec
 -total size is 80453796677  speedup is 18594.46
 +total size is 80453796144  speedup is 18594.46
 
 So I'm satisfied that the behaviour of smbfs is not at all impacted in 
 any way, aside from resolving the error message that was being generated.
 
 If anyone requires any further tests, please let me know - otherwise it 
 seems that this looks like a fix that should be committed. It's already 
 gone into NetBSD 4.x, as Jim mentioned. Anyone willing to commit this...?
 
 Cheers
 Antony


More information about the freebsd-bugs mailing list