From: vitaly Date: Thu, 21 Sep 2006 23:58:47 +0000 (+0000) Subject: Branch b_new_cmd X-Git-Tag: v1_8_0_110~486^2~872 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1b2054279fa11f22da791ef727c3eacd77f2dfc2;p=fs%2Flustre-release.git Branch b_new_cmd initialize missed o_gr and the corresponding o_valid flag in obdo --- diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index f1119e8..7c76d9d 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -123,6 +123,7 @@ struct lov_user_mds_data_v1 { struct ll_recreate_obj { __u64 lrc_id; + __u64 lrc_group; __u32 lrc_ost_idx; }; diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 87095bd..6779f1b 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -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; diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 5c3706e..ba10e30 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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); diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c index 1d1a056..16ed41203 100644 --- a/lustre/lov/lov_qos.c +++ b/lustre/lov/lov_qos.c @@ -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); diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index c21785b..92d5467 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -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); diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 56aeb22..bc68bc3 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -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; diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index eb83a24..78c54ed 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -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 */ diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 973fbec..a6bd67a 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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; }