[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st_nlink=2 and no subdirs? isn't that normal?
From: |
Linda A. Walsh |
Subject: |
Re: st_nlink=2 and no subdirs? isn't that normal? |
Date: |
Thu, 08 Aug 2013 12:08:13 -0700 |
User-agent: |
Thunderbird |
James Youngman wrote:
Could you supply a complete set of instructions for reproducing the
problem, please?
-----
I just saw this in the change log for 3.9.11 concerning CIFS:
commit 44d244a13a27f0eb7b33bb152aa173c0e875df76
Author: Steve French <address@hidden>
Date: Thu Jul 4 14:38:48 2013 -0500
CIFS use sensible file nlink values if unprovided
commit 6658b9f70ebca5fc0795b1d6d733996af1e2caa7 upstream.
Certain servers may not set the NumberOfLinks field in query file/path
info responses. In such a case, cifs_inode_needs_reval() assumes that
all regular files are hardlinks and triggers revalidation, leading to
excessive and unnecessary network traffic.
This change hardcodes cf_nlink (and subsequently i_nlink) when not
returned by the server, similar to what already occurs in cifs_mkdir().
Signed-off-by: David Disseldorp <address@hidden>
Signed-off-by: Steve French <address@hidden>
Signed-off-by: Greg Kroah-Hartman <address@hidden>
----
Doesn't say which servers or when it might not be set correctly (wouldn't
be surprised if some NT servers didn't report hardlinks the way unix expects
them)... or under what circumstances...
---
I just tried it again and this time it happened on the root file system
of an NTFS client:
sudo mount /athenae #try to mount system drive C$
Ishtar:law> find /athenae >/tmp/athenae.lst
find: WARNING: Hard link count is wrong for `/athenae' (saw only st_nlink=2 but
we already saw 0 subdirectories): this may be a bug in your file system driver.
Automatically turning on find's -noleaf option. Earlier results may have
failed to include directories that should have been searched.
But when I use ls, I get:
ll -d /athenae
drwxr-xr-x 2 98304 Aug 6 22:27 /athenae/
Ishtar:law> ll -ad /athenae/.
drwxr-xr-x 2 98304 Aug 6 22:27 /athenae/./
So still not sure where it is picking up the zero,
BUT, a kernel fix might fix it...
Just thought I'd followup on this symptom...incase anyone else hit it...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: st_nlink=2 and no subdirs? isn't that normal?,
Linda A. Walsh <=