Hello,
>
> 376 tgt = lmv_locate_mds(lmv, op_data, &op_data->op_fid1);
> 377 if (IS_ERR(tgt) && (PTR_ERR(tgt) != -EBADFD))
> 378 return PTR_ERR(tgt);
> 379
> 380 /*
> 381 * Both migrating dir and unknown hash dir need to try
> 382 * all of sub-stripes
> 383 */
> 384 if (lsm &&
>!lmv_is_known_hash_type(lsm->lsm_md_hash_type)) {
>
>But really, it's pretty ugly to assume that -EBADFD implies that lsm is
>non-NULL and lmv_is_known_hash_type() will return false.
>
Yes, it might be a bit improper to use -EBADFD here to indicate this
special scenario, or it can be
if (IS_ERR(tgt)) {
if (PTR_ERR(tgt) != -EBADFD) /* hmm, this might not needed, needs
further check */
return PTR_ERR(tgt);
if (lsm && !lmv_is_known_hash_type(lsm->lsm_md_hash_type)) {
ŠŠ..
} else {
return PTR_ERR(tgt);
}
}
Thanks
WangDi
>
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel