[haiku-commits] Re: r40736 - in haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap: . imap_lib

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 02 Mar 2011 10:10:47 +0100

On 2011-03-02 at 08:40:48 [+0100], Stephan Aßmus <superstippi@xxxxxx> wrote:
> On 02.03.2011 04:18, Clemens wrote:
> > On Wed, 02 Mar 2011 03:36:01 +1300, Ingo Weinhold <ingo_weinhold@xxxxxx>
> > wrote:
> >
> >>> Does it also handle the case when a app want to open an arbitrary file
> >>> without knowing anything about "IMAP FS user@xxxxxxxx"?
> >> Why would some app do that? At some point someone has to know what to
> >> mount
> >> where. If that is supposed to persistent it could be done via
> >> auto-mounting.
> >> Unfortunately, at least ATM, that wouldn't work particularly well with
> >> Tracker.
> >
> > How does auto mounting works exactly? Does it blocks in the boot script
> > till everything is mounted?
> Yes, since I've introduced the mount_server for exactly that purpose.
> Previously Tracker did the mounting and this had exactly the problem
> that sometimes a relied on volume was not available yet.

That's not what is traditionally considered auto-mounting. What I mean is 
the VFS feature that mounts a FS when its mount-point-to-be is first 
accessed. And in that case the respective thread(s) would block until the 
FS is fully mounted.

But as mentioned, that wouldn't work particularly well with Tracker ATM, 
since it reads (or tries to read) attributes and also does an opendir() on 
any directory that appears as an entry in a Tracker window. So mounting 
would be triggered too early.

> > Imagine this: For some stupid reason you opened a mail in StyleEdit.
> > Because you also have some kind of session manager StyleEdit attempt to
> > open the mail after a reboot. StyleEdit does not know about imap service
> > at all. Because the imap-fs is mounted asynchronously the mail is not
> > there and StyleEdit throws an error. Think this asynchronous case can
> > only be handled with a lazy mount (?)
> >
> > On the other side I don't know if it is the best user experience when
> > StyleEdit hangs for several time till imap-fs is mounted...

All applications that do disk access should be prepared that it can take a 
long time (think network file systems). So that should not be done in an 
interface thread and ideally there should be some user feedback what is 

CU, Ingo

Other related posts: