Solved

Error Handling in Absolute Disk I/O

Posted on 2002-03-22
4
193 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
Comment Utility
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
Comment Utility
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
Comment Utility
>> 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 73
EvenOdd challenge 10 83
matchUp  challenge 9 71
Detect file exist or not 3 76
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 …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

18 Experts available now in Live!

Get 1:1 Help Now