From: Matt Benjamin Date: Sun, 29 Aug 2010 01:57:38 +0000 (-0400) Subject: FBSD, DFBSD (future) call afs_FakeOpen in the write path X-Git-Tag: openafs-devel-1_5_77~31 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=bcdd4fb476d9024de15d31da913aefe02ca3e88f;p=packages%2Fo%2Fopenafs.git FBSD, DFBSD (future) call afs_FakeOpen in the write path 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 Tested-by: Derrick Brashear (cherry picked from commit b727c1e748042e46f2a566725359fed0dd8a8f4f) Reviewed-on: http://gerrit.openafs.org/2682 --- diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 9d582f0ce..c0672e83d 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -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); diff --git a/src/config/param.i386_dfbsd_23.h b/src/config/param.i386_dfbsd_23.h index 677ef8f0c..dd8283af2 100644 --- a/src/config/param.i386_dfbsd_23.h +++ b/src/config/param.i386_dfbsd_23.h @@ -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 diff --git a/src/config/param.i386_fbsd_70.h b/src/config/param.i386_fbsd_70.h index b62475932..ba22cf48c 100644 --- a/src/config/param.i386_fbsd_70.h +++ b/src/config/param.i386_fbsd_70.h @@ -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 */ diff --git a/src/config/param.i386_fbsd_71.h b/src/config/param.i386_fbsd_71.h index 7bd6b60aa..664d70ae0 100644 --- a/src/config/param.i386_fbsd_71.h +++ b/src/config/param.i386_fbsd_71.h @@ -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 diff --git a/src/config/param.i386_fbsd_80.h b/src/config/param.i386_fbsd_80.h index 002db22e6..812827551 100644 --- a/src/config/param.i386_fbsd_80.h +++ b/src/config/param.i386_fbsd_80.h @@ -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 diff --git a/src/config/param.i386_fbsd_81.h b/src/config/param.i386_fbsd_81.h index cf62adc9e..b2469a7c3 100644 --- a/src/config/param.i386_fbsd_81.h +++ b/src/config/param.i386_fbsd_81.h @@ -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 diff --git a/src/config/param.i386_fbsd_90.h b/src/config/param.i386_fbsd_90.h index 28a38eb4f..46fd4047f 100644 --- a/src/config/param.i386_fbsd_90.h +++ b/src/config/param.i386_fbsd_90.h @@ -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