[123] in The Cryptographic File System users list

home help back first fref pref prev next nref lref last post

Solaris 2.7

daemon@ATHENA.MIT.EDU (Bill Dorsey)
Wed Feb 3 20:26:11 1999

From owner-cfs-users@research.att.com Thu Feb 04 01:26:10 1999
Return-Path: <owner-cfs-users@research.att.com>
Delivered-To: cfs-mtg@bloom-picayune.mit.edu
Received: (qmail 8914 invoked from network); 4 Feb 1999 01:26:09 -0000
Received: from unknown (HELO mail-blue.research.att.com) (135.207.30.102)
  by bloom-picayune.mit.edu with SMTP; 4 Feb 1999 01:26:09 -0000
Received: from amontillado.research.att.com (amontillado.research.att.com [135.207.24.32])
	by mail-blue.research.att.com (Postfix) with ESMTP
	id 339BF4CE08; Wed,  3 Feb 1999 20:26:12 -0500 (EST)
Received: from nsa.research.att.com (majordomo@nsa.research.att.com [135.207.24.155])
	by amontillado.research.att.com (8.8.7/8.8.7) with ESMTP id UAA10624;
	Wed, 3 Feb 1999 20:26:09 -0500 (EST)
Received: (from majordomo@localhost) by nsa.research.att.com (8.7.3/8.7.3) id UAA10493 for cfs-users-list; Wed, 3 Feb 1999 20:22:58 -0500 (EST)
X-Authentication-Warning: nsa.research.att.com: majordomo set sender to owner-cfs-users@nsa.research.att.com using -f
Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by nsa.research.att.com (8.7.3/8.7.3) with ESMTP id UAA10489 for <cfs-users@nsa.research.att.com>; Wed, 3 Feb 1999 20:22:55 -0500 (EST)
Delivered-To: cfs-users@research.att.com
Received: from lila.lila.com (209-157-84-60.ip.idiom.com [209.157.84.60])
	by mail-blue.research.att.com (Postfix) with ESMTP
	id E86944CE02; Wed,  3 Feb 1999 20:24:16 -0500 (EST)
Received: from matador (1Cust187.tnt30.sfo3.da.uu.net [208.255.83.187])
	by lila.lila.com (8.9.1b+Sun/8.9.1) with SMTP id RAA20617
	for <cfs-users@research.att.com>; Wed, 3 Feb 1999 17:26:46 -0800 (PST)
Message-Id: <3.0.5.32.19990203172316.00a6da10@lila.lila.com>
X-Sender: dorsey@lila.lila.com
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Wed, 03 Feb 1999 17:23:16 -0800
To: cfs-users@research.att.com
From: Bill Dorsey <dorsey@lila.com>
Subject: Solaris 2.7
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: owner-cfs-users@research.att.com
Precedence: bulk

Hi,

I've been sitting on these patches for a couple of months now.  I haven't
seen anyone else comment on this, but CFS 1.4 does not work under Solaris
2.7 on the Sparc 5 or Ultra boxes I've tried it on.

Apparently, the problem is due to the fact that CFS uses the expression
(0-x), where x is some small positive integer, to generate a file ids
for directories mounted under the cfs mount point.  Solaris 2.7 uses
64-bit numbers for file ids and winds up expanding this to a number in
the 2^63 range.  This then breaks a number of utilities like ls and
pwd making the system unusable (ls actually attempts to allocate some
unreasonably large amount of memory before blowing up).  The patches
included below attempt to address this problem in a reasonable fashion
that should work on all versions of Solaris (I've only tested it under
2.7, however).

Thanks go to Bill Soley for helping me track down this problem.

- Bill Dorsey

---< cut here >---

*** cfs_fh.c	Thu Dec 18 16:53:04 1997
--- cfs_fh.c.sol7	Tue Nov 17 01:23:17 1998
***************
*** 479,485 ****
--- 479,489 ----
  	if (f==NULL)
  		return 1;
  	if (f->fileid == 0)	/* an instance root */
+ #ifndef SOLARIS2X
  		return (0-f->ins->id);	/* should be unique enough */
+ #else
+ 		return (0x80000000-f->ins->id);	/* workaround for 64-bit fs */
+ #endif
  	return (f->fileid);
  }
  
***************
*** 493,499 ****
--- 497,507 ----
  		if (f->fileid==0)
  			return 1;
  		else
+ #ifndef SOLARIS2X
  			return (0-f->ins->id);
+ #else
+ 			return (0x80000000-f->ins->id);	/* workaround */
+ #endif
  	return f->parent;	/* this is already 2 for main root  */
  }
  
***************
*** 1164,1170 ****
--- 1172,1182 ----
  			else
  				strcpy(d.d_name,
  				       instances[cookie-2]->name);
+ #ifndef SOLARIS2X
  			d.d_fileno=(0-(cookie-2));
+ #else
+ 			d.d_fileno=(0x80000000-(cookie-2)); /* workaround */
+ #endif
  			break;
  		}
  		++cookie;


home help back first fref pref prev next nref lref last post