Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 4963

Summary: diff on nfs mounted directories fails
Product: [Retired] Red Hat Linux Reporter: Chris Carlson <cwcarlson>
Component: nfs-serverAssignee: David Lawrence <dkl>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-16 13:23:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Carlson 1999-09-07 20:40:40 UTC
Performing a "diff -qr <dir1> <dir2>" fails when either of
the two directories are NFS mounted.

According to an strace of diff:

----------------------------------------
open("ndd.sav", O_RDONLY|O_NONBLOCK|0x10000) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
brk(0x805d000)                          = 0x805d000
lseek(3, 0, SEEK_CUR)                   = 0
getdents(3, 0 60
12 60
28 60
44 60
/* 4 entries */, 3933) = 60
lseek(3, 0, SEEK_CUR)                   = -1 EPERM
(Operation not permitted)
getdents(3, /* 0 entries */, 3933)      = 0
close(3)                                = 0
write(2, "diff: ", 6diff: )                   = 6
write(2, "ndd.sav: Operation not permitted"..., 33ndd.sav:
Operation not permitted
) = 33
close(1)                                = 0
_exit(2)                                = ?
----------------------------------------

It appears that diff is trying to do an lseek on the
directory to rewind it but this returns an error.


Vital information:

/proc/version:
Linux version 2.2.5-15 (root@porky.devel.redhat.com) (gcc
version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1
Mon Apr 19 22:21:09 EDT 1999

NFS mounted filesystem is from an SGI Challenge L running
IRIX 6.2.

Comment 1 junkimu 2000-01-25 12:49:59 UTC
This is probably the same problem as bug 648.  Upgrading to a more recent kernel
(2.2.10 that comes with 6.1 seems to work fine) should help.

Comment 2 junkimu 2000-01-26 01:34:59 UTC
Actually, I had to install the glibc from the 6.1 distribution as well, so the
problem might be in the glibc and not the kernel.

This combination seems to solve the problem:

kernel-2.2.12-20
glibc-2.1.2-11