- if (!(lu_object_attr(lod2lu_obj(lo)) & S_IFREG))
- GOTO(out, rc = 0);
-
- rc = lod_get_lov_ea(env, lo);
- if (rc <= 0)
- GOTO(out, rc);
-
- /*
- * there is LOV EA (striping information) in this object
- * let's parse it and create in-core objects for the stripes
- */
- info->lti_buf.lb_buf = info->lti_ea_store;
- info->lti_buf.lb_len = info->lti_ea_store_size;
- rc = lod_parse_striping(env, lo, &info->lti_buf);
+ if (lu_object_attr(lod2lu_obj(lo)) & S_IFREG) {
+ rc = lod_get_lov_ea(env, lo);
+ if (rc <= 0)
+ GOTO(out, rc);
+ /*
+ * there is LOV EA (striping information) in this object
+ * let's parse it and create in-core objects for the stripes
+ */
+ info->lti_buf.lb_buf = info->lti_ea_store;
+ info->lti_buf.lb_len = info->lti_ea_store_size;
+ rc = lod_parse_striping(env, lo, &info->lti_buf);
+ } else if (lu_object_attr(lod2lu_obj(lo)) & S_IFDIR) {
+ rc = lod_get_lmv_ea(env, lo);
+ if (rc <= 0)
+ GOTO(out, rc);
+ /*
+ * there is LOV EA (striping information) in this object
+ * let's parse it and create in-core objects for the stripes
+ */
+ info->lti_buf.lb_buf = info->lti_ea_store;
+ info->lti_buf.lb_len = info->lti_ea_store_size;
+ rc = lod_parse_dir_striping(env, lo, &info->lti_buf);
+ }