[Top][All Lists]

[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 15:52:15 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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

> > 1) Change diskfs to have a special "fatfs" option (perhaps called
> >    something like "diskfs_metadata_in_directories" or whatnot).  If
> >    the fatfs flag is set, then the directory must always be locked
> >    when diskfs_write_disknode is called.  This would require very
> >    careful work throughout diskfs.  When the nodes were just looked
> >    up, this requires only preserving the locks on the directories
> >    longer.  In other cases (say, file_chown), if the fatfs flag is set
> >    then diskfs would have to acquire the directory lock before locking
> >    the file, and then unlock both after the nput call is complete.
> >
> >    I believe this is the right strategy.  It does involve more pain,
> >    and risks the ire of lots of other people if diskfs gets mangled in
> >    the process.  But I do think this is the Right Thing.
> The main problem I am seeing here is that the caller of
> diskfs_write_disknode should lookup the directory.  For file_chown for
> example this would be hard to do, especially from within libdiskfs
> because it does not know how to lookup the directory the node is in.

Right.  There would need to be a callback from diskfs to fatfs
associated with this flag to acquire the lock.


reply via email to

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