[haiku-development] Re: BFS drivers for other systems?

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Feb 2011 14:44:27 +0100

On 2011-02-17 at 14:19:31 [+0100], Stephan Assmus <superstippi@xxxxxx> wrote:
> At FOSDM one interesting discussion developed on permissions and
> extended file attributes. Suppose (once Haiku is fully multi-user) user
> A is able to read/write a text file. User B can read/write the same
> file. Both might be using PE as their text editor of choice. Each one of
> them would get the view state of the text file restored when they open
> it in PE and see the state (scroll offset, selection) of the other user,
> when that user last opened the file.

This multi-user and Haiku issue had already been discussed long ago (probably 
multiple times). The simplest solution is to put only actual meta data into 
attributes (e.g. for audio files run length, genre, etc.), but store user 
settings in the user's settings directory (e.g. personal rating, if the files 
are shared).

> Gut feeling tells me one could
> construct similar "wrong" situations with regular file attributes like
> access time.

The access time is user agnostic.

> But it's certainly interesting to think about this, and it
> may just be the reason why other operation systems use extended
> attributes only for system level meta data, like access control lists.

I believe at least for Linux that has more likely to do with the fact that 
not all distributions used to enable xattr support by default (does Ubuntu 
nowadays?), so application developers couldn't really rely on it. Also, 
without query support attributes are only half as useful -- e.g. there's no 
point to expose mail header fields as attributes.

> Still, I wouldn't want to miss extended file attributes the way they are
> used in Haiku.

Well, we'll have to change a few things when we go multi-user (mainly moving 
settings out of the attributes), but the more interesting stuff will remain 
the same, I suppose.

CU, Ingo

Other related posts: