bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #26641] Wrong directory hard link count message on automounted dire


From: Phil Dumont
Subject: [bug #26641] Wrong directory hard link count message on automounted directory.
Date: Thu, 27 Aug 2009 16:55:02 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042718 CentOS/3.0.10-1.el5.centos Firefox/3.0.10

Follow-up Comment #6, bug #26641 (project findutils):

find seems to be already doing *something* to determine that the st_link
count is wrong -- that's what leads to the printing of the warning and the
automatic turning on of the -noleaf option, yes?.  All I'm saying is, wherever
it is that find does:

  printf("WARNING: Hard link count is wrong...");
  turn_on_noleaf();

change it to

  fstat(dirfd, &new_stat_buf);
  if (stat_buf.st_dev != new_stat_buf.st_dev)
    /* probably an automount happened; just update stat info */
    stat_buf = new_stat_buf;
  else {
    printf("WARNING: Hard link count is wrong...");
    turn_on_noleaf();
  }

The performance implications should be minimal, because the extra stat is
only ever done whenever the -noleaf evasive action would have been taken,
which is seldom.

Again, I haven't read the code (still), so I apologize if this is naive.

  


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?26641>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]