• Jürgen Quade's avatar
    [PATCH] signedness fix in deadline-iosched.c · cd3ae7b3
    Jürgen Quade authored
    There is some (obvious) mess with "unsigned int" and "int" in the
    deadline-io-scheduler (sysfs-section).  Try to change the attribute
    "writes_starved":
    
    	root@ezs-mobil:/sys/block/hda/queue# cat scheduler
    	noop anticipatory [deadline]
    	root@ezs-mobil:/sys/block/hda/queue# cd iosched/
    	root@ezs-mobil:/sys/block/hda/queue/iosched# ls
    	fifo_batch  front_merges  read_expire  write_expire  writes_starved
    	root@ezs-mobil:/sys/block/hda/queue/iosched# cat writes_starved
    	2
    	root@ezs-mobil:/sys/block/hda/queue/iosched# echo 4 >writes_starved
    	root@ezs-mobil:/sys/block/hda/queue/iosched# cat writes_starved
    	-2147483648
    	root@ezs-mobil:/sys/block/hda/queue/iosched#
    
    Because all attribute-variables are defined as "int", the patch
    below changes them to "int". Now it works as expected...
    Signed-off-by: default avatarJuergen Quade <quade@hsnr.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    cd3ae7b3
deadline-iosched.c 22.6 KB