Bug 48155 - "udisksctl unmount -b /dev/sdc1" also unmounts /dev/sdb1
Summary: "udisksctl unmount -b /dev/sdc1" also unmounts /dev/sdb1
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: operations (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-01 04:52 UTC by Edward Sheldrake
Modified: 2012-04-03 08:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix unmounting large disks when not asked to (1.69 KB, patch)
2012-04-01 08:23 UTC, Edward Sheldrake
Details | Splinter Review

Description Edward Sheldrake 2012-04-01 04:52:19 UTC
With 2 USB drives connected, unmounting the second with udisksctl also unmounted the first.

udisks2 1.93.0
udev 173-3.fc16

Steps to reproduce:
1. Connect 2 USB drives
2. udisksctl mount -b /dev/sdb1
3. udisksctl mount -b /dev/sdc1
4. udisksctl unmount -b /dev/sdc1

Actual results:
Both /dev/sdc1 and /dev/sdb1 were unmounted.

Expected results:
Only /dev/sdc1 gets unmounted, /dev/sdb1 remains mounted.

Additional info:
I also tried connecting 3 USB drives, unmounting /dev/sdd1 or /dev/sdc1 caused /dev/sdb1 to be unmounted but the other /dev/sdc1 or /dev/sdd1 remained mounted.

/dev/sdb is a USB hard disk, sdc and sdd are USB flash drives.

Here is some output from "udisksctl monitor", from mounting sdb sdc sdd then unmounting sdc:

Monitoring the udisks daemon. Press Ctrl+C to exit.
12:46:27.760: The udisks-daemon is running (name-owner :1.45).
12:46:32.178: Added /org/freedesktop/UDisks2/jobs/34
  org.freedesktop.UDisks2.Job:
    ExpectedEndTime:    0
    Objects:            ['/org/freedesktop/UDisks2/block_devices/sdb1']
    Progress:           0.0
    StartTime:          0
12:46:33.961: /org/freedesktop/UDisks2/block_devices/sdb1: org.freedesktop.UDisks2.Filesystem: Properties Changed
  MountPoints:          /run/media/ejs/iomega
12:46:33.963: /org/freedesktop/UDisks2/jobs/34: org.freedesktop.UDisks2.Job::Completed (true, '')
12:46:33.964: Removed /org/freedesktop/UDisks2/jobs/34
12:46:37.263: Added /org/freedesktop/UDisks2/jobs/35
  org.freedesktop.UDisks2.Job:
    ExpectedEndTime:    0
    Objects:            ['/org/freedesktop/UDisks2/block_devices/sdc1']
    Progress:           0.0
    StartTime:          0
12:46:37.295: /org/freedesktop/UDisks2/block_devices/sdc1: org.freedesktop.UDisks2.Filesystem: Properties Changed
  MountPoints:          /run/media/ejs/UDISK 2.0
12:46:37.296: /org/freedesktop/UDisks2/jobs/35: org.freedesktop.UDisks2.Job::Completed (true, '')
12:46:37.296: Removed /org/freedesktop/UDisks2/jobs/35
12:46:40.185: Added /org/freedesktop/UDisks2/jobs/36
  org.freedesktop.UDisks2.Job:
    ExpectedEndTime:    0
    Objects:            ['/org/freedesktop/UDisks2/block_devices/sdd1']
    Progress:           0.0
    StartTime:          0
12:46:40.207: /org/freedesktop/UDisks2/block_devices/sdd1: org.freedesktop.UDisks2.Filesystem: Properties Changed
  MountPoints:          /run/media/ejs/cnmemory
12:46:40.209: /org/freedesktop/UDisks2/jobs/36: org.freedesktop.UDisks2.Job::Completed (true, '')
12:46:40.209: Removed /org/freedesktop/UDisks2/jobs/36
12:46:56.121: /org/freedesktop/UDisks2/block_devices/sdc1: org.freedesktop.UDisks2.Filesystem: Properties Changed
  MountPoints:          
12:46:56.123: Added /org/freedesktop/UDisks2/jobs/37
  org.freedesktop.UDisks2.Job:
    ExpectedEndTime:    0
    Objects:            ['/org/freedesktop/UDisks2/block_devices/sdc1']
    Progress:           0.0
    StartTime:          0
12:46:56.129: Added /org/freedesktop/UDisks2/jobs/38
  org.freedesktop.UDisks2.Job:
    ExpectedEndTime:    0
    Objects:            []
    Progress:           0.0
    StartTime:          0
12:46:56.148: /org/freedesktop/UDisks2/jobs/37: org.freedesktop.UDisks2.Job::Completed (true, '')
12:46:56.153: /org/freedesktop/UDisks2/block_devices/sdb1: org.freedesktop.UDisks2.Filesystem: Properties Changed
  MountPoints:          
12:46:56.157: Removed /org/freedesktop/UDisks2/jobs/37
12:46:56.177: /org/freedesktop/UDisks2/jobs/38: org.freedesktop.UDisks2.Job::Completed (true, '')
12:46:56.178: Removed /org/freedesktop/UDisks2/jobs/38
Comment 1 Edward Sheldrake 2012-04-01 08:23:13 UTC
Created attachment 59343 [details] [review]
Fix unmounting large disks when not asked to

Problem tracked down based on /var/log/messages having many lines of:

udisksd[1713]: Cleaning up mount point /run/media/ejs/iomega (device 8:17 no longer exist)

and sdb being a 1.5 TB disk.
Comment 2 David Zeuthen (not reading bugmail) 2012-04-03 08:05:12 UTC
Hey, nice catch, thanks! I've committed your patch

http://cgit.freedesktop.org/udisks/commit/?id=5dd2ef0710584626f81a89b81180fa81d04b6956
Comment 3 David Zeuthen (not reading bugmail) 2012-04-03 08:41:41 UTC
In case anyone reading this is using Fedora, here's the update for F17 that includes this bug-fix

 https://admin.fedoraproject.org/updates/udisks2-1.93.0-2.fc17


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.