From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from air.basealt.ru (air.basealt.ru [193.43.8.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64CF01991C6 for ; Mon, 18 Nov 2024 10:21:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.43.8.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731925262; cv=none; b=jcW4hh456WZINWD7kgg56VFEFhqmqFPjXg/nQlDNVYzBYY+diuNoTUAd48WB4+XugEgXkjmSq+jQmGQicZlMD2Ur0/71l5jCJD5rzSxhb5/Z9pgLwv5iH2lpxpZcZyask45J/sSwyaOSurz3bvrX/agGaQJd8Cgb6gW6QgCGimg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731925262; c=relaxed/simple; bh=BaQVs6E5Uz5JL7AiucAi372j8GeN1tCD9KuaizjscyM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QGiHKpPvV4XLL8QMo9r/5vuMp6sRNZ7eyNW9vT41r+13tlHCXFlc86JJzLGKLkVhr+ZCuOtbd4XZqMhYn4fT30ssYsWlByebCst0XYpkrYve9h5Ghy76cZdj31+eerRVMAG462stLkEYzD+NaYMlHtmSS524oFxgzD5tXIHdJis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=193.43.8.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from altlinux.malta.altlinux.ru (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 4E1CE2338D; Mon, 18 Nov 2024 13:20:58 +0300 (MSK) From: Vasiliy Kovalev To: Greg Kroah-Hartman , Sasha Levin , stable@vger.kernel.org Cc: lvc-project@linuxtesting.org, dutyrok@altlinux.org, gerben@altlinux.org, kovalev@altlinux.org Subject: [PATCH 1/3] ext4: factor out ext4_hash_info_init() Date: Mon, 18 Nov 2024 13:20:48 +0300 Message-Id: <20241118102050.16077-2-kovalev@altlinux.org> X-Mailer: git-send-email 2.33.8 In-Reply-To: <20241118102050.16077-1-kovalev@altlinux.org> References: <20241118102050.16077-1-kovalev@altlinux.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jason Yan [ Upstream commit db9345d9e6f075e1ec26afadf744078ead935fec ] Factor out ext4_hash_info_init() to simplify __ext4_fill_super(). No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-2-yanaijie@huawei.com Signed-off-by: Theodore Ts'o Signed-off-by: Vasiliy Kovalev --- fs/ext4/super.c | 50 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3bf214d4afef5..cf2c8cf507780 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5042,6 +5042,35 @@ static int ext4_load_super(struct super_block *sb, ext4_fsblk_t *lsb, return ret; } +static void ext4_hash_info_init(struct super_block *sb) +{ + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_super_block *es = sbi->s_es; + unsigned int i; + + for (i = 0; i < 4; i++) + sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); + + sbi->s_def_hash_version = es->s_def_hash_version; + if (ext4_has_feature_dir_index(sb)) { + i = le32_to_cpu(es->s_flags); + if (i & EXT2_FLAGS_UNSIGNED_HASH) + sbi->s_hash_unsigned = 3; + else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) { +#ifdef __CHAR_UNSIGNED__ + if (!sb_rdonly(sb)) + es->s_flags |= + cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH); + sbi->s_hash_unsigned = 3; +#else + if (!sb_rdonly(sb)) + es->s_flags |= + cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); +#endif + } + } +} + static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) { struct ext4_super_block *es = NULL; @@ -5197,26 +5226,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); - for (i = 0; i < 4; i++) - sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); - sbi->s_def_hash_version = es->s_def_hash_version; - if (ext4_has_feature_dir_index(sb)) { - i = le32_to_cpu(es->s_flags); - if (i & EXT2_FLAGS_UNSIGNED_HASH) - sbi->s_hash_unsigned = 3; - else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) { -#ifdef __CHAR_UNSIGNED__ - if (!sb_rdonly(sb)) - es->s_flags |= - cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH); - sbi->s_hash_unsigned = 3; -#else - if (!sb_rdonly(sb)) - es->s_flags |= - cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); -#endif - } - } + ext4_hash_info_init(sb); if (ext4_handle_clustersize(sb)) goto failed_mount; -- 2.33.8 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBA281459F6 for ; Tue, 19 Nov 2024 04:36:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731990993; cv=none; b=k9u/PMDDkc7vAr1fKFSFMACSuD/847PBVzWpPl7v0ybbQCR/sAUs5DsGO+JXjM47rITN29HT17tfNF4qmckFqULEwXjZ3UFzoZUw2mr288EL2d2nK8e68jnW0F33ggI1dz9rlcB+/w2cRqvmr4QqAQfIWYUEA9q50FmWe8RSi1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731990993; c=relaxed/simple; bh=tKpjcykir+6ISqJT1uczCxoj48Ekr7FDn1bijRpl1eg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XdU58WtgGQdjS0J0nEnr4hdmwnKxwzpIEbm/FB9CLa8pxJXhcMsTysS6Q6xd0s5/U4RNDSllF+zut/j48oGFTgezUEysB247s8pJa/NOb1+kpBdHSbyQENagN0RAWFb9M15IYYowR5mvVgulx0mvTik9+bQ+e1TnvrDZgnvW9II= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VeGAwzJe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VeGAwzJe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AC27C4CECF; Tue, 19 Nov 2024 04:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731990993; bh=tKpjcykir+6ISqJT1uczCxoj48Ekr7FDn1bijRpl1eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VeGAwzJeFd/6jxOYmDoErlRb8qQyG8dx22h8Z47iRAr9w4f98pRewzEGS8XtrxAzd Uge8gsoD/925/DR4DaQHLxm3y5GsfQnC9Tw+/WBxT0k08C7V8GPyU3L62Qb2U3vMVF l6/nul+Pbk9zIzeccvooL4XSrZz9WhP4KOrhGQEz7L6/qWDx8aW3oth2fYW9NcVlL/ I7+ipYTgm0+tJqpm09aP3LJvjcS9sadm3M9n0mryOw3lw3RU62/fGCWQVfiJc1TTP3 vCnyRiMYgniXJjSHeuvlr+7wx3c6YkHHh4WyF45A4p9Tcn99ZJsJybP2Rif4KxMlWJ nbCIOLj0RRPYg== From: Sasha Levin To: stable@vger.kernel.org Cc: Vasiliy Kovalev , Sasha Levin Subject: Re: [PATCH 1/3] ext4: factor out ext4_hash_info_init() Date: Mon, 18 Nov 2024 23:36:31 -0500 Message-ID: <20241118102050.16077-2-kovalev@altlinux.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241118102050.16077-2-kovalev@altlinux.org> References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <20241119043631.N0i6d6Mig_38jmpTAbWTVprfYFrp7qxQoWVJCl8yCIQ@z> [ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: db9345d9e6f075e1ec26afadf744078ead935fec WARNING: Author mismatch between patch and upstream commit: Backport author: Vasiliy Kovalev Commit author: Jason Yan Commit in newer trees: |-----------------|----------------------------------------------| | 6.11.y | Present (exact SHA1) | |-----------------|----------------------------------------------| Note: The patch differs from the upstream commit: --- --- - 2024-11-18 17:26:48.895059440 -0500 +++ /tmp/tmp.VjhMY5d2bY 2024-11-18 17:26:48.887055706 -0500 @@ -1,18 +1,21 @@ +[ Upstream commit db9345d9e6f075e1ec26afadf744078ead935fec ] + Factor out ext4_hash_info_init() to simplify __ext4_fill_super(). No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-2-yanaijie@huawei.com Signed-off-by: Theodore Ts'o +Signed-off-by: Vasiliy Kovalev --- fs/ext4/super.c | 50 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index 690faf766d23a..13c0345c53873 100644 +index 3bf214d4afef5..cf2c8cf507780 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5024,6 +5024,35 @@ static int ext4_load_super(struct super_block *sb, ext4_fsblk_t *lsb, +@@ -5042,6 +5042,35 @@ static int ext4_load_super(struct super_block *sb, ext4_fsblk_t *lsb, return ret; } @@ -48,7 +51,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) { struct ext4_super_block *es = NULL; -@@ -5179,26 +5208,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) +@@ -5197,26 +5226,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); @@ -76,3 +79,6 @@ if (ext4_handle_clustersize(sb)) goto failed_mount; +-- +2.33.8 + --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.11.y | Failed | N/A | | stable/linux-6.6.y | Failed | N/A | | stable/linux-6.1.y | Success | Success | | stable/linux-5.15.y | Failed | N/A | | stable/linux-5.10.y | Failed | N/A | | stable/linux-5.4.y | Failed | N/A | | stable/linux-4.19.y | Failed | N/A |