From: adilger Date: Tue, 6 Apr 2004 22:24:54 +0000 (+0000) Subject: Minor correctness fixes for EA compat support: X-Git-Tag: v1_8_0_110~486^6~19 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e3aa92424d72be990c72cc877cc010128dc02a7a;p=fs%2Flustre-release.git Minor correctness fixes for EA compat support: - print the right size in the error message - work correctly some day in the future when we have v2 EAs b=3059 --- diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c index 91692ca..608787c 100644 --- a/lustre/lov/lov_pack.c +++ b/lustre/lov/lov_pack.c @@ -186,7 +186,7 @@ static int lov_verify_lmm_v0(struct lov_mds_md_v0 *lmm, int lmm_bytes, if (lmm_bytes < lov_mds_md_v0_size(*stripe_count)) { CERROR("LOV EA too small: %d, need %d\n", - lmm_bytes, lov_mds_md_size(*stripe_count)); + lmm_bytes, lov_mds_md_v0_size(*stripe_count)); lov_dump_lmm_v0(D_WARNING, lmm); return -EINVAL; } @@ -238,9 +238,9 @@ static int lov_verify_lmm_v1(struct lov_mds_md_v1 *lmm, int lmm_bytes, return -EINVAL; } - if (lmm_bytes < lov_mds_md_size(*stripe_count)) { + if (lmm_bytes < lov_mds_md_v1_size(*stripe_count)) { CERROR("LOV EA too small: %d, need %d\n", - lmm_bytes, lov_mds_md_size(*stripe_count)); + lmm_bytes, lov_mds_md_v1_size(*stripe_count)); lov_dump_lmm_v1(D_WARNING, lmm); return -EINVAL; }