linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/3] Btrfs: remove redundant check in rbio_can_merge
Date: Mon,  4 Dec 2017 15:40:35 -0700	[thread overview]
Message-ID: <20171204224037.7556-2-bo.li.liu@oracle.com> (raw)
In-Reply-To: <20171204224037.7556-1-bo.li.liu@oracle.com>

Given the above
'
if (last->operation != cur->operation)
	return 0;
',
it's guaranteed that two operations are same.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/raid56.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 24a6222..c4188fb 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -595,12 +595,10 @@ static int rbio_can_merge(struct btrfs_raid_bio *last,
 	 * bio list here, anyone else that wants to
 	 * change this stripe needs to do their own rmw.
 	 */
-	if (last->operation == BTRFS_RBIO_PARITY_SCRUB ||
-	    cur->operation == BTRFS_RBIO_PARITY_SCRUB)
+	if (last->operation == BTRFS_RBIO_PARITY_SCRUB)
 		return 0;
 
-	if (last->operation == BTRFS_RBIO_REBUILD_MISSING ||
-	    cur->operation == BTRFS_RBIO_REBUILD_MISSING)
+	if (last->operation == BTRFS_RBIO_REBUILD_MISSING)
 		return 0;
 
 	return 1;
-- 
2.9.4


  reply	other threads:[~2017-12-04 23:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 22:40 [PATCH 0/3] Btrfs: loop retry on raid6 read failures Liu Bo
2017-12-04 22:40 ` Liu Bo [this message]
2017-12-05 18:20   ` [PATCH 1/3] Btrfs: remove redundant check in rbio_can_merge David Sterba
2017-12-04 22:40 ` [PATCH 2/3] Btrfs: do not merge rbios if their fail stripe index are not identical Liu Bo
2017-12-05 18:24   ` David Sterba
2017-12-04 22:40 ` [PATCH 3/3] Btrfs: make raid6 rebuild retry more Liu Bo
2017-12-05  8:07   ` Qu Wenruo
2017-12-05 18:04     ` Liu Bo
2017-12-05 19:29       ` David Sterba
2017-12-05 18:09     ` David Sterba
2017-12-05 22:55       ` Liu Bo
2017-12-06  0:11         ` Qu Wenruo
2017-12-07  0:26           ` Liu Bo
2017-12-05  8:08   ` Qu Wenruo
2017-12-05 18:26 ` [PATCH 0/3] Btrfs: loop retry on raid6 read failures David Sterba
2018-01-05 15:54 ` David Sterba

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=20171204224037.7556-2-bo.li.liu@oracle.com \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@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).