[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #1798] [Patch #1798] Fixes dir. dependancy and refcnt locking pro
From: |
noreply |
Subject: |
[patch #1798] [Patch #1798] Fixes dir. dependancy and refcnt locking problem |
Date: |
Wed, 06 Aug 2003 17:48:31 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686) Gecko/20030714 Galeon/1.3.5 Debian/1.3.5.20030714-2 |
Patch #1798 has been updated.
Project:
Category: None
Status: Closed
Summary: Fixes dir. dependancy and refcnt locking problem
Follow-Ups:
Date: Tue 08/05/2003 at 23:23
By: marco_g
Comment:
This patch fixes Task #2489: "diskfs_node_refcnt_lock can be locked while
write_node tries to lock it."
Fatfs depends a lot on the directory of a file. It is opened every time when it
reads from or writes to a file. This effect is recursively. It slows down fatfs
and introduces some problems like this locking problem.
I fixed this by adding a dependency to the directory for all opened files and I
let every file hold a reference to that directory. Now fatfs consumes a bit
more memory but that is much better than the currect situation because looking
up the directory chain not only uses much memory but also much CPU time.
-------------------------------------------------------
Date: Wed 08/06/2003 at 02:07
By: marcus
Comment:
This is definitely a better way to do it, but I have a couple of questions, and
some nitpicks.
First the easy stuff: After a full stop, there are two spaces,
not one. Like this. See? :)
Then, please always write good comments when marking code with
XXX. Just having "return; /* XXX */" is unhelpful, and I
would happily make a bet on that you will forget what it
meant in half a year.
Then, why is dirnode not filled in by diskfs_cached_lookup
when called from diskfs_alloc_node? I must be missing
something, because it seems to me that it is indeed set up.
That's the only potential issue I could spot. If that is
resolved, I think it can go in if you have tested it.
-------------------------------------------------------
Date: Wed 08/06/2003 at 23:12
By: marco_g
Comment:
Ok, I will add more info to the "XXX" stuff.
The diskfs_alloc_node function completely sucks. This needs careful
investigation, I want to do that in a seperate patch. (After all locking issues
are fixed).
-------------------------------------------------------
Date: Wed 08/06/2003 at 23:48
By: marcus
Comment:
Ok, I checked it in, with a bit of changes to read_node and diskfs_alloc_node
to make the hack there more clear.
Thanks!
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://savannah.gnu.org/patch/?func=detailpatch&patch_id=1798&group_id=30
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/