Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp113127rdb; Thu, 5 Oct 2023 19:34:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkaZpD1WWAC+SBviT6fIvduXXas2wnhpvqZYmycZlRR+wrvFJcD6950WCRoTlM15w50qsT X-Received: by 2002:a25:cf45:0:b0:d12:1094:2036 with SMTP id f66-20020a25cf45000000b00d1210942036mr7219719ybg.43.1696559646172; Thu, 05 Oct 2023 19:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696559646; cv=none; d=google.com; s=arc-20160816; b=OG2yMIqqnBbtpMHrv58xGK1jUr3DIqaa24IIL0vZHgV7oKcABCehCwBy6wb65lqpZR XtcMai2GqwlGJsv4lB3P+R/8wD6oihKJ8K2S1BY96ejSXtWb49wjWsPGsdBfoMOyybuy OdP0TKV+E3zv5zZ6AnpFSJWIS1vVkcLO1PtOIkra4kwhZMhgK0fC4ibIGaUOdtzYDuWO ghJ6p7VbMb4fbSxohHqP5G06BBmNEmY69mqLjL8fhy25n5Uo/ypXRKuOSnjH06E5CeD5 4Oqw3G2yRHx5T9tRxe1ZEvHaYhb/D5fWrbicx6ZeG0O5gx6KLAHz0BD2vgq6W9ook1PR V2SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iRGmGbDJY30iIloA9rzpgpKjF/B1qICiSCNOtjmmFIw=; fh=J3hzPs6pJetEDskqGjum+u3BtjIVO/7ONpjgTWKF28Y=; b=mTDVLkymLSDGKfFXNAZ/0b8dfjRQuiDZyyMia5ZlUqPk1C6TqEoggJh19Mee6fiM+i llaj+4RpXY16Gz8UVdzL0CKP9PTd7t6lf7QSF3ugy1ghVXpSgxUfuMAVxiy6jBHDVLkW 9paIPJw6g/kRROjIe5nJeIGGJoDRc8/HyuPmadp5EZ5r7bHvRM8aZwGM8oarD3Z4w0HW VQ9kubGUne+8GZ3h4IY4pMRvMEZVoYp89GWf88UHqADiYlVFiUIvjmjFGeuO7X8plWmn NRe3fH+ZA2r0FUFZcNCPloO/iiCnMTGBU1oV6QxwOoqPZoRrTrBvl/8kjm0i89JuZ2HI JnIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=cQH2j1qE; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l186-20020a6388c3000000b00584ba113ec5si2701189pgd.370.2023.10.05.19.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 19:34:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=cQH2j1qE; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 36B7180CC23D; Thu, 5 Oct 2023 19:34:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229739AbjJFCd5 (ORCPT + 99 others); Thu, 5 Oct 2023 22:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjJFCdz (ORCPT ); Thu, 5 Oct 2023 22:33:55 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FC88E4 for ; Thu, 5 Oct 2023 19:33:53 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-111-143.bstnma.fios.verizon.net [173.48.111.143]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 3962XHSE030957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Oct 2023 22:33:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1696559600; bh=iRGmGbDJY30iIloA9rzpgpKjF/B1qICiSCNOtjmmFIw=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=cQH2j1qEYxfHJGty9SixEEFqo6jvZ5ettsbRlleGVhAFa7s7cbN3T9C/RbCvU3TBH 6bATcUy+3Dcli+VMq4jNP9TK01Qknuj9eGWQFj9bGDeNdNXyF3GhKfMwscRDYV2QQZ AY3Li1lUiCCybBbIY8cKszWZLMj1QZ2MwNCUtDkRwqRFyLA93Jw9xs7u4Q9IJUSOy7 e603AE+7Q34s5EYn1uW9nHaZIjwpnlxJbCS2fDBQBC7AVR0XszGgwtBwcfwK44Lcz9 X2om4+Ka5JShVT5YiRR61AIRqRs9SGgyTRoTGR8GyOu6sWYQgSxml63iNGkSj73Dm0 AN5Ctm8E5HZQw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3112E15C0250; Thu, 5 Oct 2023 22:33:17 -0400 (EDT) Date: Thu, 5 Oct 2023 22:33:17 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: Zhang Yi , linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [RFC PATCH 01/16] ext4: correct the start block of counting reserved clusters Message-ID: <20231006023317.GA24026@mit.edu> References: <20230824092619.1327976-1-yi.zhang@huaweicloud.com> <20230824092619.1327976-2-yi.zhang@huaweicloud.com> <20230830131031.j7r266e77i5k6z2p@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230830131031.j7r266e77i5k6z2p@quack3> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 05 Oct 2023 19:34:01 -0700 (PDT) On Wed, Aug 30, 2023 at 03:10:31PM +0200, Jan Kara wrote: > On Thu 24-08-23 17:26:04, Zhang Yi wrote: > > From: Zhang Yi > > > > When big allocate feature is enabled, we need to count and update > > reserved clusters before removing a delayed only extent_status entry. > > {init|count|get}_rsvd() have already done this, but the start block > > number of this counting isn's correct in the following case. > > > > lblk end > > | | > > v v > > ------------------------- > > | | orig_es > > ------------------------- > > ^ ^ > > len1 is 0 | len2 | > > > > If the start block of the orig_es entry founded is bigger than lblk, we > > passed lblk as start block to count_rsvd(), but the length is correct, > > finally, the range to be counted is offset. This patch fix this by > > passing the start blocks to 'orig_es->lblk + len1'. > > > > Signed-off-by: Zhang Yi > > Looks good. Feel free to add: > > Reviewed-by: Jan Kara Thanks, I've applied the first two patches in this series, since these are bug fixes. The rest of the patch series requires more analysis and review. - Ted