Whamcloud - gitweb
LU-11838 osp: atomic64_read() returns s64 76/34676/4
authorLi Dongyang <dongyangli@ddn.com>
Tue, 16 Apr 2019 05:28:11 +0000 (15:28 +1000)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 May 2019 05:12:42 +0000 (05:12 +0000)
Since kernel 4.17 atomic64_read on x86_64 returns s64
instead of long.

Use %llu as the format specifier and explicitly cast it
to unsigned long long.

Test-Parameters:trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I805d43251f24417e6405f5d087927c15cf531619
Reviewed-on: https://review.whamcloud.com/34676
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osp/osp_dev.c

index 0aaf162..a85588d 100644 (file)
@@ -828,8 +828,8 @@ static int osp_sync(const struct lu_env *env, struct dt_device *dev)
        if (rc != 0)
                GOTO(out, rc);
 
-       CDEBUG(D_CACHE, "%s: processed %lu\n", d->opd_obd->obd_name,
-              atomic64_read(&d->opd_sync_processed_recs));
+       CDEBUG(D_CACHE, "%s: processed %llu\n", d->opd_obd->obd_name,
+              (unsigned long long)atomic64_read(&d->opd_sync_processed_recs));
 
        while (atomic64_read(&d->opd_sync_processed_recs) < old + recs) {
                __u64 last = atomic64_read(&d->opd_sync_processed_recs);