From: Alison Chaiken <[email protected]> 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.
Signed-off-by: Alison Chaiken <[email protected]> --- src/readahead/readahead-common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c index 49679fc..4d1788a 100644 --- a/src/readahead/readahead-common.c +++ b/src/readahead/readahead-common.c @@ -27,6 +27,7 @@ #include <fcntl.h> #include <sys/mman.h> #include <unistd.h> +#include <linux/major.h> #include "log.h" #include "readahead-common.h" @@ -72,6 +73,12 @@ int fs_on_ssd(const char *p) { if (stat(p, &st) < 0) return -errno; +#ifdef __arm__ + if (major(st.st_dev) == MMC_BLOCK_MAJOR) { + log_info("readahead: MMC is non-rotating."); + return true; + } +#endif if (major(st.st_dev) == 0) { _cleanup_fclose_ FILE *f = NULL; int mount_id; -- 1.9.1 _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
