On Tue, Feb 11, 2014 at 11:45 AM, Jeff Layton <jlayton@xxxxxxxxx> wrote: > On Tue, 11 Feb 2014 16:50:45 +0100 > Gionatan Danti <g.danti@xxxxxxxxxx> wrote: > >> Hi Jeff, >> I had the same idea. >> >> When mounting the CIFS directory, the problematic installations return 0 >> links for both dirs and files. On the other hand, the stock CentOS >> installation return 1 or more links. >> >> It puzzled me. Two questions: >> - anyone know the rationale behind this? > > The rationale is that windows servers always send a NumberOfLinks value > of '0' for directories. We have a hack in place that went in around a > year ago to work around that for (arguably broken) applications that > try to infer something about an inode that has a zero st_nlink value. > >> - how it is possible to work-around that with an unpatched kernel? >> > > There is no workaround. Either fix the application such that it doesn't > care or patch the kernel. I'll cc Jim since he did a fair bit of > looking at this several months ago. > > In truth though, resharing a cifs mount is probably not a great > solution. It sounds like the kind of setup that's going to end up being > fraught with cache coherency problems... Problem is that there are situations where it is required (usually due to legacy dialect support or due to legacy authentication support). I am not as worried about the cache coherence issues if we are mounting "cache=none" and we can even set actimeo lower if needed -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html