[Top][All Lists]

[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: Tue, 05 Aug 2003 20:07:25 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030714 Galeon/1.3.5 Debian/

Patch #1798 has been updated. 

Category: None
Status: Open
Summary: Fixes dir. dependancy and refcnt locking problem


Date: Tue 08/05/2003 at 23:23
By: marco_g

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

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.


For more info, visit:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]