mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Look for disk devices rather than bdevs.
Approved by: grog
This commit is contained in:
parent
a5aa0913bd
commit
b9fcd4a616
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54506
@ -76,13 +76,13 @@ open_drive(struct drive *drive, struct proc *p, int verbose)
|
|||||||
drive->devicename,
|
drive->devicename,
|
||||||
drive->vp->v_usecount);
|
drive->vp->v_usecount);
|
||||||
}
|
}
|
||||||
if (drive->vp->v_type != VBLK) { /* only consider block devices */
|
if (!vn_isdisk(drive->vp)) { /* only consider block devices */
|
||||||
VOP_UNLOCK(drive->vp, 0, drive->p);
|
VOP_UNLOCK(drive->vp, 0, drive->p);
|
||||||
close_drive(drive);
|
close_drive(drive);
|
||||||
drive->lasterror = ENOTBLK;
|
drive->lasterror = ENOTBLK;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
log(LOG_WARNING,
|
log(LOG_WARNING,
|
||||||
"vinum open_drive %s: Not a block device\n",
|
"vinum open_drive %s: Not a disk device\n",
|
||||||
drive->devicename);
|
drive->devicename);
|
||||||
return ENOTBLK;
|
return ENOTBLK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user