[haiku-development] Re: Entry rename and queries

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 20:20:39 +0100

On 2009-11-23 at 19:42:56 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > > Wouldn't adding another type of event (like B_ENTRY_MOVED) for
> > > queries
> > > make sense?
> > That could be done, yes. A notify_query_entry_moved() would need to be
> > added
> > and all file systems supporting live queries would need to be
> > adjusted to
> > call it.
> 
> So what do we agree on?
> When using a live query, chances are very high that you want to monitor
> the file in question, anyway. Since the entry didn't change wrt the
> query, I would find it cleaner to keep that separated.
> Introducing B_ENTRY_MOVED would also require userland apps to support
> this (unlike my previous B_ENTRY_REMOVED/B_ENTRY_ADDED hack).

I'm fine with the query flag to automatically start node monitoring. If we 
want to add the feature minimally invasively, we'd only add a new query 
flag just triggering B_WATCH_NAME watching on the concerned entry' node. 
The alternative would be to either squeeze the requested node monitoring 
flags into the fs_open_live_query() flags or add another call with separate 
flags.

Come to think of it, ATM notify_query_entry_created() can't trigger the 
automatic node monitoring, because it doesn't know that it should. So 
either an additional boolean flag or a flags parameter is needed.

CU, Ingo

Other related posts: