[ENBD] 2.4.32

Peter T. Breuer ptb at it.uc3m.es
Thu Feb 5 10:30:50 MST 2004


"Also sprach Peter T. Breuer:"
> Anyway .. what to conclude? Yes, you have sector-aligned writes. What
> should one do? They even come in groups of three! One can't guarantee

I think now that that is an artifact of the printout. PERR is set to
only show the first 3 errors out of every 100, to cut down on excess
noise.

Oh well - at least I can still detect the pattern, even if I can't
remember it!

xfs is producing 512B requests aligned on 512B.

I suspect that it may also be using the "special request" mechanism in
the 2.6 kernel. Is there any noise mentioning "SPECIAL" in the kernel
log for the client?

Can you mosey on down to do_enbd_request in enbd_base.c, and make it
make some noise when it receives a "special".

                if (req->flags & REQ_SPECIAL) {
                        // PTB temporary successful end here for SPECIALS
-
+                       ENBD_ALERT("special req rcvd, sector %d, len %d\n",
+                              req->sector, req->nr_sectors << 9);
                        // PTB we want to attach it to the device and ack later
                       enbd_enqueue (lo, req);
                        // PTB block further reqs until these have drained
                        write_lock(&lo->altqueue_lock);
                        // PTB do not touch this flag without this lock
                        if (atomic_read(&lo->countq[READ])
                          + atomic_read(&lo->countq[WRITE]) > 0) {
                            atomic_set_mask(ENBD_QBLOCKED, &lo->flags);
                        }
                        write_unlock(&lo->altqueue_lock);
                       goto accounting;
                }

When we get a special, the driver is supposed to flush all earlier
requests. I have had no opportunity to test this theory!

The enbd_driver does some kind of bodge/hack on receiving a special.
In particular it sets the QBLOCKED flag. While that flag is set it
diverts all incoming requests to an alternate queue. When it thinks
that all existing requests have been dealt with, it moves the requests
that have come in in the meantime onto the right queue and unsets
the flag. But its method of telling when all existing request have
been dealt with may be a bit suspect, or even off by one. I rather
suspect something of the kind - I was not expecting/hoping not to
have to deal with specials in reality. Let's see if we are getting
some.

Peter


More information about the ENBD mailing list