odd sysfs find behavior, was: Re: [PATCH v6 00/10] Implement NVMe Namespace Descriptor Identification

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

 



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..



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux