[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #14921] find -fstype broken when bind-mounts are used
From: |
James Youngman |
Subject: |
[bug #14921] find -fstype broken when bind-mounts are used |
Date: |
Wed, 23 Nov 2005 06:49:18 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Ubuntu package 1.0.7) |
Update of bug #14921 (project findutils):
Status: None => Fixed
Assigned to: None => jay
_______________________________________________________
Follow-up Comment #5:
OK, diagnosed and fixed.
find was taking the LAST matching entry from /etc/mtab rather than the FIRST
(this was also a memory leak).
Since the device number of /tmp/bindmounttofoo was the same as the device
number of /, all files appeared to fstype.c to be on the same filesystem as
/tmp/bindmounttofoo (which is, in a sense, true). Hence it decided that the
filesystem type of those files was the filesystem type from the mtab line for
/tmp/bindmounttofoo, which is "none".
I've now fixed this in 4.2.x (and will soon propagate the fix to 4.3.x). We
take the first match. I assume that
1. you can't make a bind mount to a filesystem which is not mounted yet,
2. and that you can't unmount a filesystem which is the target of an active
bind mount,
3. and that mtab entries appear in the order they were mounted.
If any of the three conditions above is not true, this behaviour will recur.
My understanding of Linux however is that all these properties hold, and
indeed breaking (1) or (2) would make other people very unhappy (as well as
making our code stop working).
James.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14921>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/