]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Apply upstream fix to show reasonable free space numbers for AFS in
authorRuss Allbery <rra@debian.org>
Sun, 18 Mar 2007 02:03:08 +0000 (02:03 +0000)
committerRuss Allbery <rra@debian.org>
Sun, 18 Mar 2007 02:03:08 +0000 (02:03 +0000)
  df.  Without this fix, some programs which use df to check free space
  may think that directories in AFS are full and prevent the user from
  attempting to write files.  (Closes: #415294)

acinclude.m4
debian/changelog
debian/control
debian/rules
src/afs/LINUX/osi_vfsops.c
src/cf/linux-test4.m4

index fb8001a5312f9343895b74b87c8c374e6f6e4be5..2d241e0867cd957e42ea20484f22878ad5937634 100644 (file)
@@ -613,6 +613,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
                 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
+                LINUX_STATFS_TAKES_DENTRY
                 LINUX_REFRIGERATOR
                 LINUX_LINUX_KEYRING_SUPPORT
                 LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
@@ -784,6 +785,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test "x$ac_cv_linux_get_sb_has_struct_vfsmount" = "xyes"; then
                  AC_DEFINE(GET_SB_HAS_STRUCT_VFSMOUNT, 1, [define if your get_sb_nodev needs a struct vfsmount argument])
                 fi
+                if test "x$ac_cv_linux_statfs_takes_dentry" = "xyes"; then
+                 AC_DEFINE(STATFS_TAKES_DENTRY, 1, [define if your statfs takes a dentry argument])
+                fi
                 if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
                  AC_DEFINE(AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL, 1, [define if your aops.writepage takes a struct writeback_control argument])
                 fi
index 4e43bd0b92db8f8257a38f299c6116bb6634bc3a..7fdbea16c20815c17843d1d72aac86606d57597f 100644 (file)
@@ -5,6 +5,10 @@ openafs (1.4.2-6) unstable; urgency=medium
     ordering problems that could lead the kernel to ignore some group
     membership for users.  (Closes: #414911)
   * Apply upstream fix for segfaults in pts rename.  (Closes: #409184)
+  * Apply upstream fix to show reasonable free space numbers for AFS in
+    df.  Without this fix, some programs which use df to check free space
+    may think that directories in AFS are full and prevent the user from
+    attempting to write files.  (Closes: #415294)
   * Translation updates:
     - Dutch, thanks cobaco.  (Closes: #413701)
     - Portuguese, thanks Miguel Figueiredo.  (Closes: #414800)
index 09d48a4fbe68686ca85939561aee87c402026fd1..b263e03c1caa6698f1476ee787c0b0d97cb36f38 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: optional
 Maintainer: Sam Hartman <hartmans@debian.org>
 Uploaders: Russ Allbery <rra@debian.org>
-Build-Depends: debhelper (>= 5), libncurses5-dev, libpam0g-dev, bison, docbook-to-man, flex, perl, comerr-dev, libkrb5-dev
+Build-Depends: debhelper (>= 5), libncurses5-dev, libpam0g-dev, bison, docbook-to-man, flex, perl, comerr-dev, libkrb5-dev, autoconf
 Standards-Version: 3.7.2
 
 Package: openafs-client
index 2d82925ec489a75ddf02449ad839fe297a3f2742..7f2583c9d1dceeeb777ab3af8a56e623bac217c3 100755 (executable)
@@ -86,6 +86,7 @@ configure: configure-stamp
 configure-stamp:
        @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
        dh_testdir
+       sh regen.sh
        afslogsdir=/var/log/openafs afslocaldir=/etc/openafs/server-local \
            sh configure \
            --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \
@@ -104,7 +105,6 @@ build-indep:
 build-stamp:
        dh_testdir
        mkdir -p $(CURDIR)/debian/tmp
-       cd doc/man-pages && perl generate-man
        $(MAKE) install_nolibafs DESTDIR=$(CURDIR)/debian/tmp
        chmod +x debian/afs-rootvol debian/afs-newcell
        touch build-stamp
index 54bca905fd41cb479bcb252972e320239afad97f..bf41d878eff3f62e33de8a6658bc9ea2fed2b8e9 100644 (file)
@@ -64,11 +64,12 @@ int afs_fill_super(struct super_block *sb, void *data, int silent);
  * dev, covered, s_rd_only, s_dirt, and s_type will be set by read_super.
  */
 #if defined(AFS_LINUX26_ENV)
-static struct super_block *
 #ifdef GET_SB_HAS_STRUCT_VFSMOUNT
+int
 afs_get_sb(struct file_system_type *fs_type, int flags,
           const char *dev_name, void *data, struct vfsmount *mnt)
 #else
+static struct superblock *
 afs_get_sb(struct file_system_type *fs_type, int flags,
           const char *dev_name, void *data)
 #endif
@@ -385,7 +386,11 @@ afs_put_super(struct super_block *sbp)
  */
 #if defined(AFS_LINUX26_ENV)
 int
+#if defined(STATFS_TAKES_DENTRY)
+afs_statfs(struct dentry *dentry, struct kstatfs *statp)
+#else
 afs_statfs(struct super_block *sbp, struct kstatfs *statp)
+#endif
 #elif defined(AFS_LINUX24_ENV)
 int
 afs_statfs(struct super_block *sbp, struct statfs *statp)
@@ -409,7 +414,11 @@ afs_statfs(struct super_block *sbp, struct statfs *__statp, int size)
     AFS_STATCNT(afs_statfs);
 
     statp->f_type = 0;         /* Can we get a real type sometime? */
+#if defined(STATFS_TAKES_DENTRY)
+    statp->f_bsize = dentry->d_sb->s_blocksize;
+#else
     statp->f_bsize = sbp->s_blocksize;
+#endif
     statp->f_blocks = statp->f_bfree = statp->f_bavail = statp->f_files =
        statp->f_ffree = 9000000;
     statp->f_fsid.val[0] = AFS_VFSMAGIC;
index 2c29423367c1474cdfcddc64aee6c50dcdf53b56..22cbee6f1941f141de7c8d48ce8653ab11e156b7 100644 (file)
@@ -608,6 +608,19 @@ AC_DEFUN([LINUX_GET_SB_HAS_STRUCT_VFSMOUNT], [
       ac_cv_linux_get_sb_has_struct_vfsmount=no)])
   AC_MSG_RESULT($ac_cv_linux_get_sb_has_struct_vfsmount)])
 
+AC_DEFUN([LINUX_STATFS_TAKES_DENTRY], [
+  AC_MSG_CHECKING([for dentry in statfs])
+  AC_CACHE_VAL([ac_cv_linux_statfs_takes_dentry], [
+    AC_TRY_KBUILD(
+[#include <linux/fs.h>
+#include <linux/statfs.h>],
+[
+extern int vfs_statfs(struct dentry *, struct kstatfs *);
+],
+      ac_cv_linux_statfs_takes_dentry=yes,
+      ac_cv_linux_statfs_takes_dentry=no)])
+  AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)])
+
 AC_DEFUN([LINUX_LINUX_KEYRING_SUPPORT], [
   AC_MSG_CHECKING([for linux kernel keyring support])
   AC_CACHE_VAL([ac_cv_linux_keyring_support], [