Source-Changes archive

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

Re: CVS commit: src

Dear Takashi,

On Thu, May 01, 2008 at 07:24:11AM +0900, YAMAMOTO Takashi wrote:
> > Log Message:
> > Add a BUFQ_CANCEL() next to BUFQ_PUT() and BUFQ_GET().
> > 
> > BUFQ_CANCEL(queue, element) removes the specified element previously queued
> > on the queue. It returns NULL if it was not found on the queue and the
> > element if it was successfully removed.
> > 
> > Run trough tech-kern and changed name from BUFQ_REVOKE() by suggestion of
> > Jason Thorpe.
> - what will use this?
> - why don't you use TAILQ_FOREACH?

To answer the first question, it'll be used for the upcomming UDF write 
code; it needs to do some advanced sheduling.

On of the UDF shedulers keeps a number of buffer queues that eventually 
will be queued to the dev's buffer queue. This bufq_cancel method will 
allow buffers to be moved between those queues. It could also be used for 
other uses say with softdep or other code that might need to cancel an 
allready sent out request on say a node deletion or whatever.

To answer the second question, no specific reason not to use the 
TAILQ_FOREACH other than that i tried to keep the code as close to the code 
that was there already to ease implementation and to reduce the risk of 
accidentally inserting bugs.

With regards,

Attachment: pgpabQzJh6hCB.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index