Solved

Error Handling in Absolute Disk I/O

Posted on 2002-03-22
4
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
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.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

688 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