Thread (13 messages) 13 messages, 2 authors, 2016-10-12

Re: [PATCH v4 6/8] md/r5cache: sysfs entry r5c_state

From: Song Liu <hidden>
Date: 2016-10-12 21:23:03

On Oct 12, 2016, at 9:56 AM, Shaohua Li [off-list ref] wrote:
quoted
This isn't how sysfs entry is supposed to output. You can either show the value
or the string, not both with format. I'd prefer the string though, and make
store accept string.
I implemented something like the following:

root@virt-test:~/md# cat /sys/block/md0/md/r5c_state
[write-through] write-back
root@virt-test:~/md# echo write-back > /sys/block/md0/md/r5c_state
root@virt-test:~/md# cat /sys/block/md0/md/r5c_state
write-through [write-back]

root@virt-test:~/md# ./mdadm --fail /dev/md0 /dev/loop4
mdadm: set /dev/loop4 faulty in /dev/md0
root@virt-test:~/md# cat /sys/block/md0/md/r5c_state
no-cache [cache-broken]
root@virt-test:~/md# echo no-cache > /sys/block/md0/md/r5c_state
root@virt-test:~/md# cat /sys/block/md0/md/r5c_state
no-cache

It will be part of next version. 

Thanks,
Song
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help