Whamcloud - gitweb
b=1948
authorzab <zab>
Tue, 7 Oct 2003 05:11:56 +0000 (05:11 +0000)
committerzab <zab>
Tue, 7 Oct 2003 05:11:56 +0000 (05:11 +0000)
r=phil
Restore the echo_client to working order.  We fix up the object creation
paths and fix up some bad export refcounting behaviour.

- get rid of an extra export put in the lov_disconnect path.  This was
  covering up for an export leak in oscc_init.  We put that export
  reference in osc_disconnect.
- add a little helper to transfer the object group number from the obdo
  to the io obj.
- have the echo_client use group 2 for its objects so it doesn't conflict
  with the group 0 objects used by the filesystem.
- get the oid from obd_create from the lsm_obj_id returned instead of the
  overloaded o_id
- get rid of some extra export_puts in the echo_client's brw testing paths
- get rid of an extra export_put in echo_client_cleanup
- alter quite a bit of the filter object paths to pass the proper group around
- fix up some assumptions the filter has about group numbers that are no
  longer true after the addition of the echo_client's group 2.  this is
  begging for some enums.
- stop lbuging when io is attempted in the filter against an object that doesn't exist
- only do pre-creation in the filter for group 0
- be sure to set the caller's lsm in all filter_create success paths
- pass osc create requests right on to the ost if they aren't in group 0
- in your face, tab!

lustre/osc/osc_create.c

index 684f197..4c776dd 100644 (file)
@@ -175,6 +175,9 @@ int osc_create(struct obd_export *exp, struct obdo *oa,
         LASSERT(oa);
         LASSERT(ea);
 
+        if ((oa->o_valid & OBD_MD_FLGROUP) && (oa->o_gr != 0))
+                RETURN(osc_real_create(exp, oa, ea, oti));
+
         lsm = *ea;
         if (lsm == NULL) {
                 rc = obd_alloc_memmd(exp, &lsm);
@@ -221,9 +224,8 @@ int osc_create(struct obd_export *exp, struct obdo *oa,
         RETURN(rc);
 }
 
-void oscc_init(struct lustre_handle *exph)
+void oscc_init(struct obd_export *exp)
 {
-        struct obd_export *exp = class_conn2export(exph);
         struct osc_export_data *oed;
 
         if (exp == NULL)