Bug 132976 - Removable storage with multiple partitions cause only one partition to show up in gnome-vfs
Summary: Removable storage with multiple partitions cause only one partition to show u...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-vfs2
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
: 135337 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-20 16:03 UTC by Havoc Pennington
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-15 08:17:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Check the size of mtab and fstab along with the modification time to determine if the file has changed (2.55 KB, patch)
2004-10-14 19:46 UTC, John (J5) Palmieri
no flags Details | Diff

Description Havoc Pennington 2004-09-20 16:03:07 UTC
The Linksys Network Storage Link formats USB hard drives with three
ext3 partitions:
sda1 - the data
sda2 - some config files and admin cruft
sda3 - swap

For some reason when plugging this in, partition 2 was mounted.

If randomly selecting a partition, then "1" seems like a logical
default. But maybe a better solution is to mount all partitions.
Anyway, choosing partition 2 was sort of surprising.

Comment 1 John (J5) Palmieri 2004-09-22 19:57:49 UTC
It should have mounted all three.  Can you bring in the drive for me
to test?

Comment 2 John (J5) Palmieri 2004-10-07 15:46:06 UTC
This turns out to be a gamin bug.  While the partitions are mounted in
mtab by g-v-m gamin fails to notify gnome-vfs or gnome-vfs fails to
recive notification of every mount so they don't show up on the
desktop or in computer.  Reassigning to gamin.

Comment 3 Daniel Veillard 2004-10-07 15:53:46 UTC
gamin won't tell you that something is mounted.
It can *only* tell you if a dirctory content changed
I don't see the relationship between 
  "partition is mounted"
and
  "gamin should tell something"

if the partition is to be mounted then the directory it is monted on
must exist. And if you watch the directory you open() it. the opened()
directory does not change if you mount something under that directory.

  I'm not sure you can resonably expect gamin to tell you that
something got (un)mounted even if the directory is watched.

Daniel

Comment 4 John (J5) Palmieri 2004-10-08 15:22:33 UTC
We use gamin to check if /etc/mtab has changed.

Comment 5 David Zeuthen 2004-10-08 15:33:57 UTC
We are not discussing whether something is mounted or not, we're
discussing when the /etc/mtab file is changed (that mount(1) updates,
hence the talk about mounting/unmounting).

I think the problem here is that /etc/mtab gets updated twice in a
short timescale and gnome-vfs is only notified of the first occurence
- this didn't happen with fam. This can either be a bug in gnome-vfs
(perhaps it excepts only one update per fam notification?) or this is
a bug in gamin. 

It's terribly difficult to reproduce this because of the very nature
of the problem etc., but I think I now have a setup here in Westford
to reproduce this.

Comment 6 Daniel Veillard 2004-10-12 13:13:37 UTC
You get two kernel dnotify even very close to each other.
Dnotify can only check what changed in the directory. Then it's
a problem of:
   - checking file sizes
   - checking file timestamps (one second increment only are stored
     in ext3)
and reporting event on detected modifications. Maybe gamin doesn't
do an optimal job there at extracting modifications informations.

Daniel

Comment 7 Alexander Larsson 2004-10-12 13:16:53 UTC
*** Bug 135337 has been marked as a duplicate of this bug. ***

Comment 8 John (J5) Palmieri 2004-10-14 19:39:49 UTC
This turned out to be a gnome-vfs bug where we were only checking the
mtime.  I added a check for file size also.  Reassigning to Alex.
Patch to be included below.

Comment 9 John (J5) Palmieri 2004-10-14 19:42:05 UTC
Reassinging to alex for real this time :-)

Comment 10 John (J5) Palmieri 2004-10-14 19:46:15 UTC
Created attachment 105227 [details]
Check the size of mtab and fstab along with the modification time to determine if the file has changed

Alex can you check this patch to see if I got all the code paths?  There was
one place I didn't update because the code that checks the mtime doesn't seem
to ever be executed.

Comment 11 Alexander Larsson 2004-10-15 08:17:53 UTC
That looks good. Commited upstream. I also fixed the AIX case that
didn't check mtime correctly. The fix is now building in rawhide as
2.8.2-4.

Comment 12 Sebastian Dröge 2004-12-12 22:04:45 UTC
Doesn't work for me with gnome-vfs-2.8.3
I got the same problem as in Bug 135337 (with gamin)

Bye


Note You need to log in before you can comment on or make changes to this bug.