[Ocfs2-test-devel] [PATCH 1/1] ocfs2-test: fix compile error for test program defrag
Tristan Ye
tye.kernel at gmail.com
Tue Aug 30 00:23:02 PDT 2011
SOB,
Sorry for leaving it ugly...
Tristan
On Tue, Aug 30, 2011 at 11:14 AM, Tiger Yang <tiger.yang at oracle.com> wrote:
> This patch fix compile error as struct ocfs2_move_extents
> has no member named ‘me_thresh’.
>
> Signed-off-by: Tiger Yang <tiger.yang at oracle.com>
> ---
> programs/defrag-test/defrager.c | 7 +++----
> programs/defrag-test/multi_defrager.c | 9 +++++----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/programs/defrag-test/defrager.c
> b/programs/defrag-test/defrager.c
> index 27a8530..bcceb56 100644
> --- a/programs/defrag-test/defrager.c
> +++ b/programs/defrag-test/defrager.c
> @@ -50,9 +50,8 @@ char *filename = NULL;
>
> static void usage(void)
> {
> - fprintf(stderr, ("Usage: %s [-s start_offset] [-l length] [-t
> thresh] "
> - "<file_path>\n"),
> - program_name);
> + fprintf(stderr, ("Usage: %s [-s start_offset] [-l length] "
> + "[-t threshold] <file_path>\n"), program_name);
> exit(1);
> }
>
> @@ -72,7 +71,7 @@ int parse_opts(int argc, char **argv, struct
> ocfs2_move_extents *range)
> range->me_len = atol(optarg);
> break;
> case 't':
> - range->me_thresh = atol(optarg);
> + range->me_threshold = atol(optarg);
> break;
> case 'h':
> usage();
> diff --git a/programs/defrag-test/multi_defrager.c
> b/programs/defrag-test/multi_defrager.c
> index e7c5420..b2a6818 100755
> --- a/programs/defrag-test/multi_defrager.c
> +++ b/programs/defrag-test/multi_defrager.c
> @@ -107,7 +107,7 @@ int parse_opts(int argc, char **argv, struct
> ocfs2_move_extents *range)
> range->me_len = atol(optarg);
> break;
> case 't':
> - range->me_thresh = atol(optarg);
> + range->me_threshold = atol(optarg);
> break;
> case 'w':
> strcpy(workplace, optarg);
> @@ -301,13 +301,14 @@ do_defrag:
> if (ret)
> goto out;
> range->me_start = get_rand_ul(0, range->me_start );
> - range->me_len = get_rand_ul(range->me_thresh,
> i_size);
> + range->me_len =
> + get_rand_ul(range->me_threshold, i_size);
> }
>
> if (verbose)
> rank_printf("defrag %s at offset: %llu, len: %llu, "
> - "thresh: %llu\n", path,
> range->me_start,
> - range->me_len, range->me_thresh);
> + "threshold: %llu\n", path,
> range->me_start,
> + range->me_len, range->me_threshold);
>
> ret = defrag_file(path, range);
> if (ret)
> --
> 1.7.4.4
>
>
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-test-devel/attachments/20110830/f2a223a1/attachment.html
More information about the Ocfs2-test-devel
mailing list