Re: [bug report] staging: lustre: lmv: try all stripes for unknown hash functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux