bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fatfs write support


From: Thomas Bushnell, BSG
Subject: Re: fatfs write support
Date: 07 Apr 2004 12:44:03 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Marco Gerards <metgerards@student.han.nl> writes:

> The problem here is that diskfs_nput is called from almost anywhere in
> both libdiskfs and the filesystem.  So it is impossible to make any
> assumption if the directory holding the node is locked or not.  I
> think everyone would agree that adding a flag to inform diskfs_nput is
> locked or not is insane. :)

One way is to make all node modifications fully synchronous.  That
would also require big changes in diskfs to preserve the directory
lock in (say) diskfs_chown until after the node is released.  So such
a solution sucks.

> In fatfs both the dir ent. and the inode are stored in the same
> (physical) location.  The problem with the current code is that the
> same node can be locked twice, once as directory entry and once as
> inode.

I am inclined to think that one solution here is to change the lock
structure.

Make the inode lock the *same* as the directory lock.  I think this
would actually require no changes at all to diskfs.

In other words, *drop* one lock, rather than adding one.

Thomas




reply via email to

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