On Mon, Sep 27, 2010 at 02:00, Lennart Poettering <[email protected]> wrote: > On Fri, 24.09.10 12:22, Kay Sievers ([email protected]) wrote: > >> On Fri, Sep 24, 2010 at 12:06, <[email protected]> wrote: >> > From: Harald Hoyer <[email protected]> >> > >> > btrfs returns a major(0) for its device, so try to find the mountpoint and >> > real device. >> >> > + fp = fopen("/proc/self/mountinfo", "r"); >> > + if (fp == NULL) >> > + return NULL; >> > + while (fscanf(fp, "%*s %*s %i:%i %*s %1024s %*s %*s %*s %1024s >> > %*[^\n]", &maj, &min, mp, dev) >> >> Using device names from this file is not nice. I have just /dev/root >> here. Shouldn't we just read the kernel commandline instead? > > As long as it is just btrfs we probably could use some btrfs-specific > ioctls to figure out whether something is ssd. However, for root on LVM > we'd have the same problem and neither btrfs ioctls nor parsing > /proc/self/mountinfo would help there. Maybe this is something the > kernel people should fix? maybe a new FS_IOC_GETFLAGS flag that > indicates "at least one rotating block device is part of this fs" or so?
Doesn't: ls -l /sys/class/block/*/slaves/ show it? Kay _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
