corruption with mtdblock

Nicolas Pitre nico at cam.org
Mon Nov 6 20:02:15 EST 2000



On Mon, 6 Nov 2000, David Woodhouse wrote:

> 
> nico at cam.org said:
> > On Mon, 6 Nov 2000, David Woodhouse wrote:
> > > OK. Upon prodding, it seems that I'd misunderstood beforehand. You
> > > _CAN_ sleep in a standard request function; you don't need to have a 
> > > kernel thread. 
> 
> > Are you certain of that?
> 
> > One place where the request function is called is within
> > generic_unplug_device() which is called through a task queue (see
> > blk_init_queue()).
> 
> I believe the tq_disk task queue is always run from process context. 

Hmmm...  Maybe.  However the code at many places where the tq_disk is run
seem to expect it is run asynchronously while some other places it is run
synchronously while sticking to a wait queue with the task state set to
TASK_UNINTERRUPTIBLE...  I'm afraid we could break something by suddenly
returning from run_task_queue() with the current process' state set to
TASK_RUNNING.

Anyway it doesn't explain the corruption problem.


Nicolas



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



More information about the linux-mtd mailing list