From patchwork Fri Jul 15 15:03:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 9232187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B94460868 for ; Fri, 15 Jul 2016 15:04:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F21CF26B4A for ; Fri, 15 Jul 2016 15:04:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E662527AC2; Fri, 15 Jul 2016 15:04:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 484A32715B for ; Fri, 15 Jul 2016 15:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751345AbcGOPEL (ORCPT ); Fri, 15 Jul 2016 11:04:11 -0400 Received: from mga14.intel.com ([192.55.52.115]:62256 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbcGOPEJ (ORCPT ); Fri, 15 Jul 2016 11:04:09 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 15 Jul 2016 08:03:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,368,1464678000"; d="scan'208";a="995960840" Received: from jazz.nc.intel.com (HELO localhost) ([10.217.217.12]) by orsmga001.jf.intel.com with ESMTP; 15 Jul 2016 08:03:44 -0700 Received: from vincents by localhost with local (Exim 4.87) (envelope-from ) id 1bO4eV-0007Qh-4c; Fri, 15 Jul 2016 17:03:43 +0200 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: linux-btrfs@vger.kernel.org Cc: linux-block@vger.kernel.org, dm-devel@redhat.com, =?UTF-8?q?Vincent=20Stehl=C3=A9?= , Mike Christie , Jens Axboe Subject: [PATCH next] Btrfs: fix comparison in __btrfs_map_block() Date: Fri, 15 Jul 2016 17:03:21 +0200 Message-Id: <1468595001-4270-1-git-send-email-vincent.stehle@intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1465155145-10812-14-git-send-email-mchristi@redhat.com> References: <1465155145-10812-14-git-send-email-mchristi@redhat.com> MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing comparison to op in expression, which was forgotten when doing the REQ_OP transition. Fixes: b3d3fa519905 ("btrfs: update __btrfs_map_block for REQ_OP transition") Signed-off-by: Vincent Stehlé Cc: Mike Christie Cc: Jens Axboe Reviewed-by: Mike Christie --- Hi, I saw that issue in linux next. Not sure if it is too late to squash the fix with commit b3d3fa519905 or not... Best regards, Vincent. fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a69203a..6ee1e36 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -5533,7 +5533,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int op, } } else if (map->type & BTRFS_BLOCK_GROUP_DUP) { - if (op == REQ_OP_WRITE || REQ_OP_DISCARD || + if (op == REQ_OP_WRITE || op == REQ_OP_DISCARD || op == REQ_GET_READ_MIRRORS) { num_stripes = map->num_stripes; } else if (mirror_num) {