Skip to content
  • Song Liu's avatar
    md/r5cache: handle alloc_page failure · d7bd398e
    Song Liu authored
    
    
    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: default avatarSong Liu <songliubraving@fb.com>
    Reviewed-by: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    d7bd398e