Solved

Error Handling in Absolute Disk I/O

Posted on 2002-03-22
4
194 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now