Btrfs: use linux/sizes.h to represent constants
[deliverable/linux.git] / fs / btrfs / tests / extent-io-tests.c
index 9e9f2368177d42114726fe4859ca938c8cd8079e..6ec2bce015dc1f91fa20dbabc18fd61b974ac4d1 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/pagemap.h>
 #include <linux/sched.h>
+#include <linux/sizes.h>
 #include "btrfs-tests.h"
 #include "../extent_io.h"
 
@@ -70,8 +71,8 @@ static int test_find_delalloc(void)
        struct page *page;
        struct page *locked_page = NULL;
        unsigned long index = 0;
-       u64 total_dirty = 256 * 1024 * 1024;
-       u64 max_bytes = 128 * 1024 * 1024;
+       u64 total_dirty = SZ_256M;
+       u64 max_bytes = SZ_128M;
        u64 start, end, test_start;
        u64 found;
        int ret = -EINVAL;
@@ -133,7 +134,7 @@ static int test_find_delalloc(void)
         * |--- delalloc ---|
         *           |--- search ---|
         */
-       test_start = 64 * 1024 * 1024;
+       test_start = SZ_64M;
        locked_page = find_lock_page(inode->i_mapping,
                                     test_start >> PAGE_CACHE_SHIFT);
        if (!locked_page) {
@@ -220,8 +221,8 @@ static int test_find_delalloc(void)
         * Now to test where we run into a page that is no longer dirty in the
         * range we want to find.
         */
-       page = find_get_page(inode->i_mapping, (max_bytes + (1 * 1024 * 1024))
-                            >> PAGE_CACHE_SHIFT);
+       page = find_get_page(inode->i_mapping,
+                            (max_bytes + SZ_1M) >> PAGE_CACHE_SHIFT);
        if (!page) {
                test_msg("Couldn't find our page\n");
                goto out_bits;
This page took 0.037368 seconds and 5 git commands to generate.