00104 :
00105
00106 This routine signals a device driver that
it must sync redundant
00107 members of a mirror from
the primary member. This
is typically
00108 called after
the file system determines that a volume
is dirty.
00109
00110 Arguments:
00111
00112 TargetDevice - Supplies
the device to sync.
00113
00114 ByteOffset - If specified, gives
the location to start syncing
00115
00116 ByteCount - Gives
the byte count to sync. Ignored
if StartingOffset
00117 not specified.
00118
00119 Return Value:
00120
00121
NTSTATUS - The result of
the operation. This will be
00122 STATUS_INVALID_DEVICE_REQUEST
is the volume
is not a mirror.
00123
00124 --*/
00125
00126 {
00127
00128
#if 0 // Mike Glass says we no longer need to do this. 3/3/94
00129
00130
PIRP Irp;
00131
KEVENT Event;
00132 IO_STATUS_BLOCK Iosb;
00133
NTSTATUS Status;
00134 BOOLEAN RangeSpecified;
00135 FT_SYNC_INFORMATION SyncInfo;
00136
00137
KeInitializeEvent( &Event, NotificationEvent, FALSE );
00138
00139
00140
00141
00142
00143
if (ARGUMENT_PRESENT(ByteOffset)) {
00144
00145 SyncInfo.ByteOffset = *ByteOffset;
00146 SyncInfo.ByteCount = *ByteCount;
00147
00148 RangeSpecified =
TRUE;
00149
00150 }
else {
00151
00152 RangeSpecified =
FALSE;
00153 }
00154
00155
Irp =
IoBuildDeviceIoControlRequest( FT_SYNC_REDUNDANT_COPY,
00156 TargetDevice,
00157 RangeSpecified ? &SyncInfo : NULL,
00158 RangeSpecified ?
00159
sizeof(FT_SYNC_INFORMATION) : 0,
00160 NULL,
00161 0,
00162 FALSE,
00163 &Event,
00164 &Iosb );
00165
00166
if (
Irp ==
NULL ) {
00167
00168
return STATUS_INSUFFICIENT_RESOURCES;
00169 }
00170
00171
Status =
IoCallDriver( TargetDevice, Irp );
00172
00173
00174
if (
Status == STATUS_PENDING) {
00175
Status =
KeWaitForSingleObject( &Event,
00176 Executive,
00177 KernelMode,
00178 FALSE,
00179 NULL );
00180
00181
ASSERT( Status == STATUS_SUCCESS );
00182
00183
Status = Iosb.Status;
00184 }
00185
00186
return Status;
00187
#else
00188
return STATUS_SUCCESS;
00189
00190
#endif //0
00191
}