linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sanidhya Solanki <jpage.lkml@gmail.com>
To: clm@fb.com, jbacik@fb.com, dsterba@suse.com, jpage.lkml@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [PATCH] BTRFS: Runs the xor function if a Block has failed
Date: Wed, 30 Dec 2015 01:28:36 -0500	[thread overview]
Message-ID: <1451456916-16520-1-git-send-email-jpage.lkml@gmail.com> (raw)

The patch adds the xor function after the P stripe
has failed, without bad data or the Q stripe.

Signed-off-by: Sanidhya Solanki <jpage.lkml@gmail.com>
---
 fs/btrfs/raid56.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 1a33d3e..d33734a 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1864,8 +1864,8 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
 					/*
 					 * Just the P stripe has failed, without
 					 * a bad data or Q stripe.
-					 * TODO, we should redo the xor here.
 					 */
+					run_xor(pointers, rbio->nr_data - 1, PAGE_CACHE_SIZE);
 					err = -EIO;
 					goto cleanup;
 				}
-- 
2.5.0


             reply	other threads:[~2015-12-30 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  6:28 Sanidhya Solanki [this message]
2015-12-30 17:18 ` [PATCH] BTRFS: Runs the xor function if a Block has failed David Sterba
2015-12-31  2:15   ` Sanidhya Solanki
2016-01-05  9:22     ` David Sterba
2016-01-05 10:03       ` Sanidhya Solanki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451456916-16520-1-git-send-email-jpage.lkml@gmail.com \
    --to=jpage.lkml@gmail.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).