From patchwork Wed Oct 11 01:55:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gu Jinxiang X-Patchwork-Id: 9998425 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 33A5860216 for ; Wed, 11 Oct 2017 01:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24FAB28856 for ; Wed, 11 Oct 2017 01:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A0872885B; Wed, 11 Oct 2017 01:55:53 +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=ham 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 9700928856 for ; Wed, 11 Oct 2017 01:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830AbdJKBzu (ORCPT ); Tue, 10 Oct 2017 21:55:50 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:18474 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754231AbdJKBzt (ORCPT ); Tue, 10 Oct 2017 21:55:49 -0400 X-IronPort-AV: E=Sophos;i="5.43,359,1503331200"; d="scan'208";a="28836275" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Oct 2017 09:55:47 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 4DE7B47CAAE4 for ; Wed, 11 Oct 2017 09:55:45 +0800 (CST) Received: from localhost.localdomain (10.167.226.132) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 11 Oct 2017 09:55:44 +0800 From: Gu Jinxiang To: CC: Gu JinXiang Subject: [PATCH v2] btrfs: Use bd_dev to generate index when dev_state_hashtable add items. Date: Wed, 11 Oct 2017 09:55:41 +0800 Message-ID: <1507686941-46390-1-git-send-email-gujx@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.132] X-yoursite-MailScanner-ID: 4DE7B47CAAE4.AA8C6 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: gujx@cn.fujitsu.com 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 From: Gu JinXiang Fix bug of (). Description of this bug: Use MOUNT_OPTIONS="-o check_int" when run xfstest, device can not be mount successfully. So xfstest can not run. Signed-off-by: Gu JinXiang --- fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 9d3854839038..86d79bc4cfb3 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c @@ -613,7 +613,7 @@ static void btrfsic_dev_state_hashtable_add( struct btrfsic_dev_state_hashtable *h) { const unsigned int hashval = - (((unsigned int)((uintptr_t)ds->bdev)) & + (((unsigned int)((uintptr_t)ds->bdev->bd_dev)) & (BTRFSIC_DEV2STATE_HASHTABLE_SIZE - 1)); list_add(&ds->collision_resolving_node, h->table + hashval);