drbd: restore compatibility with 32bit kernels
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 11 Nov 2010 21:41:04 +0000 (22:41 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Mar 2011 10:19:13 +0000 (11:19 +0100)
With commit
drbd: further converge progress display of resync and online-verify
accidentally an u64/u64 div was introduced, causing an unresolvable
symbol __udivdi3 to be reference. Actually for that division, 32bit are
still suficient for now, so we can revert to unsigned long instead.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_proc.c

index 329b66a91e4493e22f3f5e72d94e9500bb43837f..49d817cfe865bbdedbb8d0381739c26ce45cd7bc 100644 (file)
@@ -164,8 +164,8 @@ static void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq)
        if (proc_details >= 1) {
                /* 64 bit:
                 * we convert to sectors in the display below. */
-               u64 bm_bits = drbd_bm_bits(mdev);
-               u64 bit_pos;
+               unsigned long bm_bits = drbd_bm_bits(mdev);
+               unsigned long bit_pos;
                if (mdev->state.conn == C_VERIFY_S ||
                    mdev->state.conn == C_VERIFY_T)
                        bit_pos = bm_bits - mdev->ov_left;
@@ -176,8 +176,8 @@ static void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq)
                seq_printf(seq,
                        "\t%3d%% sector pos: %llu/%llu\n",
                        (int)(bit_pos / (bm_bits/100+1)),
-                       (unsigned long long) BM_BIT_TO_SECT(bit_pos),
-                       (unsigned long long) BM_BIT_TO_SECT(bm_bits));
+                       (unsigned long long)bit_pos * BM_SECT_PER_BIT,
+                       (unsigned long long)bm_bits * BM_SECT_PER_BIT);
        }
 }