btrfs: raid56: catch errors from full_stripe_write
authorDavid Sterba <dsterba@suse.com>
Fri, 29 Jun 2018 08:57:10 +0000 (10:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:45 +0000 (13:12 +0200)
Add fall-back code to catch failure of full_stripe_write. Proper error
handling from inside run_plug would need more code restructuring as it's
called at arbitrary points by io scheduler.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c

index 272acd9..df41d70 100644 (file)
@@ -1686,8 +1686,11 @@ static void run_plug(struct btrfs_plug_cb *plug)
                list_del_init(&cur->plug_list);
 
                if (rbio_is_full(cur)) {
+                       int ret;
+
                        /* we have a full stripe, send it down */
-                       full_stripe_write(cur);
+                       ret = full_stripe_write(cur);
+                       BUG_ON(ret);
                        continue;
                }
                if (last) {