Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/puffs/mount_psshfs Bump the initial rootdir link co...



details:   https://anonhg.NetBSD.org/src/rev/c3b569183827
branches:  trunk
changeset: 752159:c3b569183827
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Feb 17 15:50:54 2010 +0000

description:
Bump the initial rootdir link count guess to a ludicrous value.

diffstat:

 usr.sbin/puffs/mount_psshfs/psshfs.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 2f1a90eb47d3 -r c3b569183827 usr.sbin/puffs/mount_psshfs/psshfs.c
--- a/usr.sbin/puffs/mount_psshfs/psshfs.c      Wed Feb 17 15:50:06 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/psshfs.c      Wed Feb 17 15:50:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $        */
+/*     $NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $        */
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $");
+__RCSID("$NetBSD: psshfs.c,v 1.60 2010/02/17 15:50:54 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -287,7 +287,15 @@
 
        rva = &pn_root->pn_va;
        rva->va_fileid = pctx.nextino++;
-       rva->va_nlink = 101; /* XXX */
+
+       /*
+        * For root link count, just guess something ridiculously high.
+        * Guessing too high has no known adverse effects, but fsu()
+        * doesn't like too low values.  This guess will be replaced
+        * with the real value when readdir is first called for
+        * the root directory.
+        */
+       rva->va_nlink = 8811;
 
        if (detach)
                if (puffs_daemon(pu, 1, 1) == -1)



Home | Main Index | Thread Index | Old Index