Marco Gerards <[EMAIL PROTECTED]> 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. Thomas _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd