if (rc)
RETURN(rc);
+ /* osp_declare_attr_set() ignores all attributes other than
+ * UID, GID, and size, and osp_attr_set() ignores all but UID
+ * and GID. Declaration of size attr setting happens through
+ * lod_declare_init_size(), and not through this function.
+ * Therefore we need not load striping unless ownership is
+ * changing. This should save memory and (we hope) speed up
+ * rename(). */
+ if (!(attr->la_valid & (LA_UID | LA_GID)))
+ RETURN(rc);
+
/*
* load striping information, notice we don't do this when object
* is being initialized as we don't need this information till
if (rc)
RETURN(rc);
+ if (!(attr->la_valid & (LA_UID | LA_GID)))
+ RETURN(rc);
+
/*
* if object is striped, apply changes to all the stripes
*/