Message ID | 73233a37a2e5ce11f8eff689c9f2eef4d8fcbee0.1677745385.git.anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-btrfs-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6485C6FA8E for <linux-btrfs@archiver.kernel.org>; Thu, 2 Mar 2023 13:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbjCBNbJ (ORCPT <rfc822;linux-btrfs@archiver.kernel.org>); Thu, 2 Mar 2023 08:31:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjCBNbI (ORCPT <rfc822;linux-btrfs@vger.kernel.org>); Thu, 2 Mar 2023 08:31:08 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8701C3B675 for <linux-btrfs@vger.kernel.org>; Thu, 2 Mar 2023 05:31:06 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 322DPqot029458 for <linux-btrfs@vger.kernel.org>; Thu, 2 Mar 2023 13:31:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=0lWsYGeI9Q+UMW/XUdqqhGcvgjFAk9AetfOQKPct5cU=; b=WZCjMEaI5Y44nmAUI2zLVe41FfMxV2lqsfhgsVepC2/VR4PaAl6DXXoWxacOmm1xc5k9 UX6cFSvZAiED3EmXCbG1HJAJ4nZrNSIHl5eD/0V5gwceGkiVwhKy+tPIfdDaUupYi8LV taCUrFaB2RbieEYLCFsI5bOLGwqgZ6QRX+SL4fn8g3PBK3akWdadSo/tHtV+WAJmZPl8 9AQ18mAd76661ZKvCeiObJGUberIKPehiz7XHkXKRw5/8QCLGi9/RBo+EZaeT0+jNmZY L2plDGV/qFzrqosGqEBwE3wjCj01Wx3e7V7/a2+hzMvQ4hCqBmLeJvf+52jgo5FwXz84 2g== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nyb7wuxes-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <linux-btrfs@vger.kernel.org>; Thu, 02 Mar 2023 13:31:06 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 322BrOED034864 for <linux-btrfs@vger.kernel.org>; Thu, 2 Mar 2023 13:31:04 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ny8sg4ksh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <linux-btrfs@vger.kernel.org>; Thu, 02 Mar 2023 13:31:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZBOU2blcr9pDxxi92v6vyutDCb3emM2Tiitc70pNzkymdPxlKbBzYPtMzci5ZmNgYwwNJoNrEYzQXjQMvw+vdjCcItU3Gltok5c1gLEiNI5Rj0OnpYwiWREvDlZmA6TSEYF1Y/3uDohhJgRSrnFk84y/y+PgFwoi/X4Y4e4zDrn1qPYC83W9L8Ovu4sN+nVpG0nAvN372nw/+jQq0HrlNeyYwAr/Ayiobg5YcjAqTbvRmoWd31rXzXIXHIThY9XrDnEhrTg5wBgNvQvforvRFEAt0+1WoQjE0SWx9KltolszU0n7Dx03F8cN2qbsLdvuYmGJDdPyOKmQ/jNPJ9mTTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0lWsYGeI9Q+UMW/XUdqqhGcvgjFAk9AetfOQKPct5cU=; b=etzttMJ3vTHQ7NCAq8NwkJeaWqpDZS8jpXNUHt4T7g9IxVN9bZEYrR1ecoYeIX4t3rs4VmC/HoObTCc99YjpV6HOkq5wHlUklBeg7DG9XcXYl/cg4YYExO7lAP/GmCIWp6A6BexCP+fYmJXcMwBXxOS7HFGvI/++MMcxhZm1npS4iUdWglwgEvW3lttwunquC3O7idy/HLI1teeQsQBeztUjAhRC8nyM1ubyrAvhrax90dj8WEa36hWLiY+ebYj3T30DIXI+eIiCUE3FsFfGbRh6KrwqHH1drOHvF/EOGV0pcVG8vRPevUevKoATm+VzdWkOTBquk2FoM+V6pt+1Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0lWsYGeI9Q+UMW/XUdqqhGcvgjFAk9AetfOQKPct5cU=; b=FH3QQ9YZ2X2WcXcOMCamIaJIsljUeUFUi3JwDfj1CQMR0KGzTeyvFDFl1semqUY0BY7Q2HsE83XG7kdC0ZdbAcLpV/ltnOdNLjqsYuU/nxihji35l4zqwDDIR+lhWy5HmveBLGEV7QkHPwHW27H7lCkIDDE4nksC2SEwc1qj4XI= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA3PR10MB7093.namprd10.prod.outlook.com (2603:10b6:806:304::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 13:31:00 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::3eb1:c999:6a64:205c]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::3eb1:c999:6a64:205c%5]) with mapi id 15.20.6156.017; Thu, 2 Mar 2023 13:31:00 +0000 From: Anand Jain <anand.jain@oracle.com> To: linux-btrfs@vger.kernel.org Cc: Anand Jain <anand.jain@oracle.com> Subject: [PATCH] btrfs: remove redundant clear NODISCARD Date: Thu, 2 Mar 2023 21:30:48 +0800 Message-Id: <73233a37a2e5ce11f8eff689c9f2eef4d8fcbee0.1677745385.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0020.apcprd02.prod.outlook.com (2603:1096:4:1f4::9) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA3PR10MB7093:EE_ X-MS-Office365-Filtering-Correlation-Id: dad4b94f-1314-4292-379f-08db1b225cfc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o8hfvTPDXQp0DLwxuxyTmpjzgYYAUVpIVJnuqBkWiPBvoXyXBYXnk/Di3D7cxCto4SDC5crgphl761OcgU/I7YrJDdbhKT6BEz3tP+84fzVwM9VLWTWRJjvHk3eZozfj2TuLDapqt5/d43AhGwUVo84PqW9xZjEkzO2WQcrYlPZEu1D+f3YRKr2HRHqb6tTlXcmg4pZ2x975pABT764omJ0EQGKHEJ63qPglMjhGge3MEMHjYxdwXFB2KmjN2Mr6DMzY5VSvCAsDvClnrrDoKsjoPfMJ2EKCXNzZ7Ql+kK9gZmgmeGSZWOijXy5DO3ZQ27hgSFDGMCn8YO++0kOnCgj05XFZOZfjJuNc8Ux3fMyQCeqPx14GmQG/RHeKESge6e1e/uROLbYC+8mrcuWkRqe60Fzl2tLtzOOiSfnzM9qccUjkjoq7q5gYT+agxO2nn/+FYM49ShEpx/PaLAHgSFznF8+vUXEhYkGiiT/I6pHHiQGqiWOeZHOOmaI5vVOaE/J7N0uf+kxtzamnhv4ltGpFzjODv7q7sCczFaw6iZfyz9w1DbaX3XFH0s0P9Pa5rPlaYq0Z8jJ8F7nMV2EmYTjCqwiKzqm6NLnbBHPYETcbjOGDYeCM1mWhuDAVLjIS6u8A9atNaqriRasp8xYXwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(136003)(366004)(396003)(39860400002)(346002)(376002)(451199018)(36756003)(6666004)(107886003)(6506007)(6486002)(26005)(2616005)(6512007)(186003)(316002)(41300700001)(6916009)(4326008)(4744005)(66556008)(66476007)(2906002)(8676002)(44832011)(5660300002)(478600001)(8936002)(38100700002)(86362001)(66946007)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Rjbs5vikg3+PYtnozHuV2POECt81i+tOcnzViNGMK7H9QLWWb72ROJxmYhu7hHbRPoNt0Aj+rqcsPMHxfgd0Y0n9dfhWzvWCpnm9X9ITAyBZg18g2iuG46w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tBKAEyyDmep6gacdxxu+Kcm71ixQSgrP5Od48vb2lu9Zip119d7uCDUjQZtx71UoCw7Sxq7YNqX0vxBqb8Fae/pA5qfoElvPPr8Nx8zr31l8rX4NyqMDhkbS/9ebY0h93ZBEUHSatKd9U6+8xtQIP8suPYUytNeviPSEzX3 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dad4b94f-1314-4292-379f-08db1b225cfc X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 13:31:00.7021 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: upuKq4cXpeb0VRB3o2TT3zEqBu93SQrWxJpMe0Uk54j41GvOPIoruRvnmcX1fROr3XGL5ojLYXejgseHvg5JMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR10MB7093 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-02_06,2023-03-02_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303020117 X-Proofpoint-GUID: dSjplM3WNR8kJ8nMdIH5U9uynj2WXB8z X-Proofpoint-ORIG-GUID: dSjplM3WNR8kJ8nMdIH5U9uynj2WXB8z Precedence: bulk List-ID: <linux-btrfs.vger.kernel.org> X-Mailing-List: linux-btrfs@vger.kernel.org |
Series |
btrfs: remove redundant clear NODISCARD
|
expand
|
On Thu, Mar 02, 2023 at 09:30:48PM +0800, Anand Jain wrote: > If no discard mount option is specified, including the NODISCARD option, > we make the async discard the default option then we don't have to call > the clear_opt again to clear the NODISCARD flag. > > Signed-off-by: Anand Jain <anand.jain@oracle.com> This is maybe 3rd time somebody points out the redundant clearing of the discard flags so I'll apply the patch. Thanks.
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5d86daa5d685..9d656eba7ce1 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3675,7 +3675,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device fs_info->fs_devices->discardable) { btrfs_set_and_info(fs_info, DISCARD_ASYNC, "auto enabling async discard"); - btrfs_clear_opt(fs_info->mount_opt, NODISCARD); } #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
If no discard mount option is specified, including the NODISCARD option, we make the async discard the default option then we don't have to call the clear_opt again to clear the NODISCARD flag. Signed-off-by: Anand Jain <anand.jain@oracle.com> --- fs/btrfs/disk-io.c | 1 - 1 file changed, 1 deletion(-)