Re: [PATCH] Proper block queue reference counting

From: Jeff Garzik (jgarzik@pobox.com)
Date: Thu Aug 07 2003 - 09:36:44 EST


I like the patch, but see two problems:

1) You convert drivers to dynamically allocated queues... who is freeing
the queues? unregister_blkdev? It's a bit non-obvious to say the
least, since you patches (for example, the first one, to stram.c)
obviously switch blk_init_queue to dynamically allocate a queue... but
you do not add code to remove the final reference in modprobe. The
standard driver-facing API dictates that the driver calls foo_put
itself, in the driver, rather than have it done implicitly.

2) the blk_init_queue really should change names, IMO. The other
subsystems in the kernel tend to use a "foo_alloc" or "alloc_foo"
pattern when creating new objects. blk_alloc_queue, or simply blk_alloc?

        Jeff

-
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/



This archive was generated by hypermail 2b29 : Thu Aug 07 2003 - 22:00:38 EST