Monolithic Storage Driver - Partition Creation Failure
- From: Drex <Drex@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Jul 2008 09:46:01 -0700
Using diskpart or the DM UI, initializing our drive fails to create a basic
disk (MBR style) intermittently.
This failure is timing sensitive and can change across reboots or even
insertion of benign dbg traceouts. We have a monolithic storage driver for
our device. We see the failure across all versions of Windows.
The following show's a failure case using the diskpart CLU. DISKPART> select
disk 1 Disk 1 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
The disk management services could not complete the operation.
*******
When using the DM UI, we get the following popup error message when trying
to init the disk - "The operation did not complete. Check the System Event
Log for more..." in the event log there is a entry saying the following:
"VDS fails to write boot code on a disk during clean operation. Error code:
57@02070006."
We have turned on debug msgs in the VDS driver and found the following trace
out when the partition creation fails:
LEAVE CBasicPack::FindDiskByNotificationHandle()
INFO: VDS(0X02040002): WM_DEVICECHANGE: wParam=32774 lParam=12385696
---->>>> ERROR: CVdsPack::ReadFile or WriteFile failed: 57 ENTER
CVdsCriticalSection::~CVdsCriticalSection()
TRACE: TMP: GUID_IO_VOLUME_MOUNT event received.
ENTER LogEvent() LEAVE CVdsCriticalSection::~CVdsCriticalSection()
INFO: WM_DEVICECHANGE: wParam=32774 lParam=14482848
ERROR: Event logged: C200000B
LEAVE CBasicProvider::OnDiskLayoutChange()
INFO: TMP: GUID_IO_VOLUME_MOUNT event received.
The 57 error code logged to the event log is the same error code returned by
the read/write failure shown above. We have verified that we are not
returning failure in any read/write request and that we are not corrupting
disk data. In fact, after a reboot, the disk seems to have been successfully
initialized, with the MBR data appearing to be correct. It appears to be some
timing interaction with two different threads when the partition is being
created. They are both from partmgr.
We have traced it to the following decision point in partmgr:
RtlDeleteElementGenericTableAvl
RtlLookupElementGenericTableFullAVL
signature = CheckSignature()
if (signature == successful) ---> calls PmWritePartitionTableEx gets
called and partition is created
if (signature != successful) ---> partition is NOT created
We have a very detailed Visio flow control document that shows the details
of a success versus a failure case that I would be happy to forward to anyone
interested in helping out.
Thanks for any help and/or ideas.
Drex
.
- Prev by Date: Re: W2K package resubmission
- Next by Date: Re: communicating with USB device
- Previous by thread: Corrupt virtual adapter device name on Vista
- Next by thread: Re: communicating with USB device
- Index(es):
Relevant Pages
|