bug-findutils
[Top][All Lists]
Advanced

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

[bug #54913] find: "-type"-test wrong on bind-mounted char device


From: Tavian Barnes
Subject: [bug #54913] find: "-type"-test wrong on bind-mounted char device
Date: Fri, 2 Nov 2018 09:49:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Follow-up Comment #5, bug #54913 (project findutils):

Linux has similar behaviour about d_ino, returning the inode number from the
parent filesystem rather than the mount point itself.  This is a POSIX
violation, but there's little interest in fixing it:
https://groups.google.com/forum/#!topic/linux.kernel/4rzZRWKWT9c  For similar
reasons, I expect this behaviour won't change in the Linux kernel :(

So what to do?  It's quite the pessimization to require stat() for -type. 
(Technically -type d can be answered without stat() because directories can
only be mounted over directories.)  I think trusting d_type for everything
except mount points is a good idea.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54913>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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