[ENBD] /proc/nbdinfo

Peter T. Breuer enbd@lists.community.tummy.com
Sun, 24 Nov 2002 01:52:50 +0100 (MET)


"A month of sundays ago ptb wrote:"
> Can you try patching read_proc as follows?

And the same at top. Works for me in my simulation of overflowing page
size (tried with 10K).

    if (offset > 0 && !next_label) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
+       if (len <= 0)
            *eof = 1;
#endif
        *start = (char *) 0;
        NBD_DEBUG (2, "exited OK after 0 bytes requested, total %d\n",
total);
        return 0;
    }


I.e. make the thing less likely to set *eof = 1.

The changes should be finding their way into the current 2.4.30 archive
and then I will /definitely/ release and close it monday.

I'll start a small implementation of multiple servers in a new
development code tomorrow. Hopefully it will be a quickie.

Peter