meant to cc this here....

--- Begin Message --- Sam Varshavchik wrote:
Gordon Messmer writes:

This patch might fix it.


+ if (ninodes != -1 &&

This is messy.  ninodes is an unsigned long.
You can achieve the same results by simply returning -1 from freespace().

Noticed that after I sent the message :(


This version just returns -1 if there's no static limit on inodes, but it also disables the low block count checks.
diff -ru courier-0.44.2/courier/libs/comstatfs.c 
courier-0.44.2-reiserfs2/courier/libs/comstatfs.c
--- courier-0.44.2/courier/libs/comstatfs.c     2000-05-15 23:18:31.000000000 -0700
+++ courier-0.44.2-reiserfs2/courier/libs/comstatfs.c   2003-12-05 16:33:20.000000000 
-0800
@@ -56,6 +56,7 @@
 
 #define        BAVAIL buf.f_bavail
 #define        IAVAIL buf.f_favail
+#define ITOTAL buf.f_files
 
        *blksize=buf.f_bsize;
 
@@ -67,11 +68,14 @@
 
 #define        BAVAIL buf.f_bfree
 #define        IAVAIL buf.f_ffree
+#define ITOTAL buf.f_files
 
        *blksize=buf.f_bsize;
 #endif
 #endif
 
+       if (ITOTAL == 0) return (-1);   /* This fs doesn't have a static limit on 
inodes. */
+
        *nblocks= BAVAIL;
        *ninodes= IAVAIL;
 

--- End Message ---


Reply via email to