mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
Windows: refactor AFSCleanupFcb
move the checks for deleted and invalid files earlier in the function to simplify other conditional tests. Change-Id: I973f411b65c0327227f07718ae764572d6f37c85 Reviewed-on: http://gerrit.openafs.org/7317 Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
23bec3fe9f
commit
ba8e60d70a
@ -7050,10 +7050,19 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
|
||||
// First up are there dirty extents in the cache to flush?
|
||||
//
|
||||
|
||||
if( ForceFlush ||
|
||||
( !BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_OBJECT_INVALID) &&
|
||||
!BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_DELETED) &&
|
||||
( Fcb->Specific.File.ExtentsDirtyCount ||
|
||||
if( BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_OBJECT_INVALID) ||
|
||||
BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_DELETED))
|
||||
{
|
||||
|
||||
//
|
||||
// The file has been marked as invalid. Dump it
|
||||
//
|
||||
|
||||
AFSTearDownFcbExtents( Fcb,
|
||||
NULL);
|
||||
}
|
||||
else if( ForceFlush ||
|
||||
( ( Fcb->Specific.File.ExtentsDirtyCount ||
|
||||
Fcb->Specific.File.ExtentCount) &&
|
||||
(liTime.QuadPart - Fcb->Specific.File.LastServerFlush.QuadPart)
|
||||
>= pControlDeviceExt->Specific.Control.FcbFlushTimeCount.QuadPart))
|
||||
@ -7067,17 +7076,6 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
else if( BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_OBJECT_INVALID) ||
|
||||
BooleanFlagOn( Fcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_DELETED))
|
||||
{
|
||||
|
||||
//
|
||||
// The file has been marked as invalid. Dump it
|
||||
//
|
||||
|
||||
AFSTearDownFcbExtents( Fcb,
|
||||
NULL);
|
||||
}
|
||||
|
||||
//
|
||||
// If there are extents and they haven't been used recently *and*
|
||||
|
Loading…
Reference in New Issue
Block a user