FBSD, DFBSD (future) call afs_FakeOpen in the write path
authorMatt Benjamin <matt@linuxbox.com>
Sun, 29 Aug 2010 01:57:38 +0000 (21:57 -0400)
committerDerrick Brashear <shadow@dementia.org>
Mon, 30 Aug 2010 00:17:23 +0000 (17:17 -0700)
Call afs_FakeOpen in the write path, even though nominally
it is AFS_VM_RDWR_ENV.

Change-Id: I6d24c9631f80058e3dd0d6f284ca7792253ceaaa
Reviewed-on: http://gerrit.openafs.org/2623
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/VNOPS/afs_vnop_write.c
src/config/param.i386_dfbsd_23.h
src/config/param.i386_fbsd_70.h
src/config/param.i386_fbsd_71.h
src/config/param.i386_fbsd_80.h
src/config/param.i386_fbsd_81.h
src/config/param.i386_fbsd_90.h

index 9d582f0..c0672e8 100644 (file)
@@ -185,7 +185,7 @@ afs_MemWrite(struct vcache *avc, struct uio *auio, int aio,
        return (EFBIG);
     }
 #endif
-#ifdef AFS_VM_RDWR_ENV
+#if defined(AFS_VM_RDWR_ENV) && !defined(AFS_FAKEOPEN_ENV)
     /*
      * If write is implemented via VM, afs_FakeOpen() is called from the
      * high-level write op.
@@ -292,7 +292,7 @@ afs_MemWrite(struct vcache *avc, struct uio *auio, int aio,
        }
 #endif
     }
-#ifndef        AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_FAKEOPEN_ENV)
     afs_FakeClose(avc, acred);
 #endif
     if (error && !avc->vc_error)
@@ -406,7 +406,7 @@ afs_UFSWrite(struct vcache *avc, struct uio *auio, int aio,
        return (EFBIG);
     }
 #endif
-#ifdef AFS_VM_RDWR_ENV
+#if defined(AFS_VM_RDWR_ENV) && !defined(AFS_FAKEOPEN_ENV)
     /*
      * If write is implemented via VM, afs_FakeOpen() is called from the
      * high-level write op.
@@ -601,7 +601,7 @@ afs_UFSWrite(struct vcache *avc, struct uio *auio, int aio,
        }
 #endif
     }
-#ifndef        AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_FAKEOPEN_ENV)
     afs_FakeClose(avc, acred);
 #endif
     error = afs_CheckCode(error, &treq, 7);
index 677ef8f..dd8283a 100644 (file)
@@ -9,6 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 
 #ifndef UKERNEL
index b624759..ba22cf4 100644 (file)
@@ -9,7 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
-
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 #ifndef UKERNEL
 /* This section for kernel libafs compiles only */
index 7bd6b60..664d70a 100644 (file)
@@ -9,6 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 
 #ifndef UKERNEL
index 002db22..8128275 100644 (file)
@@ -9,6 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 
 #ifndef UKERNEL
index cf62adc..b2469a7 100644 (file)
@@ -9,6 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 
 #ifndef UKERNEL
index 28a38eb..46fd404 100644 (file)
@@ -9,6 +9,7 @@
 #define AFS_HAVE_FFS        1  /* Use system's ffs. */
 #define AFS_HAVE_STATVFS    1  /* System doesn't support statvfs */
 #define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV    1   /* call afs_FakeOpen as if !AFS_VM_RDWR */
 
 
 #ifndef UKERNEL