coreutils
[Top][All Lists]
Advanced

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

du -L not diagnosing recursive bind mounts


From: Bernhard Voelker
Subject: du -L not diagnosing recursive bind mounts
Date: Wed, 19 Mar 2014 08:56:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Investigating du's check for directory loops [1], I was puzzled
that 'du -L' does not diagnose the loop:

  $ mount -t tmpfs /mnt /mnt

  $ mkdir -p /mnt/dir/mnt

  $ mount --bind /mnt /mnt/dir/mnt

  $ cd /mnt

  $ ln -s dir/mnt/dir d

  $ ls -ldogi . d dir dir/mnt
  188923 drwxrwxrwt 3 80 Mar 19 08:52 .
  189802 lrwxrwxrwx 1 11 Mar 19 08:52 d -> dir/mnt/dir
  190673 drwxr-xr-x 3 60 Mar 19 08:52 dir
  188923 drwxrwxrwt 3 80 Mar 19 08:52 dir/mnt

  $ du
  du: mount point ‘./dir/mnt’ already traversed
  0     ./dir
  0     .

  $ du -L
  0     ./d/mnt
  0     ./d
  0     .

I'm just sending this here as a reference, and investigate later.

[1] http://lists.gnu.org/archive/html/coreutils/2014-03/msg00022.html

Have a nice day,
Berny



reply via email to

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