]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md/r5cache: improve journal device efficiency
authorSong Liu <songliubraving@fb.com>
Tue, 24 Jan 2017 22:08:23 +0000 (14:08 -0800)
committerShaohua Li <shli@fb.com>
Mon, 13 Feb 2017 17:17:52 +0000 (09:17 -0800)
commit39b99586b321a9cbd4fe9abb5ea9346d2c4ca9c6
tree8c4d3a516260a209f968c3d1755575433401340e
parent03b047f45c29dff02f913a0234ca0cc1ca51966f
md/r5cache: improve journal device efficiency

It is important to be able to flush all stripes in raid5-cache.
Therefore, we need reserve some space on the journal device for
these flushes. If flush operation includes pending writes to the
stripe, we need to reserve (conf->raid_disk + 1) pages per stripe
for the flush out. This reduces the efficiency of journal space.
If we exclude these pending writes from flush operation, we only
need (conf->max_degraded + 1) pages per stripe.

With this patch, when log space is critical (R5C_LOG_CRITICAL=1),
pending writes will be excluded from stripe flush out. Therefore,
we can reduce reserved space for flush out and thus improve journal
device efficiency.

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