[haiku-gsoc] Handling Device Unmounting

  • From: Ankur Sethi <get.me.ankur@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Thu, 9 Jul 2009 10:37:28 +0530

Hi,

As of now, unmounting a volume while Beacon is running will inevitably
cause the index on the volume to become corrupted (CLucene indexes
become completely unusable if they are not close()d). To fix this, the
indexer must have a chance to write to the volume before it is
unmounted. What I really need is a way to achieve this:

1. The user chooses to unmount a volume from Tracker.
2. Before the volume is unmounted, a notification is sent to the indexer.
3. There is a slight delay as the indexer closes the index on the volume.
4. The volume is unmounted.

The indexer could also close() the index after every write. That would
be inefficient performance wise, but safer if either the indexer or
the OS crashes.

Thanks :)

-- 
Salut,
General Maximus

Other related posts: