This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 132976 - Removable storage with multiple partitions cause only one partition to show up in gnome-vfs
Removable storage with multiple partitions cause only one partition to show u...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gnome-vfs2 (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
:
: 135337 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-20 12:03 EDT by Havoc Pennington
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 04:17:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 15:46 EDT, John (J5) Palmieri
no flags Details | Diff

  None (edit)
Description Havoc Pennington 2004-09-20 12:03:07 EDT
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 15:57:49 EDT
It should have mounted all three.  Can you bring in the drive for me
to test?
Comment 2 John (J5) Palmieri 2004-10-07 11:46:06 EDT
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 11:53:46 EDT
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 11:22:33 EDT
We use gamin to check if /etc/mtab has changed.
Comment 5 David Zeuthen 2004-10-08 11:33:57 EDT
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 09:13:37 EDT
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 09:16:53 EDT
*** Bug 135337 has been marked as a duplicate of this bug. ***
Comment 8 John (J5) Palmieri 2004-10-14 15:39:49 EDT
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 15:42:05 EDT
Reassinging to alex for real this time :-)
Comment 10 John (J5) Palmieri 2004-10-14 15:46:15 EDT
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 04:17:53 EDT
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 17:04:45 EST
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.