Whamcloud - gitweb
Branch b_new_cmd
authorvitaly <vitaly>
Thu, 21 Sep 2006 23:58:47 +0000 (23:58 +0000)
committervitaly <vitaly>
Thu, 21 Sep 2006 23:58:47 +0000 (23:58 +0000)
initialize missed o_gr and the corresponding o_valid flag in obdo

lustre/include/lustre/lustre_user.h
lustre/liblustre/file.c
lustre/llite/file.c
lustre/lov/lov_qos.c
lustre/lov/lov_request.c
lustre/mds/mds_unlink_open.c
lustre/obdfilter/filter.c
lustre/osc/osc_request.c

index f1119e8..7c76d9d 100644 (file)
@@ -123,6 +123,7 @@ struct lov_user_mds_data_v1 {
 
 struct ll_recreate_obj {
         __u64 lrc_id;
+        __u64 lrc_group;
         __u32 lrc_ost_idx;
 };
 
index 87095bd..6779f1b 100644 (file)
@@ -284,8 +284,9 @@ int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
                 GOTO(out_free_memmd, rc = -ENOMEM);
 
         oa->o_id = lsm->lsm_object_id;
+        oa->o_gr = lsm->lsm_object_gr;
         oa->o_mode = body->mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
 
         if (body->valid & OBD_MD_FLCOOKIE) {
                 oa->o_valid |= OBD_MD_FLCOOKIE;
index 5c3706e..ba10e30 100644 (file)
@@ -1658,9 +1658,10 @@ static int ll_lov_recreate_obj(struct inode *inode, struct file *file,
                 GOTO(out, rc = -ENOMEM);
 
         oa->o_id = ucreatp.lrc_id;
+        oa->o_gr = ucreatp.lrc_group;
         oa->o_nlink = ucreatp.lrc_ost_idx;
         oa->o_flags |= OBD_FL_RECREATE_OBJS;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS | OBD_MD_FLGROUP;
         obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
                         OBD_MD_FLMTIME | OBD_MD_FLCTIME);
 
index 1d1a056..16ed412 100644 (file)
@@ -727,6 +727,7 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
         ENTRY;
 
         LASSERT(src_oa->o_valid & OBD_MD_FLID);
+        LASSERT(src_oa->o_valid & OBD_MD_FLGROUP);
  
         if (set->set_oi->oi_md == NULL) {
                 int stripe_cnt = lov_get_stripecnt(lov, 0);
index c21785b..92d5467 100644 (file)
@@ -599,7 +599,7 @@ static int create_done(struct obd_export *exp, struct lov_request_set *set,
         }
         ret_oa->o_id = src_oa->o_id;
         ret_oa->o_gr = src_oa->o_gr;
-        ret_oa->o_valid |= OBD_MD_FLGROUP;
+        ret_oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP;
         memcpy(src_oa, ret_oa, sizeof(*src_oa));
         obdo_free(ret_oa);
 
index 56aeb22..bc68bc3 100644 (file)
@@ -78,8 +78,9 @@ static int mds_osc_destroy_orphan(struct obd_device *obd,
         if (oa == NULL)
                 GOTO(out_free_memmd, rc = -ENOMEM);
         oa->o_id = lsm->lsm_object_id;
+        oa->o_gr = lsm->lsm_object_gr;
         oa->o_mode = mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
 
         if (log_unlink && logcookies) {
                 oa->o_valid |= OBD_MD_FLCOOKIE;
index eb83a24..78c54ed 100644 (file)
@@ -3197,7 +3197,7 @@ static int filter_handle_precreate(struct obd_export *exp, struct obdo *oa,
                 oa->o_id = filter_last_id(&obd->u.filter, group);
                 rc = filter_precreate(obd, oa, group, &diff);
                 oa->o_id = filter_last_id(&obd->u.filter, group);
-                oa->o_valid = OBD_MD_FLID;
+                oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
                 GOTO(out, rc);
         }
         /* else diff == 0 */
index 973fbec..a6bd67a 100644 (file)
@@ -3200,6 +3200,7 @@ static int osc_set_info_async(struct obd_export *exp, obd_count keylen,
                 struct osc_creator *oscc = &obd->u.cli.cl_oscc;
 
                 oscc->oscc_oa.o_gr = (*(__u32 *)val);
+                oscc->oscc_oa.o_valid |= OBD_MD_FLGROUP;
                 LASSERT(oscc->oscc_oa.o_gr > 0);
                 req->rq_interpret_reply = osc_setinfo_mds_conn_interpret;
         }