I wrote:
> The ARM runtime reports the major device type associated with
> /proc/self/mountinfo as MMC_BLOCK_MAJOR, causing on_ssd() in
> readahead-common.c to return false.   on_ssd() should return true, as
> MMC like SSD is not rotational.

Lennart writes:
> Not following here. fs_on_ssd() will actually check for the high-level
> ID_SSD property, as well as the "queue/rotational" sysfs attribute for
> the block device.

Those other checks are not reached, as the beginning of fs_on_ssd() has
        if (major(st.st_dev) == 0) {}
encapsulating them, and major(st.st_dev)=MMC_BLOCK_MAJOR, not 0.    My first 
attempt to fix the problem was

+    if (streq(opts, "mmc") || startswith(opts, "mmc,") || endswith(opts, 
",mmc") || strstr(opts, ",mmc,"))

but that statement is also not reached.   Likely the best practice is also to 
compare MTD_BLOCK_MAJOR, but since I have no simple way to test that case, I 
didn't include it.   That's why I put the change inside an #ifdef.   As Auke 
points out in systemd-commits, where I erroneously attempted to post this 
patch, any arch using an MMC would consider it non-rotational.

-- Alison Chaiken
   Mentor Graphics, from rainy Hildesheim
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to