[ENBD] can't restart the client after mkraid

Peter T. Breuer enbd@lists.community.tummy.com
Tue, 17 Jun 2003 13:16:11 +0200 (MET DST)


"Peter T. Breuer wrote:"
> "A month of sundays ago enbd@ttvenn.net wrote:"
> > newproto kernel errored 3 times when we asked for a new req: Bad file descriptor
> 
> 
> Well, we are simply not being given anything by the kernel. I suspect
> the kernel log will show what is being complained about (it's too hot
> here to think!).

Out of a mild interest and through the heat haze, I can dimly perceive
the following lines in get_req in the driver:

 if (!slot->file) {
        result = -EBADF;
        NBD_FAIL ("Our slot has been nofiled\n");
 }


which looks like your thing. Confirm by checking dmesg output.

If that's so, it's happened in clr_sock


     slot->file = NULL;

which probably was called when you killed the old client. I rather imagine
the new client has not succeeded in reristering with the kernel,
because it would ordinarily be set in set_sock:

    // PTB file has to be nonzero to indicate we're all set up. 
    // and in fact we set it to the group number plus 1
    slot->file = (void *) (unsigned long) (arg+1);

There are a slew of tests that set_sock goes through. I can't guess
what happened. Can you provide the kernel messages? I sort of imagine
that the set_sock was rejected because there was still a pid associated
with the slot, or some such thing. If so, you might try waiting two
minutes.


Peter