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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E67EC433EF for ; Fri, 15 Jul 2022 23:52:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbiGOXwi (ORCPT ); Fri, 15 Jul 2022 19:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiGOXwh (ORCPT ); Fri, 15 Jul 2022 19:52:37 -0400 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EABEC6C117 for ; Fri, 15 Jul 2022 16:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1657929156; x=1689465156; h=from:to:cc:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version:subject; bh=12G5vfObsFHYgM2xAW2erNrvONRQKINyfebPIzerN3A=; b=WRTnh0UnVKrLAlFBTb4rXGtO8CRzHwT/MH0cqFHvV5i7NV54WenIjL+F xbui08wiAhEQCSOenj1UWNe6bUFmWibAVT3rEtPpTMjMTk//xql59QoPS TeXDgnV7tewhEcM0hdmwICSvhMIKL0y/aiITidtS+ZzASeOa5onGcIyXf c=; X-IronPort-AV: E=Sophos;i="5.92,275,1650931200"; d="scan'208";a="238950493" Subject: Re: [PATCH 1/2] ext4: reduce computation of overhead during resize Thread-Topic: [PATCH 1/2] ext4: reduce computation of overhead during resize Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-87b71607.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP; 15 Jul 2022 23:52:35 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1a-87b71607.us-east-1.amazon.com (Postfix) with ESMTPS id E7C49140FE8; Fri, 15 Jul 2022 23:52:33 +0000 (UTC) Received: from EX13D23UWA003.ant.amazon.com (10.43.160.194) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Fri, 15 Jul 2022 23:52:33 +0000 Received: from EX13D23UWA003.ant.amazon.com (10.43.160.194) by EX13D23UWA003.ant.amazon.com (10.43.160.194) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Fri, 15 Jul 2022 23:52:32 +0000 Received: from EX13D23UWA003.ant.amazon.com ([10.43.160.194]) by EX13D23UWA003.ant.amazon.com ([10.43.160.194]) with mapi id 15.00.1497.036; Fri, 15 Jul 2022 23:52:32 +0000 From: "Kiselev, Oleg" To: Jan Kara CC: "linux-ext4@vger.kernel.org" , Theodore Ts'o Thread-Index: AQHYjCeH91+dMyGz00Kz59z9i8AzhK19+ACAgABmgYCAAONsAIAA72YA Date: Fri, 15 Jul 2022 23:52:32 +0000 Message-ID: <23CB6B29-F40D-4359-B7E3-85515217D45B@amazon.com> References: <20220714134645.r4gqax4au5el2pox@quack3> <63A35E4E-C7B9-4B2C-BBCC-F43BECDFEA6A@amazon.com> <20220715092736.oa2tfcgh5a6dcpnf@quack3> In-Reply-To: <20220715092736.oa2tfcgh5a6dcpnf@quack3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3696.100.31) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.160.111] Content-Type: text/plain; charset="us-ascii" Content-ID: <08A746C65FE92C4EBA5B6B9A9BD23E18@amazon.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > On Jul 15, 2022, at 2:27 AM, Jan Kara wrote: >=20 > CAUTION: This email originated from outside of the organization. Do not c= lick links or open attachments unless you can confirm the sender and know t= he content is safe. >=20 >=20 >=20 > On Thu 14-07-22 19:53:38, Kiselev, Oleg wrote: >>>=20 >>>> + sbi->s_overhead +=3D overhead; >>>> + es->s_overhead_clusters =3D cpu_to_le32((unsigned long) sbi->s= _overhead); >>> ^^^ the typecast looks >>> bogus here... >>=20 >> This cast is the reverse of le32_to_cpu() cast done in fs/ext4/super.c:_= _ext4_fill_super(): >> sbi->s_overhead =3D le32_to_cpu(es->s_overhead_clusters); >> And follows the logic of casting done in fs/ext4/ioctl.c:set_overhead() = and fs/ext4/ioctl.c:ext4_update_overhead(). >=20 > I didn't mean the cpu_to_le32() call but rather the (unsigned long) part. > That is pointless because sbi->s_overhead is already 'unsigned long' and > even if it was not, I have hard time seeing a reason why would casting to > unsigned long make any difference here. Got it. You are right. The indent of your comment got mangled by mail, so= it looked like it was directed to cpu_to_ie32()! =20 >=20 > Ho= nza > -- > Jan Kara > SUSE Labs, CR