]> git.karo-electronics.de Git - linux-beck.git/commit
md/r5cache: handle alloc_page failure
authorSong Liu <songliubraving@fb.com>
Thu, 24 Nov 2016 06:50:39 +0000 (22:50 -0800)
committerShaohua Li <shli@fb.com>
Mon, 28 Nov 2016 05:35:38 +0000 (21:35 -0800)
commitd7bd398e97f236a2353689eca5e8950f67cd34d5
treeed071303317acc6ba7008e808fec5845ab5fe45b
parent034e33f5eda3c61edb838471f69ec42d64e1e94e
md/r5cache: handle alloc_page failure

RMW of r5c write back cache uses an extra page to store old data for
prexor. handle_stripe_dirtying() allocates this page by calling
alloc_page(). However, alloc_page() may fail.

To handle alloc_page() failures, this patch adds an extra page to
disk_info. When alloc_page fails, handle_stripe() trys to use these
pages. When these pages are used by other stripe (R5C_EXTRA_PAGE_IN_USE),
the stripe is added to delayed_list.

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