Solved

Error Handling in Absolute Disk I/O

Posted on 2002-03-22
4
198 Views
Last Modified: 2013-11-20
hi all,
iam performing absolute disk i/o in vc++ using deviceiocontrol function issuing interrupt 25h ,26h
    VWIN32_DIOC_DOS_INT25 (2)  
    VWIN32_DIOC_DOS_INT26 (3)  
iam performing read write of 4k at a time i.e
in one read/write the noof sectors are 8.
my problem is, say iam writing from sector 200 to 208
in one write ,then there may be some sectors which are bad between 200 to 208.so, i want to know which particular sectors between 200 to 208 are bad.
i.e i want to know whether those bad sector numbers are being returned in the cpu registers and is there any way to know it.
U can reach me at cheekoti_vr@yahoo.com
any help in this regard is mostly appreciated.
thanks in advance.
 
0
Comment
Question by:cheekoti_ramana
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 6888096
You know that there was an error in your 8-sector read when the Carry Flag is set upon exit from the Int25 or Int26 call.

To find out which sector was bad, make eight calls -- one for each sector.  If seven of them succeed and one fails, well, I'll leave that to you to figure out.

-- Dan
0
 

Author Comment

by:cheekoti_ramana
ID: 6890337
hi dan,
thanks for ur comment.
i too thought of reading 8 sectors, but again reading 8 sectors individually will increase my read time. so i dropped that idea temporarily. any other solution is mostly appreciated.
thanku very much once again.
ramana
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 100 total points
ID: 6890525
>> but again reading 8 sectors individually will increase my read time

No it won't.  You have not thought it through.  

You will only need to make the eight individual reads if there was an error on the 8-sector read.  Such errors are EXTREMELY RARE and when they occur, the system will automatically reset the HDD controller and retry three times (a several second wait).  So it is not a problem.

-- Dan
0
 

Author Comment

by:cheekoti_ramana
ID: 6893188
thank u very much dan,
my id is cheekoti_vr@yahoo.com
i would like to talk to u, if u have time
u can give me ur mail id if u r interested.
thank u once again.
ramana
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
windows 10 how make picture as desktop background 2 66
pre4 challenge 19 110
FizzBuzz challenge 9 84
x-bar in Google Sheets 2 91
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question