Comment 8 for bug 1903543

Revision history for this message
Khaled El Mously (kmously) wrote :

From the google_guest_agent code:

google_guest_agent/instance_setup.go:

func setIOScheduler() error {
        dir, err := os.Open("/sys/block")
        if err != nil {
                return err
        }
        defer dir.Close()

        devs, err := dir.Readdirnames(0)
        if err != nil {
                return err
        }

        for _, dev := range devs {
                // Detect if device is using MQ subsystem.
                stat, err := os.Stat("/sys/block/" + dev + "/mq")
                if err == nil && stat.IsDir() {
                        f, err := os.OpenFile("/sys/block/"+dev+"/queue/scheduler", os.O_WRONLY|os.O_TRUNC, 0700)
                        if err != nil {
                                return err
                        }
                        _, err = f.Write([]byte("none"))
                        if err != nil {
                                return err
                        }
                }
        }
        return nil
}

Seems to be intentionally doing that.