]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
This commit was generated by cvs2svn to compensate for changes in r107,
authorSam Hartman <hartmans@debian.org>
Sun, 3 Dec 2000 06:25:27 +0000 (06:25 +0000)
committerSam Hartman <hartmans@debian.org>
Sun, 3 Dec 2000 06:25:27 +0000 (06:25 +0000)
which included commits to RCS files with non-trunk default branches.

src/afs/LINUX/osi_alloc.c
src/afs/LINUX/osi_vnodeops.c
src/afs/SOLARIS/osi_vfsops.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/afs_osi.h
src/afs/afs_pioctl.c
src/afs/sysincludes.h
src/config/Makefile
src/config/param.sun4x_58.h
src/config/param.sun4x_58_usr.h

index ab0352d638893fc3c3ff8b83fbc661ca26febd82..75d7498f1e11f0729b90dcc3a89ab30eab18dc53 100644 (file)
@@ -339,20 +339,21 @@ void osi_linux_free_afs_memory(void)
 {
     down(&afs_linux_alloc_sem);
 
-    /* iterate through all elements in the hash table and free both 
-     * the chunk and the atom associated with it.
-     */
-    afs_lhash_iter(lh_mem_htab, hash_free);
-
-    /*  free the atomlist. */
-    afs_atomlist_destroy(al_mem_pool);
-
-    /* free the hashlist. */
-    afs_lhash_destroy(lh_mem_htab);
-
-    /* change the state so that the allocator is now uninitialized. */
-    allocator_init = 0;
-
+    if (allocator_init) {
+       /* iterate through all elements in the hash table and free both 
+        * the chunk and the atom associated with it.
+        */
+       afs_lhash_iter(lh_mem_htab, hash_free);
+
+       /*  free the atomlist. */
+       afs_atomlist_destroy(al_mem_pool);
+
+       /* free the hashlist. */
+       afs_lhash_destroy(lh_mem_htab);
+       
+       /* change the state so that the allocator is now uninitialized. */
+       allocator_init = 0;
+    }
     up(&afs_linux_alloc_sem);    
 }
 
index e5ce3dcb1f36012394195bba7a651f3f7204c26a..d1894e7901431df4be2a5c87a45702ef0da72928 100644 (file)
@@ -1164,10 +1164,34 @@ int afs_linux_readpage(struct file *fp, struct page *pp)
     return -code;
 }
 
-#ifdef NOTUSED
-/* afs_linux_writepage - is this used anywhere? swap files via nfs? */
-int afs_linux_writepage(struct inode *ip, struct page *) { return -EINVAL };
+#if defined(AFS_LINUX24_ENV)
+int afs_linux_writepage(struct file *file, struct page *page)
+{
+    struct dentry *dentry = file->f_dentry;
+    struct inode *inode = dentry->d_inode;
+    unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT;
+    unsigned offset = PAGE_CACHE_SIZE;
+    long status;
+    /* easy case */
+    if (page->index < end_index)
+       goto do_it;
+    /* things got complicated... */
+    offset = inode->i_size & (PAGE_CACHE_SIZE-1);
+    /* OK, are we completely out? */
+    if (page->index >= end_index+1 || !offset)
+       return -EIO;
+do_it:
+    status = afs_linux_updatepage(file, page, 0, offset, 1);
+    kunmap(page);
+    if (status == offset)
+       return 0;
+    else
+       return status;
+}
+#endif
 
+#ifdef NOTUSED
 /* afs_linux_bmap - supports generic_readpage, but we roll our own. */
 int afs_linux_bmap(struct inode *ip, int) { return -EINVAL; }
 
@@ -1292,6 +1316,7 @@ struct inode_operations afs_file_iops = {
 };
 struct address_space_operations afs_file_aops = {
         readpage: afs_linux_readpage,
+        writepage: afs_linux_writepage,
         commit_write: afs_linux_commit_write,
         prepare_write: afs_linux_prepare_write,
 };
index 343df6dc5f0bb3a0c555fbdcb055e3912fc6880f..40d72507b3ad6b6536d20ff66869c1dd003b8e3b 100644 (file)
@@ -54,7 +54,11 @@ int afs_mount(struct vfs *afsp, struct vnode *amvp, struct mounta *uap,
     return 0;
 }
 
+#if defined(AFS_SUN58_ENV)
+int afs_unmount (struct vfs *afsp, int flag, struct AFS_UCRED *credp)
+#else
 int afs_unmount (struct vfs *afsp, struct AFS_UCRED *credp)
+#endif
 {
     AFS_GLOCK();
     AFS_STATCNT(afs_unmount);
@@ -217,7 +221,10 @@ struct vfsops Afs_vfsops = {
     afs_sync,
     afs_vget,
     afs_mountroot,
-    afs_swapvp
+    afs_swapvp,
+#if defined(AFS_SUN58_ENV)
+    fs_freevfs,
+#endif
 };
 
 
index 1778c4050085bb1118a76df3ebedadfc0cbfb65e..c02fcfb03199330c6d407bc753412701e858403f 100644 (file)
@@ -637,6 +637,7 @@ tagain:
       /* actually a serious error, probably should panic. Probably will 
        * panic soon, oh well. */
       ReleaseReadLock(&afs_xvcache);
+      afs_warnuser("afs_DoBulkStat: VLRU empty!");
       goto done;
     }
     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
