Bug #694
closed
UFS inode hash chain conversion to SLIST
Added by josepht over 17 years ago.
Updated about 15 years ago.
Description
The attached patch is my attempt to convert the i_next field in struct
inode to an SLIST. I'm not sure if I handled the initialization
correctly or if I handled the ilast part of ufs_ihashins() correctly.
It seems to me that a STAILQ may be a better choice since it seems
like all insertions are done on the tail of the list (queue).
Comments are welcome.
Thanks,
Joe
Files
:The attached patch is my attempt to convert the i_next field in struct
:inode to an SLIST. I'm not sure if I handled the initialization
:correctly or if I handled the ilast part of ufs_ihashins() correctly.
:It seems to me that a STAILQ may be a better choice since it seems
:like all insertions are done on the tail of the list (queue).
:Comments are welcome.
:
:Thanks,
:Joe
Well, there's no reason to kmalloc() little slist header chunks and
assign them to ihashtbl. Just make ihashtbl an array of slist headers.
But, apart from that, an SLIST is not a good idea here, because
deletions rescan the list (look at the mess SLIST_REMOVE() does in
sys/queue.h). A TAILQ would work ok, but I don't think there's a big
enough reason to change the code to a TAILQ when the manual singly linked
list works just fine.
-Matt
Is this going to be committed finally?
:Simon 'corecode' Schubert <corecode@fs.ei.tum.de> added the comment:
:
:I think we shouldn't.
I agree. There's no need to do it. It doesn't make UFS work any
better or worse.
-Matt
Matthew Dillon
<dillon@backplane.com>
Also available in: Atom
PDF