GNU bug report logs -
#21715
feat req: an option to skip directory inode comparison
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21715 in the body.
You can then email your comments to 21715 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-diffutils <at> gnu.org
:
bug#21715
; Package
diffutils
.
(Tue, 20 Oct 2015 02:28:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Aaron Davies <aaron.davies <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-diffutils <at> gnu.org
.
(Tue, 20 Oct 2015 02:28:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
i have a situation where diff -r of two directories fails to report differences that diff of two files in those directories shows
i haven't dug into the code yet, but the directories involved are on an NFS mount of a netapp filer, one is the copy-on-write snapshot counterpart of the other, they show up as the same filesystem, and are the same inode
so my guess is that there's something in the recursive traversal that says that any two directories that are on the same fs and are the same inode must have identical descendent contents and can be skipped completely
this fs probably violates POSIX by doing this, but there's no easy way around it[1], so it would be very useful if diff had a command-line option to turn that optimization off
i've heard anecdotal reports of other filesystems that cause the same problem
here's a sample session:
$ mkdir foo
$ echo baz >foo/bar
$ # wait until the next snapshot is created
$ echo quux >foo/bar
$ diff -r .snapshot/nightly.0/foo foo
$ diff .snapshot/nightly.0/foo/bar foo/bar
1c1
< baz
---
> quux
$ stat -c %i .snapshot/nightly.0/foo foo
69403847
69403847
$
--
Aaron Davies
aaron.davies <at> gmail.com
[1] when i ran into this, i ended up using something like diff <(find .snapshot/nightly.0/foo -type f|sort|xargs cat) <(find foo -type f|sort|xargs cat) to do the comparison -- sufficient for my needs at the time, but cleaning it up for general purpose use would essentially be rewriting the -r part of diff from scratch
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#21715
; Package
diffutils
.
(Mon, 16 May 2016 04:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 21715 <at> debbugs.gnu.org (full text, mbox):
On Mon, Oct 19, 2015 at 7:27 PM, Aaron Davies <aaron.davies <at> gmail.com> wrote:
> i have a situation where diff -r of two directories fails to report differences that diff of two files in those directories shows
>
> i haven't dug into the code yet, but the directories involved are on an NFS mount of a netapp filer, one is the copy-on-write snapshot counterpart of the other, they show up as the same filesystem, and are the same inode
>
> so my guess is that there's something in the recursive traversal that says that any two directories that are on the same fs and are the same inode must have identical descendent contents and can be skipped completely
>
> this fs probably violates POSIX by doing this, but there's no easy way around it[1], so it would be very useful if diff had a command-line option to turn that optimization off
>
> i've heard anecdotal reports of other filesystems that cause the same problem
>
> here's a sample session:
>
> $ mkdir foo
> $ echo baz >foo/bar
> $ # wait until the next snapshot is created
> $ echo quux >foo/bar
> $ diff -r .snapshot/nightly.0/foo foo
> $ diff .snapshot/nightly.0/foo/bar foo/bar
> 1c1
> < baz
> ---
>> quux
> $ stat -c %i .snapshot/nightly.0/foo foo
> 69403847
> 69403847
> $
> --
> Aaron Davies
> aaron.davies <at> gmail.com
>
> [1] when i ran into this, i ended up using something like diff <(find .snapshot/nightly.0/foo -type f|sort|xargs cat) <(find foo -type f|sort|xargs cat) to do the comparison -- sufficient for my needs at the time, but cleaning it up for general purpose use would essentially be rewriting the -r part of diff from scratch
Hi Aaron,
Thanks for the suggestion, but what NetApp software are you using?
I've just tried to reproduce that on a NetApp-backed nfs-mounted directory,
and see different inode numbers for the directories:
$ stat --format %i foo .snapshot/hourly.2016-05-15_*/foo
97582543
97557711
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#21715
; Package
diffutils
.
(Mon, 16 May 2016 06:14:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 21715 <at> debbugs.gnu.org (full text, mbox):
Jim Meyering wrote:
> Thanks for the suggestion, but what NetApp software are you using?
> I've just tried to reproduce that on a NetApp-backed nfs-mounted directory,
> and see different inode numbers for the directories:
>
> $ stat --format %i foo .snapshot/hourly.2016-05-15_*/foo
> 97582543
> 97557711
I can reproduce the problem on my platform: a RHEL 7 client
(3.10.0-327.10.1.el7.x86_64 kernel), with a NetApp server running a fairly old
release. The last time I asked (in 2010), they were running netapp-6.5.6 on the
file server.
As far as I know, only NetApp has the inode-number bug. It's had the bug for
many years, and I'm a bit surprised to see that they fixed it in a recent release.
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Mon, 16 May 2016 19:29:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Aaron Davies <aaron.davies <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 16 May 2016 19:29:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 21715-done <at> debbugs.gnu.org (full text, mbox):
On Sun, May 15, 2016 at 11:13 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> Jim Meyering wrote:
>> Thanks for the suggestion, but what NetApp software are you using?
>> I've just tried to reproduce that on a NetApp-backed nfs-mounted directory,
>> and see different inode numbers for the directories:
>>
>> $ stat --format %i foo .snapshot/hourly.2016-05-15_*/foo
>> 97582543
>> 97557711
>
> I can reproduce the problem on my platform: a RHEL 7 client
> (3.10.0-327.10.1.el7.x86_64 kernel), with a NetApp server running a fairly old
> release. The last time I asked (in 2010), they were running netapp-6.5.6 on the
> file server.
>
> As far as I know, only NetApp has the inode-number bug. It's had the bug for
> many years, and I'm a bit surprised to see that they fixed it in a recent release.
I confess I was surprised, too, after so many years.
Running `version` on the server my client used prints this:
NetApp Release 8.3.1P2: Wed Dec 09 03:10:24 UTC 2015
As such, it feels ok to close this.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 14 Jun 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.