[ENBD] fixup_slot failed to find slot....

Peter T. Breuer ptb at inv.it.uc3m.es
Thu Mar 9 17:06:09 MST 2006


"Also sprach Peter T. Breuer:"
> "Also sprach scunacc:"
> > In /var/log/messages I get:
> > 
> > Mar  9 13:17:48 localhost kernel: ENBD #3931[2]: fixup_slot failed to
> > find slot for pid 4151 ioctl MY_NBD_SET_SIG arg (user 776f6562) in user
> > addr fef468d0
> 
> If you want to see the standard continuation from there, it goes:

And if you want an explanation ...

It's part of a mechanism for locating which daemon (in charge of which
slot) is currently talking to the kernel. The slot number is in the
first 4 bytes of the data passed via the ioctl. The message says that
when the daemon tried to set the signature on the device, no daemon
had yet been assigned to a slot (which is not surprising) and the ioctl
call thus neither contained a valid slot id nor corresponded to the pid
registered for a slot (since there is none at that time) nor
corresponded to the pid registered for the slot id carried in the ioctl
(which didn't exist).

The call to the function to figure out which daemon is calling in to
the kernel is done before the switch statement for the various ioctl
kinds in the ioctl trestment, so it's inevitable that it will report
an error at this early stage, but harmless. The ioctl will go on to be
handled OK, being passed an arg that indicates that it needs to set the
signature for the whole device right now.

          case MY_NBD_SET_SIG:
                if (islot < 0) {
                    ^^^^^^^^^^ no slot found bound to the calling daemon
                        int sigbuf[(ENBD_SIGLEN + sizeof(int) -1)/sizeof(int)];
                        if (copy_from_user((char *)sigbuf, (char *)arg, ENBD_SIG
LEN)) {
                                ENBD_ERROR("could not copy sig from user\n");
                                return -EFAULT;
                        }
                        err = enbd_set_sig (lo, sigbuf);
                                            ^^ set sig on whole device.
                        return err;
                }
                err = my_nbd_set_sig (slot, (int *) arg);
                                      ^^ else merely check sig, slot known.
                return err;
Peter


More information about the ENBD mailing list