From a084d2e76ecb719f3f57ca4526151a3407390d1d Mon Sep 17 00:00:00 2001 From: huanghua Date: Wed, 21 Jan 2009 17:32:45 +0000 Subject: [PATCH] Branch b1_8 b=18267 i=yong.fan i=rahul.deshmukh pass default group value, that is 0, to ost: this is for such interop: 1.8 client + 1.8 mds + 2.0 ost. --- lustre/mds/mds_open.c | 3 ++- lustre/mds/mds_reint.c | 3 ++- lustre/mds/mds_unlink_open.c | 3 ++- lustre/osc/osc_create.c | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 89ca4ff..2440f98 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -388,8 +388,9 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset, oinfo.oi_oa->o_gid = 0; oinfo.oi_oa->o_mode = S_IFREG | 0600; oinfo.oi_oa->o_id = inode->i_ino; + oinfo.oi_oa->o_gr = 0; oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLFLAGS | - OBD_MD_FLMODE | OBD_MD_FLUID | OBD_MD_FLGID; + OBD_MD_FLMODE | OBD_MD_FLUID | OBD_MD_FLGID| OBD_MD_FLGROUP; oinfo.oi_oa->o_size = 0; obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 85f160c..6936665 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -618,8 +618,9 @@ int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode, /* then fill oa */ obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLUID | OBD_MD_FLGID); - oinfo.oi_oa->o_valid |= OBD_MD_FLID; + oinfo.oi_oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP; oinfo.oi_oa->o_id = oinfo.oi_md->lsm_object_id; + oinfo.oi_oa->o_gr = 0; if (logcookies) { oinfo.oi_oa->o_valid |= OBD_MD_FLCOOKIE; oti.oti_logcookies = logcookies; diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 74daa05..d64a586 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -92,8 +92,9 @@ 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 = 0; 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/osc/osc_create.c b/lustre/osc/osc_create.c index a4baa30..0edf767 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -182,7 +182,8 @@ static int oscc_internal_create(struct osc_creator *oscc) spin_lock(&oscc->oscc_lock); body->oa.o_id = oscc->oscc_last_id + oscc->oscc_grow_count; - body->oa.o_valid |= OBD_MD_FLID; + body->oa.o_gr = 0; + body->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP; spin_unlock(&oscc->oscc_lock); CDEBUG(D_RPCTRACE, "prealloc through id "LPU64" (last seen "LPU64")\n", body->oa.o_id, oscc->oscc_last_id); @@ -341,8 +342,9 @@ int osc_create(struct obd_export *exp, struct obdo *oa, oscc->oscc_obd->obd_name, oscc->oscc_next_id - 1); /* delete from next_id on up */ - oa->o_valid |= OBD_MD_FLID; + oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP; oa->o_id = oscc->oscc_next_id - 1; + oa->o_gr = 0; rc = osc_real_create(exp, oa, ea, NULL); -- 1.8.3.1