Misdetects my root partition as HDD on an SSD drive with btrfs

Bug #674435 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ureadahead (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Binary package hint: ureadahead

As seen on my boot chart [1], ureadahead waits for everything to finish reading before it resumes the boot, as in HDD mode.

Indeed it says "for HDD" for my root partition (/dev/sda5):

$ sudo ureadahead --dump | head -n 1
/var/lib/ureadahead/pack: created Fr, 12 Nov 2010 10:41:43 +0000 for hdd 0:17

Interestingly it gets it right for my home partition (/dev/sda7, on
the same drive):

$ sudo ureadahead --dump /home | head -n 1
/var/lib/ureadahead/home.pack: created Fr, 12 Nov 2010 10:41:43 +0000 for ssd 8:7

Seems the kernel gets it right:

$ cat /sys/block/sda/queue/rotational
0

Why is the device number for my root partition "0:17"? Shouldn't it be 8:5 for sda5?

I use btrfs on /dev/sda5 (my /), and have a separate /boot on /dev/sda2, could this be related?

[1] http://people.canonical.com/~pitti/bootcharts/donald-maverick-final.png

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Oh, I think btrfs is busted, as also may be crypted disk

Revision history for this message
Martin Pitt (pitti) wrote :

I don't use mdadm, LVM, encrypted hard disk, or anything like that. Just surprising that it is file system specific, I thought ureadahead would read /sys/block/$DEVICE/queue/rotational.

Changed in ureadahead (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Revision history for this message
Michael Casadevall (mcasadevall) wrote :

Same issue here, expect neither /home or / are seen an an SSD, the kernel knows we're on a SSD:

$ cat /sys/block/sda/queue/rotational
0

I'm using cryptfs+LVM on an Intel 160 GiB SSD.

Revision history for this message
Martin Pitt (pitti) wrote :

The underlying reason is that stat()'ing a file on btrfs delivers a bogus "0:17" device instead of the actual underlying device, presumably because btrfs is actually an abstraction layer for multiple physical devices, much like LVM. So it would require btrfs specific calls to determine whether any of the underlying physical devices is on a rotational drive.

summary: - Misdetects my root partition as HDD on an SSD drive
+ Misdetects my root partition as HDD on an SSD drive with btrfs
Changed in ureadahead (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.