Add VINUM_SETSTATE_FORCE ioctl for diddling individual object states.

This is a repair tool which can also be used for panicing the system.
Use with utmost care if at all.
This commit is contained in:
Greg Lehey 1999-08-24 02:26:15 +00:00
parent 21c3b10bbc
commit 4fe498363c
2 changed files with 15 additions and 7 deletions

View File

@ -126,7 +126,7 @@ struct vinum_ioctl_msg {
#define VINUM_INITSD _IOW(L, 82, int) /* initialize a subdisk */
#define VINUM_REMOVE _IOWR(L, 83, struct vinum_ioctl_msg) /* remove an object */
#define VINUM_READPOL _IOWR(L, 84, struct vinum_ioctl_msg) /* set read policy */
/* 85 going begging */
#define VINUM_SETSTATE_FORCE _IOC(IOC_IN | IOC_OUT, L, 85, MAX_IOCTL_REPLY) /* diddle object state */
#define VINUM_RESETSTATS _IOWR(L, 86, struct vinum_ioctl_msg) /* reset object stats */
#define VINUM_ATTACH _IOWR(L, 87, struct vinum_ioctl_msg) /* attach an object */
#define VINUM_DETACH _IOWR(L, 88, struct vinum_ioctl_msg) /* remove an object */

View File

@ -220,6 +220,14 @@ vinumioctl(dev_t dev,
setstate((struct vinum_ioctl_msg *) data); /* set an object state */
return 0;
/*
* Set state by force, without changing
* anything else.
*/
case VINUM_SETSTATE_FORCE:
setstate_by_force((struct vinum_ioctl_msg *) data); /* set an object state */
return 0;
#ifdef VINUMDEBUG
case VINUM_MEMINFO:
vinum_meminfo(data);