linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* number of hardlinks for directory in ls -lid always 1?
@ 2015-03-17 13:33 Martin Steigerwald
  2015-03-17 16:07 ` David Sterba
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Steigerwald @ 2015-03-17 13:33 UTC (permalink / raw)
  To: linux-btrfs

Hi!

On BTRFS I see

martin@merkaba:~> ls -lid /usr/local
27138 drwxrwsr-x 1 root staff 62 Aug 15  2014 /usr/local
martin@merkaba:~> ls -lid /usr/local/.
27138 drwxrwsr-x 1 root staff 62 Aug 15  2014 /usr/local/.
martin@merkaba:~> ls -lid /usr/local/bin/..
27138 drwxrwsr-x 1 root staff 62 Aug 15  2014 /usr/local/bin/..

On other filesystems like Ext4 I see the actual number of hardlinks to the 
directory.

Is this intended behaviour of BTRFS or a bug?



With files it works:

martin@merkaba:~> cd Zeit
martin@merkaba:~/Zeit> mkdir links
martin@merkaba:~/Zeit> cd links
martin@merkaba:~/Zeit/links> LANG=C df -hT .
Filesystem             Type   Size  Used Avail Use% Mounted on
/dev/mapper/msata-home btrfs  170G  120G   48G  72% /home
martin@merkaba:~/Zeit/links> echo "hello" > file
martin@merkaba:~/Zeit/links> ls -li
insgesamt 4
12158633 -rw-r--r-- 1 martin martin 6 Mär 17 14:32 file
martin@merkaba:~/Zeit/links> ln file hardlink1
martin@merkaba:~/Zeit/links> ls -li           
insgesamt 8
12158633 -rw-r--r-- 2 martin martin 6 Mär 17 14:32 file
12158633 -rw-r--r-- 2 martin martin 6 Mär 17 14:32 hardlink1

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-03-27 10:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-17 13:33 number of hardlinks for directory in ls -lid always 1? Martin Steigerwald
2015-03-17 16:07 ` David Sterba
2015-03-18 13:31   ` Martin Steigerwald
2015-03-18 13:52     ` David Sterba
2015-03-18 14:23       ` Martin Steigerwald
2015-03-19 13:21         ` David Sterba
2015-03-19 21:47           ` Filipe David Manana
2015-03-19 23:02             ` Kai Krakow
2015-03-20 10:44             ` David Sterba
2015-03-20 12:39             ` David Sterba
2015-03-20 12:59               ` Filipe David Manana
2015-03-27 10:13                 ` Martin Steigerwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).