From 1e9af84eed2db25e60e4168f0647c05a02994aba Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 20 Sep 2001 06:10:38 +0000 Subject: [PATCH] STABLE12-undo-linux-call-afs-dopartialwrite-20010920 scrap this approach (cherry picked from commit 9d50b935e36ef7831f5172f1ac8c8dee52d61710) --- configure-libafs.in | 2 +- configure.in | 2 +- doc/txt/RELNOTES-1.2.1 | 8 ++++---- src/afs/LINUX/osi_vnodeops.c | 4 ++++ src/afs/VNOPS/afs_vnop_write.c | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/configure-libafs.in b/configure-libafs.in index 20593a47f3..af5bb9d3a7 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -1,5 +1,5 @@ AC_INIT(Makefile.common) -AM_INIT_AUTOMAKE(openafs-libafs,1.2.0) +AM_INIT_AUTOMAKE(openafs-libafs,1.2.1) AC_CANONICAL_HOST AC_CONFIG_HEADER(config/afsconfig.h) diff --git a/configure.in b/configure.in index a4b9215d1b..bfe164be19 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(src/config/stds.h) -AM_INIT_AUTOMAKE(openafs,1.2.0) +AM_INIT_AUTOMAKE(openafs,1.2.1) AC_CANONICAL_HOST AC_CONFIG_HEADER(src/config/afsconfig.h) diff --git a/doc/txt/RELNOTES-1.2.1 b/doc/txt/RELNOTES-1.2.1 index 42f17e6c6a..4b0839c14c 100644 --- a/doc/txt/RELNOTES-1.2.1 +++ b/doc/txt/RELNOTES-1.2.1 @@ -20,10 +20,10 @@ All systems: Linux: - All Linux versions have a bug fix to make writes of files larger than - the AFS client cache work in all cases while preserving fixes which - prevent some writes from succeeding or failing (including cases where - a file write to an over-quota volume is being attempted, a problem - affecting all OpenAFS versions since release from IBM). + the AFS client cache work. This undoes a fix which attempted to correct + a problem where some writes neither succeeded nor failed + (including cases where a file write to an over-quota volume is being + attempted, a problem affecting all OpenAFS versions since release from IBM). - Linux 2.2 PowerPC should install correctly again Digital UNIX: diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 48895106ed..1227272bfb 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -134,6 +134,10 @@ static ssize_t afs_linux_write(struct file *fp, const char *buf, size_t count, ObtainWriteLock(&vcp->lock, 530); vcp->m.Date = osi_Time(); /* set modification time */ afs_FakeClose(vcp, credp); + if (code>=0) + code2 = afs_DoPartialWrite(vcp, &treq); + if (code2 && code >=0) + code = (ssize_t) -code2; ReleaseWriteLock(&vcp->lock); afs_Trace4(afs_iclSetp, CM_TRACE_WRITEOP, ICL_TYPE_POINTER, vcp, diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 8f6789fe16..55ad6f1fdc 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -280,7 +280,7 @@ afs_MemWrite(avc, auio, aio, acred, noLock) if (filePos > avc->m.Length) avc->m.Length = filePos; #endif -#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV)) +#ifndef AFS_VM_RDWR_ENV /* * If write is implemented via VM, afs_DoPartialWrite() is called from * the high-level write op.