Re: [GNOME VFS] Re: Daemons [Was: gob inside gnome-vfs ...]



On 27Jun2002 07:52PM (-0700), Seth Nickell wrote:
> 
> I still don't see how this is different from any other file in the
> system, presuming we store metadata as a file. 

It's different because most other files are changed atomically as a
unit (for example, saving text in a text editor), but frequently
multiple programs want to change different metadata keys for the same
file, and this will often 

> Now it'd be one thing if we stored all the metadata in a single
> file, but if we are storing metadata as a per-file thing on the
> filesystem anyway...

It's actually stored as a per-directory thing now, although you could
change that choice.

> 
> Now I can understand a potential problem with locking metadata across a
> single process, as program using GnomeVFS async might conceivably be
> performing a few operations on the file at the same time.
> 

The real actual non-theoretical bug we ran into in Nautilus happened
when the main Nautilus binary and one of the sidebar panels (notes)
both tried to change the metadata file at similar times. The delayed
writeback of metadata meant that one set of changes often got lost,
leading to loss of real user data (the note about the file).

This was what convinced us that we needed a metadata server. What
would your solution to this problem be?

> But the problem of multiple processes interacting over a single file
> seems, to me, to be the same as the problem (and liklihood) of having
> two programs modifying Document.abw or File.txt or whatever at the same
> time.

However, when you save file.txt you typically expect to get those
exact contents in the file, you don't expect changes to be merged. But
it is reasonably to expect different metadata keys for the same file
to be changeable independently without losing either change.

The metadata for a file is more like a directory than like a file. If
two different programs add an entry to a directory at the same time,
it would clearly be wrong if only one of the files actually appeared
in the directory, right?

I see setting metadata keys the same way.

Regards,

Maciej




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