Re: [PATCH md 3 of 4] Delete unplug timer before shutting down md array.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Neil Brown <neilb@xxxxxxxxxxxxxxx> wrote:
>
> On Friday November 5, axboe@xxxxxxx wrote:
> > On Thu, Nov 04 2004, Jens Axboe wrote:
> > > On Wed, Nov 03 2004, Andrew Morton wrote:
> > > > NeilBrown <neilb@xxxxxxxxxxxxxxx> wrote:
> > > > >
> > > > > As the unplug timer can potentially fire at any time, and
> > > > > and it access data that is released by the md ->stop function,
> > > > > we need to del_timer_sync before releasing that data.
> > > > 
> > > > I don't think I saw an update to this patch so I just knocked up the below
> > > > simple conversion.  If anyone can think up a nice description of what
> > > > blk_sync_queue() should do, it would be appreciated ;)
> > > 
> > > I don't see much merrit in this patch, you have to prevent new requests
> > > from setting it off again. Basically, from my understanding, Neil needs
> > > a way to atomically kill the timer and the unplug function. Correct?
> > 
> > Actually, with the online io scheduler switching we have a way to do
> > this already:
> > 
> > 	blk_wait_queue_drained(q, 1);
> > 	blk_sync_queue(q);
> > 
> 
> I couldn't find blk_sync_queue in 2.6.10-rc1-mm2 ....

I added it in -mm3 to replace all the open-coded del_timer_sync()s.

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm3/broken-out/md-delete-unplug-timer-before-shutting-down-md-array-cleanup.patch

> > 
> > Would this work for you, Neil?
> 
> I need it to do:
> 	del_timer_sync(&q->unplug_timer);
> 	kblockd_flush();
> 
> (I now realise that the patch I started with wasn't enough, as
> kblockd_flush is needed as well).
> 
> Anything that I can that eventually does that should be OK.
> 

We should be able to stick all the above inside block_sync_queue()
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux