[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Against the system:/, media:/ and home:/ namespaces
From:       Thiago Macieira <thiago () kde ! org>
Date:       2005-07-11 17:58:55
Message-ID: 200507111458.56497.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Luke Sandell wrote:
>A better idea: only mount the media when saving/loading a file and
> unmount it immediately after. Of course, this could cause problems for
> programs that use things like mmap, because they have to access the
> file continuously; but this could be solved by making a temporary copy
> of the file (I'm sure that developers who use mmap are smart enough to
> do this already). Oh - and automagic unmounting has the added advantage
> that it solves the floppy problem - the media is mounted only while it
> is being accessed, meaning that the drive light will be on only when
> the disk is mounted.

Programs that require mmap() can't use ioslaves directly anyways. They 
need to find the real file path in order to call open(2) and then 
mmap(2).

And I also think your solution would compound the problem for non-KDE 
apps, since there will be no "local file path" to media:/-URLs. That 
means copying the file to disk before using it. Imagine clicking on a 
700MB .mpg on a CD and see it copied to /tmp before mplayer or xine is 
opened.

Mount/umounting on use would throw away the added benefits for floppies, 
which are fast access to cache. If you mount and unmount right 
afterwards, the cache is discarded. That means floppy access will be as 
slow as on Windows.

>On Monday, July 11, 2005 12:47 am, Thiago Macieira wrote:
>> Have you ever heard of supermount?
>
>Yes, and I mentioned it and autofs and subfs in the paragraph you quoted
>before asking me that question. The problem is that if you ever have
> tried using autofs and supermount before, they simply don't work.
> Usually, supermount works the first time after you reboot and then
> thats it. AFAIK, no one has even tried to port supermount to Linux 2.6
> anyway.

You're a bit outdated there. Supermount(-ng) has been ported to Linux 2.6 
and works fine, or so I hear. As I said, I have no use for it, so I turn 
it off and cannot vouch for its quality first-hand.

# cat /proc/filesystems | grep supermount
nodev   supermount
# uname -a
Linux norway 2.6.10-72032U10_2cl #1 Wed Dec 15 13:48:26 BRST 2004 i586 
unknown unknown GNU/Linux

> I have, however, not tried subfs, but it doesn't come with the 
> kernel so I'm guessing it isn't stable enough yet. At any rate, even if
> it did work 1) we would still have to accomodate users who don't have
> it installed and 2) automatic mounting is meant mostly for the desktop,
> and we don't want to force the user to have it on the command line, and
> so we may as well include it in as an integrated feature of media:/.

Automated mounting should happen on the kernel, because of the need for 
refcounting all open files, and avoiding umount before all files are 
closed. I refer to my usecase above of mplayer or xine: kio_media cannot 
and will not accomodate them, because it doesn't have the privileges 
enough to perform that operation.

We could run lsof and keep polling the applications launched to see if 
they still have any files open on the device. Note that we cannot list 
files opened by other users, so even the lsof solution will be deficient.

Or we could simply keep trying to umount every 10 seconds or so, because 
umount will refuse to work if the filesystem is still in use.

I find those solutions suboptimal and would rather see them implemented 
properly on the kernel.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

1. On frumscafte, hwonne time_t wæs náht, se scieppend þone circolwyrde 
wundorcræftlíge cennede and seo eorðe wæs idel and hit wæs gód.

[Attachment #5 (application/pgp-signature)]

 =

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic