Coda File System

Re: StarOffice

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Tue, 20 Feb 2001 13:51:10 -0500
On Tue, Feb 20, 2001 at 11:32:55AM +0100, Steffen Neumann wrote:
> 
> Hi,
> 
> we recently had a problem with StarOffice on a Sun NFS Server.
> After we solved that, I tried SO on coda again. Works now.
> 
> Problem is the inode problem with 2.2 kernel
> and also file locking, 
> 
> To solve 1): Don't install to coda file system.
> 
> <bad hack>
> 	venus stop
> 	mkdir /coda/staroffice ( on your ext2 root partition!!!!)
> 		or link /coda/staroffice to 300MB free space
> 	install with -net into /coda/staroffice
> 	tar czvf /tmp/so.tgz /coda/staroffice
> 	rm -rf /coda/staroffice
> 	venus start
> 	tar xzvf so.tgz
> <bad /hack>
>
> to solve 2):
> 	edit /coda/staroffice/program/[setup|soffice]
> 	and remove comment from export STAR_PROFILE_LOCKING_DISABLED=1
> 
> ... and bob is your uncle !
> The idea has been taken from 
> the Solaris README for StarOffice.

Nice, I just installed SO last night, I can use that setting ;)

For the `df' reporting, I made this patch against Linux 2.4.2-pre4,
which does the following:

    $ df /coda
    Filesystem           1k-blocks      Used Available Use% Mounted on
    Coda                    100000      1135      1438  45% /coda
    $ echo 1 > /proc/sys/coda/fake_statfs
    $ df /coda
    Filesystem           1k-blocks      Used Available Use% Mounted on
    Coda                   9000000         0   9000000   0% /coda

Jan


<bad hack #2> (against Linux 2.4.2-pre4 kernel)
--- fs/coda/inode.c.orig	Mon Feb 19 17:12:16 2001
+++ fs/coda/inode.c	Mon Feb 19 17:13:11 2001
@@ -282,7 +282,7 @@
 {
 	int error;
 
-	error = venus_statfs(sb, buf);
+	error = coda_fake_statfs ? -1 : venus_statfs(sb, buf);
 
 	if (error) {
 		/* fake something like AFS does */
--- fs/coda/coda_linux.c.orig	Mon Feb 19 17:15:06 2001
+++ fs/coda/coda_linux.c	Mon Feb 19 17:15:10 2001
@@ -25,9 +25,10 @@
 #include <linux/coda_fs_i.h>
 
 /* initialize the debugging variables */
-int coda_debug = 0;
-int coda_print_entry = 0; 
+int coda_debug;
+int coda_print_entry; 
 int coda_access_cache = 1;
+int coda_fake_statfs;
 
 /* print a fid */
 char * coda_f2s(ViceFid *f)
--- fs/coda/sysctl.c.orig	Mon Feb 19 17:11:56 2001
+++ fs/coda/sysctl.c	Mon Feb 19 17:15:39 2001
@@ -47,6 +47,7 @@
 #define CODA_UPCALL 	 7       /* upcall statistics */
 #define CODA_PERMISSION	 8       /* permission statistics */
 #define CODA_CACHE_INV 	 9       /* cache invalidation statistics */
+#define CODA_FAKE_STATFS 10	 /* don't query venus for actual cache usage */
 
 static ctl_table coda_table[] = {
 	{CODA_DEBUG, "debug", &coda_debug, sizeof(int), 0644, NULL, &proc_dointvec},
@@ -58,6 +59,7 @@
  	{CODA_UPCALL, "upcall_stats", NULL, 0, 0644, NULL, &do_reset_coda_upcall_stats},
  	{CODA_PERMISSION, "permission_stats", NULL, 0, 0644, NULL, &do_reset_coda_permission_stats},
  	{CODA_CACHE_INV, "cache_inv_stats", NULL, 0, 0644, NULL, &do_reset_coda_cache_inv_stats},
+ 	{CODA_FAKE_STATFS, "fake_statfs", &coda_fake_statfs, sizeof(int), 0600, NULL, &proc_dointvec},
 	{ 0 }
 };
 
--- include/linux/coda_linux.h.orig	Mon Feb 19 17:11:28 2001
+++ include/linux/coda_linux.h	Mon Feb 19 17:14:22 2001
@@ -45,6 +45,7 @@
 extern int coda_debug;
 extern int coda_print_entry;
 extern int coda_access_cache;
+extern int coda_fake_statfs;
 
 /* this file:  heloers */
 static __inline__ struct ViceFid *coda_i2f(struct inode *);
</bad hack #2>

> And another step towards world-domination for coda.
> If only we'd get mysqld to work...
> 
> So long,
> Steffen
> 
> 
> =========================================================================
> 
> >Jan Harkes (jaharkes_at_cs.cmu.edu) wrote: 
> >Thu, 25 Jan 2001 12:09:27 -0500 
> >
> >On Thu, Jan 25, 2001 at 05:00:47PM +0100, Steffen Neumann wrote:
> >> 
> >> Just as addendum I found the reference,
> >> it's german magazine c't, (15) 2000 p.198
> >> 
> >> Main point is that (for NFS) it is sufficient 
> >> to disable locking via a mount option.
> >> 
> >> Below a babelfish translation...
> >
> >I had to translate that back into german to be able to understand it ;)
> >
> >Coda does not support any locking. I'm not sure what StarOffice is
> >trying to do, but if it can't cope with EOPNOTSUP...
> >
> >Jan
> 
> 
> 
Received on 2001-02-20 13:51:13