From 086b47404f7c79acd95fea04684a6af6fb09df1a Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 14 Mar 2013 19:40:14 -0400 Subject: [PATCH] Windows: remove last bits of BIOD from Direct Store Direct I/O Store operations are performed directly against a memory buffer stored in the background direct store rock structure. There is no BIOD used in the current implementation. Remove the BIOD from the call stack. Change-Id: I78d7b898a6eec5eb39c943e760a678913b42bf0d Reviewed-on: http://gerrit.openafs.org/9607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_direct.c | 14 ++------------ src/WINNT/afsd/cm_direct.h | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/WINNT/afsd/cm_direct.c b/src/WINNT/afsd/cm_direct.c index 62b37c0..5b9d3a2 100644 --- a/src/WINNT/afsd/cm_direct.c +++ b/src/WINNT/afsd/cm_direct.c @@ -55,7 +55,6 @@ static afs_int32 int_DirectWrite( IN cm_scache_t *scp, - IN cm_bulkIO_t *biodp, IN osi_hyper_t *offsetp, IN afs_uint32 length, IN afs_uint32 flags, @@ -80,8 +79,6 @@ int_DirectWrite( IN cm_scache_t *scp, afs_uint32 written = 0; osi_assertx(userp != NULL, "null cm_user_t"); - osi_assertx(biodp != NULL, "null cm_bulkIO_t"); - osi_assertx(biodp->scp == scp, "cm_bulkIO_t.scp != scp"); memset(&volSync, 0, sizeof(volSync)); if (bytesWritten) @@ -325,7 +322,6 @@ cm_BkgDirectWriteDone( cm_scache_t *scp, void *vrockp, afs_int32 code) rock_BkgDirectWrite_t *rockp = ((rock_BkgDirectWrite_t *)vrockp); lock_ObtainWrite(&scp->rw); - cm_ReleaseBIOD(&rockp->biod, 1, code, 1); cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_STOREDATA_EXCL | CM_SCACHESYNC_ASYNCSTORE); lock_ReleaseWrite(&scp->rw); free(rockp->memoryRegion); @@ -340,15 +336,9 @@ cm_BkgDirectWrite( cm_scache_t *scp, void *vrockp, struct cm_user *userp, cm_req afs_uint32 bytesWritten; afs_int32 code; - /* - * Must fixup biod->reqp value since we are no longer running with the - * same stack as when the BIOD was created. - */ - rockp->biod.reqp = reqp; - osi_assertx(rockp->memoryRegion, "memoryRegion is NULL"); - code = int_DirectWrite(scp, &rockp->biod, &rockp->offset, rockp->length, + code = int_DirectWrite(scp, &rockp->offset, rockp->length, flags, userp, reqp, rockp->memoryRegion, &bytesWritten); @@ -373,7 +363,6 @@ cm_BkgDirectWrite( cm_scache_t *scp, void *vrockp, struct cm_user *userp, cm_req return code; } - /* * cm_SetupDirectStoreBIOD differs from cm_SetupStoreBIOD in that it * doesn't worry about whether or not the cm_buf_t is dirty or not. Nor @@ -391,6 +380,7 @@ cm_BkgDirectWrite( cm_scache_t *scp, void *vrockp, struct cm_user *userp, cm_req * is required so that buf_WaitIO synchronizes properly with the buffer as it * is being written out. * + * Not currently used but want to make sure the code does not rot. */ afs_int32 cm_SetupDirectStoreBIOD(cm_scache_t *scp, osi_hyper_t *inOffsetp, afs_uint32 inSize, diff --git a/src/WINNT/afsd/cm_direct.h b/src/WINNT/afsd/cm_direct.h index e6cc5db..c5936f6 100644 --- a/src/WINNT/afsd/cm_direct.h +++ b/src/WINNT/afsd/cm_direct.h @@ -57,7 +57,6 @@ typedef struct rock_BkgDirectWrite { afs_uint32 length; afs_uint32 bypass_cache; void * memoryRegion; - cm_bulkIO_t biod; /* bulk IO descriptor */ } rock_BkgDirectWrite_t; extern afs_int32 -- 1.9.4