@@ -739,12 +740,15 @@ tagain:
           refpanic ("Bulkstat VLRU inconsistent6");
        ReleaseWriteLock(&afs_xvcache);
 
+       ObtainWriteLock(&afs_xcbhash, 494);
+
        /* We need to check the flags again. We may have missed
         * something while we were waiting for a lock.
         */
        if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
            flagIndex++;
            ReleaseWriteLock(&tvcp->lock);
+           ReleaseWriteLock(&afs_xcbhash);
            afs_PutVCache(tvcp);
            continue;
        }
@@ -761,19 +765,6 @@ tagain:
            tvcp->v.v_op = &afs_symlink_iops;
 #endif
 
-       ObtainWriteLock(&afs_xcbhash, 494);
-
-       /* We need to check the flags once more. We may have missed
-        * something while we were waiting for a lock.
-        */
-       if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
-           flagIndex++;
-           ReleaseWriteLock(&afs_xcbhash);
-           ReleaseWriteLock(&tvcp->lock);
-           afs_PutVCache(tvcp);
-           continue;
-       }
-
        /* do some accounting for bulk stats: mark this entry as
         * loaded, so we can tell if we use it before it gets
         * recycled.
index 505d58ba0c3a62ed5803a97110c1dc55fd69a271..4586e44741432e373eae3de41c22e22f51de97a1 100644 (file)
 #define _CODA_HEADER_
 struct coda_inode_info {};
 #endif
+#ifndef _LINUX_XFS_FS_I
+#define _LINUX_XFS_FS_I
+struct xfs_inode_info {};
+#endif
 #include "../h/fs.h"
 #include "../h/mm.h"
 #endif
index ef7320378a85f232067439e4726bfaefd75a45d7..fe5c9b5fc22bd06ff94056150af84653d6d9c562 100644 (file)
@@ -2421,6 +2421,8 @@ struct AFS_UCRED *acred;
     afs_int32 cell, volume;
 
     AFS_STATCNT(PFlushVolumeData);
+    if (!avc)
+       return EINVAL;
     if ( !afs_resourceinit_flag )      /* afs deamons havn't started yet */
        return EIO;          /* Inappropriate ioctl for device */
 
index d0b4cbdfa2292e62a7a64efc1139db4381548a80..02242073419e120567a8f21c95b24584a2658b3d 100644 (file)
@@ -27,6 +27,8 @@
 #define _LINUX_CODA_FS_I
 #define _CFS_HEADER_
 struct coda_inode_info {};
+#define _LINUX_XFS_FS_I
+struct xfs_inode_info {};
 #include <asm/uaccess.h>
 #include <linux/list.h>
 #include <linux/dcache.h>
index c7d3cd25994f0948a0c6323a287df5f074c4371f..6ea8484b773d9e64dad2efd1001f34be1a1d8ac4 100644 (file)
@@ -95,14 +95,14 @@ ${KERNELDIR}/afs/permit_xprt.h ../permit_xprt.h:
           perm_src=`pwd`/../xprt ; \
           echo "perm_src='$$perm_src'" ; \
           set -x ; \
-          ln -s $$perm_src/permit_export.h ${KERNELDIR}/afs/permit_xprt.h ; \
+          $(CP) $$perm_src/permit_export.h ${KERNELDIR}/afs/permit_xprt.h ; \
           ln -s $$perm_src/permit_xprt.h   ../permit_xprt.h ; \
        else \
           echo "CONFIG" ; \
           perm_src=`pwd` ; \
           echo "perm_src='$$perm_src'" ; \
           set -x ; \
-          ln -s $$perm_src/permit_xprt.h   ${KERNELDIR}/afs/permit_xprt.h ; \
+          $(CP) $$perm_src/permit_xprt.h   ${KERNELDIR}/afs/permit_xprt.h ; \
           ln -s $$perm_src/permit_xprt.h   ../permit_xprt.h ; \
        fi                   
 
index 7326e4f6f96ff7dc5c98e52daea27a246728087c..b818510117198c29a40e53c224960a967f3d7cba 100644 (file)
@@ -26,7 +26,7 @@
 #define AFS_GCPAGS             1       /* if nonzero, garbage collect PAGs */
 
 #define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
-#define        AFS_SYSCALL             101
+#define        AFS_SYSCALL             65
 
 /* File system entry (used if mount.h doesn't define MOUNT_AFS */
 #define AFS_MOUNT_AFS   "afs"
index e6c08d377546e73b2a11dbb501a7a49c4ec9cc5a..9de7672d4fd523a690a4966487c1f1906ff467b2 100644 (file)
@@ -20,7 +20,7 @@
 /*#define AFS_GLOBAL_SUNLOCK   1       /* For global locking */
 
 #define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
-#define        AFS_SYSCALL             101
+#define        AFS_SYSCALL             65
 
 /* File system entry (used if mount.h doesn't define MOUNT_AFS */
 #define AFS_MOUNT_AFS   1