I think the buffers should also invalidated in case of failure, as there may have been partial multi-sector writes despite failure is returned?!?
| 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:
| 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:
| 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.
I think the buffers should also invalidated in case of failure, as there may have been partial multi-sector writes despite failure is returned?!?
kernel/kernel/inthndlr.c
Lines 401 to 407 in 8535ddb
Interestingly, for INT25,26 the logic is negated: buffers only invalidated on failure:
kernel/kernel/inthndlr.c
Lines 1858 to 1866 in 8535ddb
Though there is a buffer invalidate a few lines above introduced by me:
kernel/kernel/inthndlr.c
Lines 1856 to 1857 in 8535ddb
but this contains an error by only invalidating the first buffer of a potential multi-sector write.