linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>, linux-raid@vger.kernel.org
Subject: Re: [PATCH md 3 of 4] Delete unplug timer before shutting down md array.
Date: Mon, 8 Nov 2004 12:23:03 +0100	[thread overview]
Message-ID: <20041108112302.GJ29120@suse.de> (raw)
In-Reply-To: <20041107154223.0900c37f.akpm@osdl.org>

On Sun, Nov 07 2004, Andrew Morton wrote:
> Neil Brown <neilb@cse.unsw.edu.au> wrote:
> >
> > On Friday November 5, axboe@suse.de wrote:
> > > On Thu, Nov 04 2004, Jens Axboe wrote:
> > > > On Wed, Nov 03 2004, Andrew Morton wrote:
> > > > > NeilBrown <neilb@cse.unsw.edu.au> 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

I seem to be missing Neils reply, this is the first I see of it.
Strange.

> > > 
> > > Would this work for you, Neil?
> > 
> > I need it to do:
> > 	del_timer_sync(&q->unplug_timer);
> > 	kblockd_flush();

blk_sync_queue() should do both. I'm unsure of whether we should wrap
blk_wait_queue_drained() and that into a seperate helper. There needs to
be an unfreeze as well, of course. Perhaps blk_freeze_queue() and
blk_unfreeze_queue()?

-- 
Jens Axboe


  parent reply	other threads:[~2004-11-08 11:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-02  3:37 [PATCH md 0 of 4] Introduction NeilBrown
2004-11-02  3:37 ` [PATCH md 4 of 4] "Faulty" personality of md NeilBrown
2004-11-02  9:31   ` Lars Marowsky-Bree
2004-11-02 23:30     ` Neil Brown
2004-11-02  3:37 ` [PATCH md 3 of 4] Delete unplug timer before shutting down md array NeilBrown
2004-11-02  4:57   ` Andrew Morton
2004-11-02  5:00     ` Andrew Morton
2004-11-02  4:28       ` Neil Brown
2004-11-02  5:33         ` Andrew Morton
2004-11-02  7:12           ` Luca Berra
2004-11-03  0:29             ` Neil Brown
2004-11-03 23:03   ` Andrew Morton
2004-11-04  9:21     ` Jens Axboe
2004-11-05  8:52       ` Jens Axboe
2004-11-07 23:38         ` Neil Brown
2004-11-07 23:42           ` Andrew Morton
2004-11-08  1:21             ` Neil Brown
2004-11-08 11:23             ` Jens Axboe [this message]
2004-11-02  3:37 ` [PATCH md 2 of 4] Fix raid6 problem NeilBrown
2004-11-02  3:37 ` [PATCH md 1 of 4] Fix problem with md/linear for devices larger than 2 terabytes NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041108112302.GJ29120@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).