Date: Sat, 18 Dec 2010 21:00:05 -0500 (EST) From: Rick Macklem <rmacklem@uoguelph.ca> To: Attila Nagy <bra@fsn.hu> Cc: freebsd-fs@freebsd.org, pjd@freebsd.org Subject: Re: NFS problem: file doesn't appear in file listing, but can be accessed directly Message-ID: <2015693782.1796244.1292724005362.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4C614A7D.8030509@fsn.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_1796243_680256509.1292724005361 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > On 08/08/2010 02:06 AM, Rick Macklem wrote: > >> On 07.08.2010, at 02:35, Rick Macklem wrote: > >> > >> I agree, this must be some kind of server issue then. Still, I > >> wonder > >> why the solaris client didn't show the problem... > >> > >> > > 2 things: > > 1 - the solaris client uses ReaddirPlus and not Readdir RPCs by > > default (I can't remember if that default can be overridden?). > I don't know whether this counts or not, but I've tried with an old > Solaris (x86) 8 (uname says it's Generic_108529-06). > > > ps: I don't recall the previous emails mentioning that the "ls" > > was ok for a solaris client. > > > It was in 4C582968.9000303@fsn.hu: > "I've mounted the share from an old Solaris box, which sees the file." > > This means, when I issue an ls | grep problematic_fname, I can see the > filename. > BTW, this turned out to be incorrect, because I've tested with the > same > (one of the missing) filename. > Doing a find . in the directory on both FreeBSD and Solaris client > shows > some differences. > So what I have now is: both the normal and the experimental NFSD show > the problem on both FreeBSD and Solaris clients (only the missing file > names are different). > > On Solaris there are 78 files missing, on FreeBSD there are 193, I > haven't checked that they are persistent across reboots or not. pjd@ just found a problem which affects both the regular and experimental NFS servers when exporting a ZFS volume. (Basically there is a hack in the servers that is needed for UFS, which breaks serving ZFS. If you look in sys/nfs_serv.c and search for "FreeBSD ufs_readdir" in a comment in nfs_readdir() you can read about it. ZFS doesn't generate monotonically increasing directory offset cookies.) If you were using ZFS for the above, please let me know. Also, if you can still reproduce the problem and are exporting ZFS and not UFS, you could test the attached patch (be forwarned that it will break exporting of UFS!!). And, if you get to test this patch, please let me know how it goes. rick ------=_Part_1796243_680256509.1292724005361 Content-Type: text/x-patch; name=zfsreaddir.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=zfsreaddir.patch LS0tIG5mc3NlcnZlci9uZnNfc2Vydi5jLnNhdgkyMDEwLTEyLTE4IDIwOjU0OjA4LjAwMDAwMDAw MCAtMDUwMAorKysgbmZzc2VydmVyL25mc19zZXJ2LmMJMjAxMC0xMi0xOCAyMDo1NTo0MS4wMDAw MDAwMDAgLTA1MDAKQEAgLTI4OTcsOCArMjg5Nyw3IEBACiAJICogaW5jcmVhc2UuCiAJICovCiAJ d2hpbGUgKGNwb3MgPCBjZW5kICYmIG5jb29raWVzID4gMCAmJgotCQkoZHAtPmRfZmlsZW5vID09 IDAgfHwgZHAtPmRfdHlwZSA9PSBEVF9XSFQgfHwKLQkJICgodV9xdWFkX3QpKCpjb29raWVwKSkg PD0gdG9mZikpIHsKKwkJKGRwLT5kX2ZpbGVubyA9PSAwIHx8IGRwLT5kX3R5cGUgPT0gRFRfV0hU KSkgewogCQljcG9zICs9IGRwLT5kX3JlY2xlbjsKIAkJZHAgPSAoc3RydWN0IGRpcmVudCAqKWNw b3M7CiAJCWNvb2tpZXArKzsKQEAgLTMxNzQsOCArMzE3Myw3IEBACiAJICogaW5jcmVhc2UuCiAJ ICovCiAJd2hpbGUgKGNwb3MgPCBjZW5kICYmIG5jb29raWVzID4gMCAmJgotCQkoZHAtPmRfZmls ZW5vID09IDAgfHwgZHAtPmRfdHlwZSA9PSBEVF9XSFQgfHwKLQkJICgodV9xdWFkX3QpKCpjb29r aWVwKSkgPD0gdG9mZikpIHsKKwkJKGRwLT5kX2ZpbGVubyA9PSAwIHx8IGRwLT5kX3R5cGUgPT0g RFRfV0hUKSkgewogCQljcG9zICs9IGRwLT5kX3JlY2xlbjsKIAkJZHAgPSAoc3RydWN0IGRpcmVu dCAqKWNwb3M7CiAJCWNvb2tpZXArKzsK ------=_Part_1796243_680256509.1292724005361--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2015693782.1796244.1292724005362.JavaMail.root>