[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: du bogus warning with bind mounts
From: |
Jim Meyering |
Subject: |
Re: du bogus warning with bind mounts |
Date: |
Thu, 09 Aug 2012 10:12:29 +0200 |
Ondrej Oprala wrote:
> Hi, I've changed the du util a bit to reflect
> the proposed solution here
> http://marc.info/?l=coreutils-bug&m=134124896022426&w=2 .
...
> + while (mnt_ent = getmntent (mtab_fp))
> + {
> + if (!stat (mnt_ent->mnt_dir, buf))
> + hash_ins (di_mnt, buf->st_ino, buf->st_dev);
> + }
Also, please heed my advice inspired by Paul's comment (next in that
thread) that stat may hang on non-local mounts:
http://marc.info/?l=coreutils-bug&m=134130469407031&w=2
Paul Eggert wrote:
> On 07/02/2012 10:04 AM, Jim Meyering wrote:
>> - read+stat all mount points at start-up
>
> This sounds like it might have problems on hosts that have
> lots of mount points, or where some mount points are remote.
> I've been on many systems where statting a remote
> mount point can take a long time, or even hang indefinitely.
>
> The problem with remote mounts might be attacked by using
> getmntent to find out which mount points are on the
> current file system and can therefore be safely statted
> (I haven't used getmntent enough to know whether this is feasible,
> sorry).
Since with bind mounts we care only about non-remote mount points,
we can call read_file_system_list to get the list, and then stat only
those mount point directories for which !mount_entry.me_remote
(and probably && !...me_dummy)
- du bogus warning with bind mounts, Ondrej Oprala, 2012/08/08
- Re: du bogus warning with bind mounts, Jim Meyering, 2012/08/08
- Re: du bogus warning with bind mounts,
Jim Meyering <=
- Re: du bogus warning with bind mounts, Ondrej Oprala, 2012/08/09
- Re: du bogus warning with bind mounts, Ondrej Oprala, 2012/08/15
- Re: du bogus warning with bind mounts, Jim Meyering, 2012/08/17
- Re: du bogus warning with bind mounts, Jim Meyering, 2012/08/17
- Re: du bogus warning with bind mounts, Jim Meyering, 2012/08/17
- Re: du bogus warning with bind mounts, Jim Meyering, 2012/08/20
- Re: du bogus warning with bind mounts, Ondrej Oprala, 2012/08/21