• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Error Handling in Absolute Disk I/O

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
cheekoti_ramana
Asked:
cheekoti_ramana
  • 2
  • 2
1 Solution
 
DanRollinsCommented:
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
 
cheekoti_ramanaAuthor Commented:
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
 
DanRollinsCommented:
>> 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
 
cheekoti_ramanaAuthor Commented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now