lkml.org 
[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.10-rc1-mm4
On Tue, Nov 09 2004, Jens Axboe wrote:
> On Tue, Nov 09 2004, Andrew Morton wrote:
> > Jens Axboe <axboe@suse.de> wrote:
> > >
> > > On Tue, Nov 09 2004, Andrew Morton wrote:
> > > > +blk_sync_queue-updates.patch
> > > >
> > > > update an update to the md updates
> > >
> > > I still don't think this is a good general export, it has very
> > > specialized use. For example, from the description it looks like this
> > > can be generally used on any block device and when it returns, we have
> > > synced the queue. This simply isn't true, there are absolutely no
> > > guarentees of that nature unless the block driver itself implements the
> > > __make_request() functionality and has taken proper precautions to
> > > prevent this already.
> >
> > True. So what do we do? Grit our teeth and move it into MD?
>
> That, or just comment it appropriately instead. Or, perhaps better, make

Here's a patch to just correct the comment. The md usage is safe because
it switches ->make_request_fn before syncing the queue and on second
thought it is a bit silly to add freeze/unfreeze functionality that no
one will use right now anyways. Alternatively, we could add this
functionality to the core so the interface would be

/* callers wait for unfreeze */
blk_freeze_queue(q, FREEZE_WAIT);

or

/* callers are io errored immediately */
blk_freeze_queue(q, FREEZE_END_IO);

which would work for both. I'll keep it in mind if such a use becomes
attractive, for now I think we should just correct the comment.

--- linux-2.6.10-rc1-mm4/drivers/block/ll_rw_blk.c~ 2004-11-10 17:23:36.166564568 +0100
+++ linux-2.6.10-rc1-mm4/drivers/block/ll_rw_blk.c 2004-11-10 17:24:41.139041569 +0100
@@ -1361,7 +1361,7 @@
EXPORT_SYMBOL(blk_stop_queue);

/**
- * blk_sync_queue - cancel any pending callbacks a queue
+ * blk_sync_queue - cancel any pending callbacks on a queue
* @q: the queue
*
* Description:
@@ -1369,7 +1369,9 @@
* on a queue, such as calling the unplug function after a timeout.
* A block device may call blk_sync_queue to ensure that any
* such activity is cancelled, thus allowing it to release resources
- * the the callbacks might use.
+ * the the callbacks might use. The caller must already have made sure
+ * that its ->make_request_fn will not re-add plugging prior to calling
+ * this function.
*
*/
void blk_sync_queue(struct request_queue *q)
--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.071 / U:13.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site