diff --git a/sys/dev/raid/vinum/vinumconfig.c b/sys/dev/raid/vinum/vinumconfig.c index 3b926f3..88eb7fa 100644 --- a/sys/dev/raid/vinum/vinumconfig.c +++ b/sys/dev/raid/vinum/vinumconfig.c @@ -957,6 +957,7 @@ config_drive(int update) throw_rude_remark(EINVAL, "Drive has no name\n"); driveno = find_drive(token[1], 1); /* allocate a drive to initialize */ drive = &DRIVE[driveno]; /* and get a pointer */ + kprintf("vinum[%s] drive %d drive %p - vnode is %p\n", __func__, driveno, drive, drive->vp); if (update && ((drive->flags & VF_NEWBORN) == 0)) /* this drive exists already */ return; /* don't do anything */ drive->flags &= ~VF_NEWBORN; /* no longer newly born */ diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index 14b5c19..766213b 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -64,14 +64,22 @@ open_drive(struct drive *drive, struct proc *p, int verbose) return EBUSY; dname = drive->devicename; + kprintf("vinum [%s]: rootdev %p\n", __func__, rootdev); if (rootdev) { /* * Open via filesystem (future) */ error = nlookup_init(&nd, drive->devicename, UIO_SYSSPACE, NLC_FOLLOW); - if (error) + if (error) { + kprintf("vinum [%s]: nlookup_init error %d\n", __func__, error); return error; + } error = vn_open(&nd, NULL, FREAD|FWRITE, 0); + if (error) { + kprintf("vinum [%s]: vn_open error %d\n", __func__, error); + nlookup_done(&nd); + return error; + } drive->vp = nd.nl_open_vp; nd.nl_open_vp = NULL; nlookup_done(&nd); @@ -175,9 +183,11 @@ init_drive(struct drive *drive, int verbose) if (drive->lasterror) return drive->lasterror; + kprintf("vinum [%s]: drive vnode tag %d - %p\n", __func__, drive->vp->v_tag, (*drive->vp->v_ops)->vop_ioctl); drive->lasterror = VOP_IOCTL(drive->vp, DIOCGPART, (caddr_t)&drive->partinfo, FREAD|FWRITE, proc0.p_ucred, NULL); + kprintf("vinum [%s]: after VOP_IOCTL error %d device %s\n", __func__, drive->lasterror, drive->devicename); if (drive->lasterror) { if (verbose) log(LOG_WARNING, @@ -187,6 +197,7 @@ init_drive(struct drive *drive, int verbose) close_drive(drive); return drive->lasterror; } + kprintf("vinum [%s]: fstype %s\n", __func__, (drive->partinfo.fstype == FS_VINUM) ? "vinum" : "not vinum"); if (drive->partinfo.fstype != FS_VINUM && !kuuid_is_vinum(&drive->partinfo.fstype_uuid) ) { @@ -327,7 +338,9 @@ read_drive_label(struct drive *drive, int verbose) int result; struct vinum_hdr *vhdr; + kprintf("vinum[%s]: vnode is %p\n", __func__, drive->vp); error = init_drive(drive, 0); /* find the drive */ + kprintf("vinum[%s]: vnode is %p error %d\n", __func__, drive->vp, error); if (error) /* find the drive */ return DL_CANT_OPEN; /* not ours */ diff --git a/sys/dev/raid/vinum/vinumioctl.c b/sys/dev/raid/vinum/vinumioctl.c index 2914774..06fdca2 100644 --- a/sys/dev/raid/vinum/vinumioctl.c +++ b/sys/dev/raid/vinum/vinumioctl.c @@ -77,6 +77,7 @@ vinumioctl(struct dev_ioctl_args *ap) int fe; /* free list element number */ struct _ioctl_reply *ioctl_reply; /* struct to return */ + kprintf("vinum[%s] ioctl called!\n", __func__); error = 0; /* First, decide what we're looking at */