On Fri, Jan 27, 2006 at 06:56:07AM +0100, Heiko Carstens wrote:
> > > There seems to be a bug in debugfs: it seems it doesn't get the hard link
> > > count right. See the output below. This happened on s390x with git tree
> > > of today. Any ideas?
> > What code were you using that called debugfs? Is it in the mainline
> > tree?
>
> It's the s390 debug feature in arch/s390/kernel/debug.c. It's completely in
> the mainline tree.
>
> > $ cd /sys/kernel/debug/
> > $ find .
> > .
> > ./uhci
> > [...]
> > $ stat .
> > File: `.'
> > Size: 0 Blocks: 0 IO Block: 4096 directory
> > Device: eh/14d Inode: 15528 Links: 2
>
> Links should be 3, I thought? For an empty directory it's 2 and as soon as
> you create a new directory in there it should be increased by 1. Therefore
> it should be 3. Or am I missing something?
Yeah, I think you are correct. But I don't see where in the debugfs
code I messed this up...
In debugfs_mkdir() we increment the parent i_nlink properly if we create
the new subdirectory, and based on other implementations like this
(usbfs), that logic seems to be correct.
Unless something is odd with creating a directory in the root of the fs.
Does the subdirectory you have created have the proper number of links?
> Btw.: my find version: "GNU find version 4.2.20".
Hm, newer versions of find don't complain about this?
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]