md/r5cache: sysfs entry journal_mode
authorSong Liu <songliubraving@fb.com>
Thu, 17 Nov 2016 23:24:41 +0000 (15:24 -0800)
committerShaohua Li <shli@fb.com>
Fri, 18 Nov 2016 21:27:24 +0000 (13:27 -0800)
commit2c7da14b90a01e48b17a028de6050a796cfd6d8d
tree69f8c6710e71f270146978d7e99744962a5eadc8
parenta39f7afde358ca89e9fc09a5525d3f8631a98a3a
md/r5cache: sysfs entry journal_mode

With write cache, journal_mode is the knob to switch between
write-back and write-through.

Below is an example:

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

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c
drivers/md/raid5.c
drivers/md/raid5.h