Message ID | 67b189dab7575f9edbc41caa4118ee68856a56a2.1628854236.git.anand.jain@oracle.com |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 C549EC4338F for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 12:12:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA64060F36 for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 12:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240354AbhHMMNZ (ORCPT <rfc822;stable@archiver.kernel.org>); Fri, 13 Aug 2021 08:13:25 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:24646 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240330AbhHMMNX (ORCPT <rfc822;stable@vger.kernel.org>); Fri, 13 Aug 2021 08:13:23 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17DC6C8h020307; Fri, 13 Aug 2021 12:12:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=lvXMEPj2paTkuoqhJOSwBXNwDz5KZgoiTCyk1Wr1xLg=; b=wYVOTcE0SONJ89nPW+MYCf7TtujGOIhYzmZJsfOePfCZTKNjVjsXVaoIZVEYGxWB2WuS l0PP4hZ9U+FAJ61Dx0etZElizQFcTwrJ1p6BPiJLiZJ1622oSeRZivyZZBtzTiHrj7nf O7b626Du7cMCIms+btyhQfZsaNQlyJFKmt+fg83nJ1U5ROdb76L56XcqmwFwev2y7Ezk zE4yNYNPLyrR/fI1/mAoseOtuTdLgYNzj6QM9f0gThYxBCUBCPscKTPC5UFLKzhGxLPt zw/yj0LhMe5DamaC90NUc6A+jMWIZCI49fl+PoPK7eLiNj4UB1syBjkpAqq4/g/tNCY2 7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2020-01-29; bh=lvXMEPj2paTkuoqhJOSwBXNwDz5KZgoiTCyk1Wr1xLg=; b=N1RKhXRPAkTC+Cq3FtrZWFeMWaWhvKXjs8aFSKMTml8e8I6wltmqMur4WqTQMACBbgjv yGjyRItFKI1vajU54DjcZQIIJtAMdUeIpgBMj3O2vdYhwadCsyWlk3xHntiXCLkiwDyb SAeAoeTwe6n6rIxcNg0WrBJSIGVg9F+vnyP0w87FxHSpAn4Quwnp5ZWtEJoz4vASeV7G enjX3pVpMg1G64i7k0rGCrYfPCDPTJ8XneHn3Fsy0rHhcALfS58rBE8LmORu26I22fCV N1G3r3aXasQdZSWU1+CtTAwuMtuUZh+zj+LcxVQvNB2z6pSikBV+ZZHieTS71OgtdIVk bg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3ad2ajjpra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Aug 2021 12:12:52 +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 17DCAKjt066661; Fri, 13 Aug 2021 12:12:51 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102]) by userp3030.oracle.com with ESMTP id 3abjwagpqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Aug 2021 12:12:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kUdoLyZbScFAYrx1do3N5PhseLu7g0TeU42Q5hqVcDzdV5qNqk40kprHrNS9tBDIQoKx42DiDw/Tx6WjXl6FmGHvapzDXfS6VzhXSQ9RseOAeM6f2ZE5JQC0Obc/AMjDxoOVQyneiHpYdvMzxzRQGF9IHePqXjmHAfJpLRcbF98UL2lSpsLt5E87y6D3Bdv1m6zrtp0hit3vbGL8sERPNwVLXXWf48oVU6HA7hglHT7pVOITt1A1YAlpqPLWCW+O911pf1tCFN81yEGvN9ZVdyvy4DaevWakkiU0OnJFx9uhC5LXfu3vebddWHTZWwtz+M8xno9eQYUciQTpWVyldw== 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-SenderADCheck; bh=lvXMEPj2paTkuoqhJOSwBXNwDz5KZgoiTCyk1Wr1xLg=; b=Hpjoj/CvSKWj76N0me404/a4MSHCGscEpEU8ch4ou5HzX7XePbnZb3x6h/6HhZIxMQ0HYnRhXpP2f0mje9HpFErUeHVCCgg4T+04pRuUnT8ss5SnzY5Mim8x6FGpd9pCAilK6eZmCT5vbypnC2Mi3x0Xz4kqOcBoduzL6uLz3Q7aVlDxyx2DWbJbfHZiYvv9EPkeZzF7xLh27Magt62S4+dTTbdcVFFXWJ1mJJv6XxsVrO2xUuZZyE4HQnWzHGThL8W5QGw0Od7ZDQKLe35aYrLt5SIFZ1ateKZMmIFsXs0E3zkLoSOWWod8U/jtRu0tk7cuzCQo3BiKjQT8jPhXUA== 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=lvXMEPj2paTkuoqhJOSwBXNwDz5KZgoiTCyk1Wr1xLg=; b=pUfAKUVtVGPsN+zWaFauPTw4qzlE74xmuA0nLRPgTwEj3qR0KRiXPmg6GUuWi/j/2lOVFuj1AQzOA0VpGk2qlGyhYG3beptx8OQt6Wr+fiaH174Pt/mTDYcoA3IJwRW+rJjrHJRlMaAhhTBmxPERwGtRReTTg92GNmn2gM4uvdM= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=oracle.com; Received: from MN2PR10MB4128.namprd10.prod.outlook.com (2603:10b6:208:1d2::24) by MN2PR10MB3837.namprd10.prod.outlook.com (2603:10b6:208:183::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16; Fri, 13 Aug 2021 12:12:48 +0000 Received: from MN2PR10MB4128.namprd10.prod.outlook.com ([fe80::b813:4805:31e:d36a]) by MN2PR10MB4128.namprd10.prod.outlook.com ([fe80::b813:4805:31e:d36a%5]) with mapi id 15.20.4415.019; Fri, 13 Aug 2021 12:12:48 +0000 From: Anand Jain <anand.jain@oracle.com> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, fdmanana@suse.com, Nikolay Borisov <nborisov@suse.com>, Qu Wenruo <wqu@suse.com>, Anand Jain <anand.jain@oracle.com> Subject: [PATCH 3/3] btrfs: don't flush from btrfs_delayed_inode_reserve_metadata Date: Fri, 13 Aug 2021 20:12:25 +0800 Message-Id: <67b189dab7575f9edbc41caa4118ee68856a56a2.1628854236.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <cover.1628854236.git.anand.jain@oracle.com> References: <cover.1628854236.git.anand.jain@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0155.apcprd04.prod.outlook.com (2603:1096:4::17) To MN2PR10MB4128.namprd10.prod.outlook.com (2603:10b6:208:1d2::24) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (39.109.186.25) by SG2PR04CA0155.apcprd04.prod.outlook.com (2603:1096:4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17 via Frontend Transport; Fri, 13 Aug 2021 12:12:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb33a27a-2d30-4e4a-e619-08d95e53aa5a X-MS-TrafficTypeDiagnostic: MN2PR10MB3837: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <MN2PR10MB3837E8061FAE8766231BCFFAE5FA9@MN2PR10MB3837.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ceUe5a7VU+hURZ8jBo2U33+8n4eP0CeGAtmh6l1HfcondWg2yajAMRO1OlOK2OOZdqPTmsX7BmuKEkVeUvqPmb7WzMTDEM9PedeAjZia1pOrrvuAl+k0uRIbnQd3HW3T4QSCIs+IamCNOiHQxygmtTM8RJmH/5W4g5WGpStnF8UHVFYIQT2dGiBqoOszC84+RXvlk6DkO6Qte5+xFbRD0HQwXLXhLl/BZBOP03FjIrSm+aMqK9fcDofEVJ83nnFEXJn21Anh4G3OvVwpLBpcHATaB+wKPaJTNKGVSqrwm+7RqGuKsX9vvbfgx6uH2fRA0QnpdctJEV4O5buFdRPC23CV7IN6P+i0zQLJd21ja+iyXgvELSabHaF1PEoOVFDRwGfKjXJUL0p2m7FnueRRUNm/Tgt9AebY6iRmoOxQSNnXbm9g4IvIWQeibJ46IhEXlWpHHw083gxoyqgSo0ZfmyoHZqc5OBbWC+nq9nATdiLXB1CIHeeRlyWTH7isHAwbrVndP6fPx0dUY1h5Z2t9Q6uR9g5+6YToKQzsohiBjlP6mvedrk7JBIDfSmLXfCdrZY2/KsKA3vlseCSCNDImYuP8h1C6irOPth2z3PU9QAoQbID6tadUj661xMtBXvDtcN9rScbJ+U/9bxvVIm2MUfbfvO+d2lwYFBgSrIUqL17j6OCCAW8VT7xbdqGfTK7D5h/Mb/Z5Epmxb0LWvKdyOQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR10MB4128.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(346002)(136003)(366004)(39860400002)(54906003)(8936002)(478600001)(38100700002)(2616005)(956004)(38350700002)(107886003)(44832011)(52116002)(2906002)(316002)(5660300002)(8676002)(6666004)(26005)(6506007)(186003)(36756003)(83380400001)(66476007)(66556008)(6512007)(6486002)(66946007)(86362001)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rX3fPKdXU1EaJ6yGvau+JB2a+AkKCyiNB7kHxpV3kZI3Ze0DB4pUfQiYAnlDBIQTC7B3qROuHjIUQN9SSlGEZaCr1bVtte/WrSnzTzR9fz8yO8E0zsMeG13bjHylQrdCzSNhHUq+xw8CfJBbGMULWLAyXWotbJG5dk+K1nTPrcrbzJ4brZWsagC4RPlwvojIuyF4AzPv8SibSQulX8kW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NgdrGMUdJircrVSdBPUO+V2pr+Sq/k/FGbvQts++WU77ZzTdV8PuR8TRB X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb33a27a-2d30-4e4a-e619-08d95e53aa5a X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4128.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2021 12:12:48.6471 (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: kyNrSvfWa8hBuYzHZ+Q3nUobfgQP9RcjoX4aF6KAvhfEMlC5XMLp/QYskp5Cj5i8EdRg2Z3Ppw8PRJD6SO4HsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3837 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10074 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108130074 X-Proofpoint-ORIG-GUID: TrUWmagXoKfUdQdxMLk2uwUlaRrC0de0 X-Proofpoint-GUID: TrUWmagXoKfUdQdxMLk2uwUlaRrC0de0 Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
btrfs: backport hang fixes due to commit c53e9653605d
|
expand
|
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 7dad8794ee38..e7f8cf1531bc 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -627,7 +627,8 @@ static int btrfs_delayed_inode_reserve_metadata( */ if (!src_rsv || (!trans->bytes_reserved && src_rsv->type != BTRFS_BLOCK_RSV_DELALLOC)) { - ret = btrfs_qgroup_reserve_meta_prealloc(root, num_bytes, true); + ret = btrfs_qgroup_reserve_meta(root, num_bytes, + BTRFS_QGROUP_RSV_META_PREALLOC, true); if (ret < 0) return ret; ret = btrfs_block_rsv_add(root, dst_rsv, num_bytes, diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 64dd702a5448..a38dcf6ae4f9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6375,7 +6375,7 @@ static int btrfs_dirty_inode(struct inode *inode) return PTR_ERR(trans); ret = btrfs_update_inode(trans, root, inode); - if (ret && ret == -ENOSPC) { + if (ret && (ret == -ENOSPC || ret == -EDQUOT)) { /* whoops, lets try again with the full transaction */ btrfs_end_transaction(trans); trans = btrfs_start_transaction(root, 1);