Project

General

Profile

Actions

Bug #694

closed

UFS inode hash chain conversion to SLIST

Added by josepht over 17 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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

ufs_ihash.patch (4.46 KB) ufs_ihash.patch josepht, 06/13/2007 12:43 AM
Actions #1

Updated by dillon over 17 years ago

: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
Actions #2

Updated by tuxillo over 15 years ago

Is this going to be committed finally?

Actions #3

Updated by corecode over 15 years ago

I think we shouldn't.

Actions #4

Updated by dillon over 15 years ago

:Simon 'corecode' Schubert <> 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
&lt;&gt;
Actions

Also available in: Atom PDF