From d8e1ad2cf36634ad8a0676b31a23d8b459247761 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Sun, 10 Jan 2021 19:46:42 -0800 Subject: [PATCH] =?utf8?q?LU-14317=20ldiskfs:=20=E2=80=98%llu=E2=80=99=20m?= =?utf8?q?ismatch=20with=20type=20=E2=80=98long=20int=E2=80=99=20on=20arm6?= =?utf8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes build issues like this one on arm64: lustre-release/ldiskfs/mballoc.c: In function ‘ldiskfs_mb_release’: lustre-release/ldiskfs/mballoc.c:3180:4: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘long int’ [-Wformat=] "mballoc: (%llu, %llu, %llu) useless c(0,1,2) loops", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I07018302fae8da3b71c0cc649753bdcccdc0d34f Test-Parameters: trivial Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/41191 Tested-by: jenkins Reviewed-by: Arshad Hussain Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons --- .../patches/rhel8/ext4-simple-blockalloc.patch | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/rhel8/ext4-simple-blockalloc.patch b/ldiskfs/kernel_patches/patches/rhel8/ext4-simple-blockalloc.patch index 1a3ae06..f5ecabd 100644 --- a/ldiskfs/kernel_patches/patches/rhel8/ext4-simple-blockalloc.patch +++ b/ldiskfs/kernel_patches/patches/rhel8/ext4-simple-blockalloc.patch @@ -117,17 +117,17 @@ index 15c962f..7870406 100644 + seq_printf(seq, "\t\tlost: %u\n", atomic_read(&sbi->s_mb_lost_chunks)); + + seq_printf(seq, "\tuseless_c1_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_failed[0])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[0])); + seq_printf(seq, "\tuseless_c2_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_failed[1])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[1])); + seq_printf(seq, "\tuseless_c3_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_failed[2])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[2])); + seq_printf(seq, "\tskipped_c1_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_skipped[0])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[0])); + seq_printf(seq, "\tskipped_c2_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_skipped[1])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[1])); + seq_printf(seq, "\tskipped_c3_loops: %llu\n", -+ atomic64_read(&sbi->s_bal_cX_skipped[2])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[2])); + seq_printf(seq, "\tbuddies_generated: %lu\n", + sbi->s_mb_buddies_generated); + seq_printf(seq, "\tbuddies_time_used: %llu\n", sbi->s_mb_generation_time); @@ -213,14 +213,14 @@ index 15c962f..7870406 100644 atomic_read(&sbi->s_bal_success)); + ext4_msg(sb, KERN_INFO, + "mballoc: (%llu, %llu, %llu) useless c(0,1,2) loops", -+ atomic64_read(&sbi->s_bal_cX_failed[0]), -+ atomic64_read(&sbi->s_bal_cX_failed[1]), -+ atomic64_read(&sbi->s_bal_cX_failed[2])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[0]), ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[1]), ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_failed[2])); + ext4_msg(sb, KERN_INFO, + "mballoc: (%llu, %llu, %llu) skipped c(0,1,2) loops", -+ atomic64_read(&sbi->s_bal_cX_skipped[0]), -+ atomic64_read(&sbi->s_bal_cX_skipped[1]), -+ atomic64_read(&sbi->s_bal_cX_skipped[2])); ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[0]), ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[1]), ++ (unsigned long long)atomic64_read(&sbi->s_bal_cX_skipped[2])); ext4_msg(sb, KERN_INFO, "mballoc: %u extents scanned, %u goal hits, " "%u 2^N hits, %u breaks, %u lost", -- 1.8.3.1