Revert r340187, it breaks EOD (end-of-device) detection logic. Turns out,

i/o into last_sector+N is handled differently for N==1 and N>1 cases to
accomodate that, so some other approach would be needed to fix DIOCGDELETE
ioctl(2).
This commit is contained in:
Maxim Sobolev 2018-11-07 16:28:09 +00:00
parent 57fe7128b7
commit de66da7374

View File

@ -420,8 +420,6 @@ g_io_check(struct bio *bp)
return (EIO);
if (bp->bio_offset > pp->mediasize)
return (EIO);
if (bp->bio_offset == pp->mediasize && bp->bio_length > 0)
return (EIO);
/* Truncate requests to the end of providers media. */
excess = bp->bio_offset + bp->bio_length;