corruption with mtdblock

David Woodhouse dwmw2 at infradead.org
Mon Nov 6 09:47:45 EST 2000


nico at cam.org said:
>  So in our case, q->head_active is 1 by default.
> Looking at __make_request() you can see the head of the queue is
> actually skipped when the queue is unplugged.  It is plugged only when
> actually empty and no request are processed until it gets unplugged
> again.  All this is done when io_request_lock is held.  That's why I
> came to the conclusion that requests don't have to be removed earlier.
> 

OK. How about 'plugging'?

The code looks like this...

        /*
         * skip first entry, for devices with active queue head
         */
        if (q->head_active && !q->plugged)
                head = head->next;


It may be that if our request function returns without first ending the 
request (as it does, because all it does is a wake_up()), the queue is 
'plugged' to wait for requests to be merged. 

Then the kernel thread is proceeding to deal with the requests while the 
ll_rw_blk code thinks that the driver's request function isn't running.

I'll see if I can find someone to explain the plugging stuff to me :)

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list