From: Christoph Hellwig <hch@lst.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-fsdevel@vger.kernel.org
Subject: odd sysfs find behavior, was: Re: [PATCH v6 00/10] Implement NVMe Namespace Descriptor Identification
Date: Sat, 17 Jun 2017 14:08:14 +0200 [thread overview]
Message-ID: <20170617120814.GA13236@lst.de> (raw)
In-Reply-To: <CA+55aFxJ0bpRFsnZFe6sh2i4jxNdYmDi_6RZx2CQQdmQ_HU3wQ@mail.gmail.com>
On Fri, Jun 16, 2017 at 10:28:28PM +0900, Linus Torvalds wrote:
> Hmm. The *traditional* reason for this particular 'find' oddity is
> that find has an optimization which will look at the nlink count of a
> directory to decide how many subdirectories it can have.
It looks like sysfs maintains i_nlink properly as far as I can tell.
But I noticed another things that's even more weird:
root@testvm:~/nvmetcli# find /sys -name uuid
root@testvm:~/nvmetcli# find /sys -name uuid
/sys/devices/virtual/nvme-fabrics/ctl/nvme2/nvme2n1/uuid
so just repeating the find a second time makes it work! Looks like
there is some sort of lazy population scheme in sysfs..
next parent reply other threads:[~2017-06-17 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170607094536.32419-1-jthumshirn@suse.de>
[not found] ` <20170615163141.GA27307@lst.de>
[not found] ` <bab953e9-7026-5833-9f65-1ef8b90433d7@suse.de>
[not found] ` <20170616094056.GA12465@lst.de>
[not found] ` <905ed2e6-1c1c-f3a3-5391-66e42fb61861@suse.de>
[not found] ` <20170616095837.GA14217@lst.de>
[not found] ` <CA+55aFxJ0bpRFsnZFe6sh2i4jxNdYmDi_6RZx2CQQdmQ_HU3wQ@mail.gmail.com>
2017-06-17 12:08 ` Christoph Hellwig [this message]
2017-06-18 1:12 ` odd sysfs find behavior, was: Re: [PATCH v6 00/10] Implement NVMe Namespace Descriptor Identification Greg Kroah-Hartman
2017-06-18 7:32 ` Christoph Hellwig
[not found] ` <20170618073305.GB25797@lst.de>
2017-06-18 10:20 ` Tejun Heo
2017-06-18 10:32 ` Tejun Heo
2017-06-18 13:43 ` Christoph Hellwig
2017-06-19 17:59 ` Tejun Heo
2017-06-21 14:48 ` Greg Kroah-Hartman
2017-06-21 15:36 ` Tejun Heo
2017-06-22 0:21 ` Linus Torvalds
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=20170617120814.GA13236@lst.de \
--to=hch@lst.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).