-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
I think the buffers should also invalidated in case of failure, as there may have been partial multi-sector writes despite failure is returned?!?
Lines 401 to 407 in 8535ddb
| r->AX = | |
| dskxfer(r->DL - 1, SectorBlock->blkno, SectorBlock->buf, | |
| SectorBlock->nblks, mode); | |
| if (mode == DSKWRITEINT26) | |
| if (r->AX == 0) | |
| setinvld(r->DL - 1); |
Interestingly, for INT25,26 the logic is negated: buffers only invalidated on failure:
Lines 1858 to 1866 in 8535ddb
| r->ax = dskxfer(drv, blkno, buf, nblks, mode); | |
| CLEAR_CARRY_FLAG(); | |
| if (r->ax != 0) | |
| { | |
| SET_CARRY_FLAG(); | |
| if (mode == DSKWRITEINT26) | |
| setinvld(drv); | |
| } |
Though there is a buffer invalidate a few lines above introduced by me:
Lines 1856 to 1857 in 8535ddb
| if (mode == DSKWRITEINT26) | |
| DeleteBlockInBufferCache(blkno, blkno, drv, XFR_WRITE); |
but this contains an error by only invalidating the first buffer of a potential multi-sector write.
Metadata
Metadata
Assignees
Labels
No labels