Bug 239999 - mount points are incorrectly detected
Summary: mount points are incorrectly detected
Status: RESOLVED DUPLICATE of bug 239825
Alias: None
Product: filelight
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-29 19:10 UTC by Maciej Pilichowski
Modified: 2010-07-15 00:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
solid log (4.55 KB, text/x-log)
2010-06-01 18:24 UTC, Maciej Pilichowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2010-05-29 19:10:59 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                Linux

The original report is here:
https://bugs.kde.org/show_bug.cgi?id=145010

In short, using Filelight I would like to scan partition X which has both mount point (within) to partition Y and symlink to that mount point. I set FF to ignore mount point, but it does not work -- symlink is ignored (correct) but mount point is not (incorrect).

Mounting is dynamically set, it is visible in /etc/mtab not /etc/fstab.

Reproducible: Always
Comment 1 Kevin Ottens 2010-05-31 07:49:03 UTC
Sorry I don't get it. You'll have to explain me what libsolid lists that shouldn't be listed, or what it doesn't list that should be listed (read the original BR you were pointing to but it's not overly straightforward either).
Comment 2 Maciej Pilichowski 2010-05-31 17:48:58 UTC
Well, for me to answer is hard, because I am user of FF, not Solid directly. So I can explain this in terms of FF.

Setting option "do not scan mount points" in FF should limit it to scan only selected partition. To simplify things -- / and second /home partitions. You select / (root) partition, in effect your /home partition should be ignored. 

FF relies on Solid to detect what is "this" partition and what is additionally mounted in. However if I dynamically mount partition (not using fstab) the mounted partition is counted in and scanned as if it was just a directory, not a mount point. So it seems Solid somehow does not check for dynamically mounted partitions (i.e. it treats dynamically mounted partitions as regular directories).
Comment 3 Kevin Ottens 2010-05-31 18:20:48 UTC
The way you present it it sounds like it'd be Filelight doing something wrong now (as in not querying libsolid which indeed gives info about both fixed and removable storage). :-)

I guess we'd need one of the Filelight developers to jump on this report and help us refine it.
Comment 4 Martin Sandsmark 2010-05-31 22:06:58 UTC
Here you can see the code Filelight uses to get mounted file systems from Solid:
http://websvn.kde.org/trunk/playground/utils/filelight/src/part/localLister.cpp?revision=1130934&view=markup#l216

Looks pretty solid to me (pun intended). :-)
Comment 5 Kevin Ottens 2010-05-31 23:21:07 UTC
Well the remote detection is obviously broken, as we discussed already (IIRC) for now libsolid is only about local (hopefully it'll change in time for 4.6 though).

Since I'm at it, you're not checking the "volume" pointer, you've no guarantee you'll get one. ;-)

But it seems to be irrelevant in this case, it's all about local mounts if I believe BR 145010.

Maciej, could you provide your fstab, mtab and output of "solid-hardware list details" when you hit your bug?

If I read correctly your previous BR you have the following mounts:
 * /
 * /home
 * /home/storage

And this last one is apparently not seen as a mountpoint by Filelight, correct? Providing me the content I asked will very likely help find why...
Comment 6 Maciej Pilichowski 2010-06-01 18:23:27 UTC
> it's all about local mounts 

Yes.

Partitions:
MP /
MP /home
SL /home/storage -> /home/.storage
MP /home/.storage

MP mount point, SL symbolic link.

> And this last one is apparently not seen as a mountpoint by Filelight,
> correct?

Yes, mount point is treated like a regular directory. Symlink is omitted though.

fstab contains only those first two. mtab (shortened, obscure version):
/dev/sda1 / ext3 rw,noatime,acl,user_xattr 0 0
/dev/xxxxxxxxx /home ext3 rw,noatime,acl,user_xattr 0 0
/dev/yyyyyyyyy /home/.storage ext3 rw,noatime 0 0

I will attach solid logs because even after trimming it down, it is rather lengthy.
Comment 7 Maciej Pilichowski 2010-06-01 18:24:14 UTC
Created attachment 47571 [details]
solid log

solid
Comment 8 Kevin Ottens 2010-06-22 19:20:41 UTC
Just wondering, could that be that you mount "/home/macias/.storage" after Filelight startup or something like that?

I see that the readMounts() static method is called only once when the part is created (creating the ScanManager, which calls readMounts()). And the generated list is never updated, so if any of the mountpoints change the list is just wrong and you could miss some of them. That actually could explain your problem.

From the logs it seems that your mountpoint is correctly reported by solid... So I'd expect a timing issue (readMounts() called too early), or something in the way the resulting list is used.

I think that could help if you provided the debug output of filelight as well. You should see too lines like:
Found the following remote filesystems: blah
Found the following local filesystems: blah

Having those we'd know what ends up in your lists after readMounts() call.
Comment 9 Maciej Pilichowski 2010-06-23 10:43:10 UTC
Mounting time -- it is at the login stage. Filelight is executed much later -- hours or a day.

About log, ok, lame question though -- where is it stored?
Comment 10 Kevin Ottens 2010-06-23 10:57:58 UTC
You should see those if you launch filelight from the command line. That's probably the easiest way to see them.
Comment 11 Maciej Pilichowski 2010-06-23 21:34:26 UTC
Nothing showed up. The only messages I've got were:
QPainter::...... (several times)
filelight(19619): Inadequate access permissions:  "/home/guest/.gconf/" (several times, referring to various dirs of course)
Comment 12 Kevin Ottens 2010-06-23 22:14:50 UTC
Ah well, "obviously" (was to me, understandably not to you, sorry about that) you need to execute the application in debug. Installing the debug packages of your distro (easier) or building the app yourself (harder) is likely to help.
Comment 13 Maciej Pilichowski 2010-06-26 23:08:16 UTC
Still no lack -- I installed (opensuse) additionally debuginfo package, however it didn't tell me any more stuff. So I deleted both of them and compiled FF myself with --enable-debug=full (btw. --disable-debug by default is yes, not "no" as configure says). Quite a list of warnings, no errors though, I executed
filelight
and this time I didn't get any output at all (not even from Qt). Program worked btw.
Comment 14 Maciej Pilichowski 2010-07-02 23:41:40 UTC
Switching status.
Comment 15 Kevin Ottens 2010-07-03 21:32:02 UTC
By "program worked" you mean the bug didn't show up? If that's the case we likely want to close this report as FIXED, or WORKSFORME.

If not I'm tempted to reassign on filelight again as they might be able to help you more actually debug the issue, from all we collected on this report I fail to see what could be wrong on libsolid side.
Comment 16 Maciej Pilichowski 2010-07-04 08:24:47 UTC
Sorry for not being clear -- I wrote that program worked, to emphasis that no output was not the effect of program crash. But the bug is still there, the mount points are still scanned no matter if I switch the options off or on.

Reassignment, it is ok with me. Anyway I can help, I help, just tell me what to do :-)
Comment 17 Martin Sandsmark 2010-07-15 00:19:03 UTC
ok, I guess it is now a duplicate of 239825.

*** This bug has been marked as a duplicate of bug 239825 ***