[Ocfs2-test-devel] [PATCH 37/59] reflink-test: fix mutiple reflink test race
Eric Ren
zren at suse.com
Tue Sep 22 20:25:31 PDT 2015
Hi Junxiao,
Looks good!
Reviewed-by: Eric Ren <zren at suse.com>
Thanks,
Eric Ren
On Mon, Sep 14, 2015 at 10:44:23AM +0800, Junxiao Bi wrote:
> Rank 2 and Rank 3 pick a random length of value to update xattr, Rank3 will
> read the xattr and do validation after update, if Rank 2 picks a xattr length
> larger than Rank 3's and update the xattr after Rank 3's update but before the
> validation, fgetxattr in Rank 3 will return ERANGE error. Set "xattr_value_sz"
> to the max value to fix it.
>
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> ---
> programs/reflink_tests/multi_reflink_test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/programs/reflink_tests/multi_reflink_test.c b/programs/reflink_tests/multi_reflink_test.c
> index 45c96fe..bd980c6 100755
> --- a/programs/reflink_tests/multi_reflink_test.c
> +++ b/programs/reflink_tests/multi_reflink_test.c
> @@ -1116,6 +1116,7 @@ static int do_xattr_data_cows(char *ref_pfx, unsigned long iter, int ea_nums)
>
> if (xattr_value_sz > xattr_name_sz + 50) {
>
> + xattr_value_sz = XATTR_VALUE_MAX_SZ;
> ret = read_ea(NORMAL, fd);
> if (ret < 0)
> goto bail;
> --
> 1.7.9.5
>
>
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
>
More information about the Ocfs2-test-devel
mailing list