Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Andreas Schneider <asn@cryptomilk.org>
To: linux-btrfs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Subject: btrfs and default directory link count
Date: Fri, 08 Nov 2013 12:07:52 +0100	[thread overview]
Message-ID: <1528226.ndb0o2H7AC@magrathea> (raw)

Hello,

I did run the Samba testsuite and have a failing test 
(samba.vfstest.stream_depot). It revealed that it only fails on btrfs. The 
reason is that a simple check fails:

if (smb_fname_base->st.st_ex_nlink == 2)

If you create a directory on btrfs and check stat:

$ mkdir x
$ stat x
  File: ‘x’
  Size: 0               Blocks: 0          IO Block: 4096   directory
Device: 2bh/43d Inode: 3834720     Links: 1
Access: (0755/drwxr-xr-x)  Uid: ( 1000/     asn)   Gid: (  100/   users)
Access: 2013-11-08 11:54:32.431040963 +0100
Modify: 2013-11-08 11:54:32.430040956 +0100
Change: 2013-11-08 11:54:32.430040956 +0100
 Birth: -

then you see Links: 1. On ext4 or other filesystems:

mkdir x
stat x
  File: ‘x’
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fd00h/64768d    Inode: 8126886     Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/     asn)   Gid: (  100/   users)
Access: 2013-11-08 11:54:55.428212340 +0100
Modify: 2013-11-08 11:54:55.427212319 +0100
Change: 2013-11-08 11:54:55.427212319 +0100
 Birth: -

the link count for a directory differs: Links: 2.

Why is btrfs different here? Could someone explain this?


Thanks,


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@cryptomilk.org


             reply	other threads:[~2013-11-08 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 11:07 Andreas Schneider [this message]
2013-11-08 12:24 ` btrfs and default directory link count cwillu
2013-11-08 14:11   ` Andreas Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1528226.ndb0o2H7AC@magrathea \
    --to=asn@cryptomilk.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox