From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99090C4363D for ; Thu, 24 Sep 2020 10:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4396F21D24 for ; Thu, 24 Sep 2020 10:11:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="u4gfN4gu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727369AbgIXKLq (ORCPT ); Thu, 24 Sep 2020 06:11:46 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:44446 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgIXKLq (ORCPT ); Thu, 24 Sep 2020 06:11:46 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OA9NAg068162; Thu, 24 Sep 2020 10:11:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=FMFSQjT1EBj+B4hA2UlDXKsYfxTimQO/jk0Y3zMGZvE=; b=u4gfN4gu1qv2Wpkbso9o9t2gEFm3Z7ZLnRmtlZSJvS67yhLMcCNY2+4TR0ndZ9llkcKW 9QPvQmEGEiMwROTNC2Zi6ECQwEr4ROB6VG/2x0zaviW0lKV03inCRbBHW+5kArQhd9pQ nTj0FvYMWJO09Z3+VaXyA2sLJTtJmCK4WDoqm5/fdOcgzN/A756MSFLzaGjLx5oIxruW tyRvCsU9NDwIoCfj/00AMJgGzgvpoH7fVRMUHse4H6aOzZRQFjR0SdDSnUNpj09KcYY1 udv2n0REOTw6N53dWYEf0IrB4ejvxFYvcI67kpEMQX8I0sgOqdu3VbE36NlRK4g3PjAu Ug== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33q5rgnmu9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Sep 2020 10:11:39 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OAASQB094209; Thu, 24 Sep 2020 10:11:39 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 33nujqqr7b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Sep 2020 10:11:39 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08OABcUH011253; Thu, 24 Sep 2020 10:11:39 GMT Received: from localhost.localdomain (/39.109.231.106) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Sep 2020 03:11:37 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: nborisov@suse.com, wqu@suse.com, dsterba@suse.com, Anand Jain Subject: [PATCH 0/2] fix verify_one_dev_extent and btrfs_find_device Date: Thu, 24 Sep 2020 18:11:22 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 spamscore=0 suspectscore=1 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240077 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 impostorscore=0 clxscore=1015 suspectscore=1 phishscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240077 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org btrfs_find_device()'s last arg %seed is unused, which the commit 343694eee8d8 (btrfs: switch seed device to list api) ignored purposely or missed. But there isn't any regression due to that. And this series makes it official that btrfs_find_device() doesn't need the last arg. To achieve that patch 1/2 critically reviews the need for the check disk_total_bytes == 0 in the function verify_one_dev_extent() and finds that, the condition is never met and so deletes the same. Which also drops one of the parents of btrfs_find_device() with the last arg false. So only device_list_add() is using btrfs_find_device() with the last arg as false, which the patch 2/2 finds is not required as well. So this patch drops the last arg in btrfs_find_device() altogether. Anand Jain (2): btrfs: drop never met condition of disk_total_bytes == 0 btrfs: fix btrfs_find_device unused arg seed fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 37 ++++++++++--------------------------- fs/btrfs/volumes.h | 2 +- 5 files changed, 17 insertions(+), 34 deletions(-) -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80A95C4363D for ; Wed, 21 Oct 2020 04:18:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12EBD221FC for ; Wed, 21 Oct 2020 04:18:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DhMFf9Xb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411920AbgJUESV (ORCPT ); Wed, 21 Oct 2020 00:18:21 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:32884 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411917AbgJUESU (ORCPT ); Wed, 21 Oct 2020 00:18:20 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09L4EuMT003688 for ; Wed, 21 Oct 2020 04:18:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=FMFSQjT1EBj+B4hA2UlDXKsYfxTimQO/jk0Y3zMGZvE=; b=DhMFf9XboDl0z13Ao2KQ1H0gW7VpWlLrsVSrjmox3smoydQ1M5X+RE66WtKC0G5XyFsr Qh7DokpJP7o577i42rMHUjx8uDrdljAuaG/nO22Z5qtw1AShHkxTS04lOr4+ZRV263aw o0+83IuSsffwiryI9MpkJYlsfolwME4PaMm12rFxzlxU/w4rPELIMA/8QI95P2QsO1Xt ZZw9km9rpT2yMio1KtUjS2T4XcP2E14hUg8sj6MIVE4smVltLX3diFVqWmFGmci1YJBP pFuuDpHv9p7gHqhqVAJZNpGbiLToXu8Sr3gj9jnNFdSWpTKfD1QEld95OoBd0De9QQ6X PQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 347p4axfeh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 21 Oct 2020 04:18:19 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09L49tMK141834 for ; Wed, 21 Oct 2020 04:16:19 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 348acrk47s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 21 Oct 2020 04:16:18 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09L4GIvf017580 for ; Wed, 21 Oct 2020 04:16:18 GMT Received: from localhost.localdomain (/39.109.231.106) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Oct 2020 21:16:17 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH RESEND 0/2] fix verify_one_dev_extent and btrfs_find_device Date: Wed, 21 Oct 2020 12:16:07 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9780 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=1 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210033 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9780 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210033 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Message-ID: <20201021041607.N6zGVbH23NYs59PXHWC0Uoc_t-H0glRpAUAHePQTJxs@z> btrfs_find_device()'s last arg %seed is unused, which the commit 343694eee8d8 (btrfs: switch seed device to list api) ignored purposely or missed. But there isn't any regression due to that. And this series makes it official that btrfs_find_device() doesn't need the last arg. To achieve that patch 1/2 critically reviews the need for the check disk_total_bytes == 0 in the function verify_one_dev_extent() and finds that, the condition is never met and so deletes the same. Which also drops one of the parents of btrfs_find_device() with the last arg false. So only device_list_add() is using btrfs_find_device() with the last arg as false, which the patch 2/2 finds is not required as well. So this patch drops the last arg in btrfs_find_device() altogether. Anand Jain (2): btrfs: drop never met condition of disk_total_bytes == 0 btrfs: fix btrfs_find_device unused arg seed fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 37 ++++++++++--------------------------- fs/btrfs/volumes.h | 2 +- 5 files changed, 17 insertions(+), 34 deletions(-) -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C750C2D0A3 for ; Thu, 29 Oct 2020 21:30:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3C9020731 for ; Thu, 29 Oct 2020 21:30:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="JW9UrsGk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726631AbgJ2Vav (ORCPT ); Thu, 29 Oct 2020 17:30:51 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:58168 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgJ2Vav (ORCPT ); Thu, 29 Oct 2020 17:30:51 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09TLScmS023635; Thu, 29 Oct 2020 21:30:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=y1U0+H8ujCKoFTwj6iDbrIvkVL1lK1HPgwAGJgHUAYk=; b=JW9UrsGkR2R5AR+uHxvBjE1PMhiNGGjesF37/Vi3tiMyLiiSmFC0Ru9lD/zAUebEKpdm HiP2X8wg6W49vPQjFwnGz3JD8nPNx1CkYxHNZ84UGlwIJ4i7RiOYXuf+jMkBKCogUOfT tbjVq9oPlw+Ekc+26HHQ8zAEUulR80fyB9wPHy6xJq5j+DlG/SNrKNoSx6H0ukv4bZtL iXNALN8Ps4TopH9lL8YKp1UYbMBT2IHs3cTgYjGgGXALoiWe/Z1AS74c08Pb8zvC7L3p 9Yo6VWWb7WVKQgFibOZVvoihD2rFdDrQtT3pJnCzPHSiwXCXEvcaqgMzmXF88AKZNNFx og== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 34dgm4csd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 29 Oct 2020 21:30:47 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09TLPSBp186800; Thu, 29 Oct 2020 21:30:47 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 34cx6yxycw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 21:30:46 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09TLUknF018288; Thu, 29 Oct 2020 21:30:46 GMT Received: from localhost.localdomain (/39.109.231.106) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Oct 2020 14:30:45 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.com, Anand Jain Subject: [PATCH RESEND 0/2] fix verify_one_dev_extent and btrfs_find_device Date: Fri, 30 Oct 2020 05:30:24 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9789 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290149 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9789 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 suspectscore=1 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290149 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Message-ID: <20201029213024.y0MNbKfWGL7aBCMIw9VfQztBMKvpJNFov2oQrtxJ8dM@z> (Resend: I am marking all the patches as v2, not just 1/2). v2: as in 1/2, 2/2 no change. btrfs_find_device()'s last arg %seed is unused, which the commit 343694eee8d8 (btrfs: switch seed device to list api) ignored purposely or missed. But there isn't any regression due to that. And this series makes it official that btrfs_find_device() doesn't need the last arg. To achieve that patch 1/2 critically reviews the need for the check disk_total_bytes == 0 in the function verify_one_dev_extent() and finds that, the condition is never met and so deletes the same. Which also drops one of the parents of btrfs_find_device() with the last arg false. So only device_list_add() is using btrfs_find_device() with the last arg as false, which the patch 2/2 finds is not required as well. So this patch drops the last arg in btrfs_find_device() altogether. Anand Jain (2): btrfs: drop never met condition of disk_total_bytes == 0 btrfs: fix btrfs_find_device unused arg seed fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 37 ++++++++++--------------------------- fs/btrfs/volumes.h | 2 +- 5 files changed, 17 insertions(+), 34 deletions(-) -- 2.25.1