Whamcloud - gitweb
Branch HEAD
authorhuanghua <huanghua>
Thu, 16 Oct 2008 16:58:48 +0000 (16:58 +0000)
committerhuanghua <huanghua>
Thu, 16 Oct 2008 16:58:48 +0000 (16:58 +0000)
b=17403

i=adilger
i=yury.umanets
create objects in correct directory on OST.

lustre/include/obd.h
lustre/obdclass/llog_test.c
lustre/obdclass/obd_config.c
lustre/obdfilter/filter.c

index 8b2507e..74c79c9 100644 (file)
@@ -932,8 +932,6 @@ struct target_recovery_data {
         struct completion trd_finishing;
 };
 
-#define OBD_LLOG_GROUP  0
-
 enum filter_groups {
         FILTER_GROUP_LLOG = 1,
         FILTER_GROUP_ECHO,
index cc2eea0..80716ff 100644 (file)
@@ -722,7 +722,7 @@ static int llog_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
                 RETURN(-EINVAL);
         }
 
-        rc = obd_llog_init(obd, OBD_LLOG_GROUP, tgt, 0, NULL, NULL);
+        rc = obd_llog_init(obd, NULL, tgt, 0, NULL, NULL);
         if (rc)
                 RETURN(rc);
 
index 05867da..68adf65 100644 (file)
@@ -208,7 +208,7 @@ int class_attach(struct lustre_cfg *lcfg)
         CFS_INIT_LIST_HEAD(&obd->obd_lock_replay_queue);
         CFS_INIT_LIST_HEAD(&obd->obd_final_req_queue);
 
-        llog_group_init(&obd->obd_olg, OBD_LLOG_GROUP);
+        llog_group_init(&obd->obd_olg, FILTER_GROUP_LLOG);
 
         spin_lock_init(&obd->obd_uncommitted_replies_lock);
         CFS_INIT_LIST_HEAD(&obd->obd_uncommitted_replies);
index 343b777..6540e24 100644 (file)
@@ -1417,7 +1417,8 @@ struct dentry *filter_parent(struct obd_device *obd, obd_gr group, obd_id objid)
         struct filter_subdirs *subdirs;
         LASSERT(group < filter->fo_group_count); /* FIXME: object groups */
 
-        if (group > 0 || filter->fo_subdir_count == 0)
+        if ((group > 0 && group < FILTER_GROUP_MDS0) || 
+             filter->fo_subdir_count == 0)
                 return filter->fo_dentry_O_groups[group];
 
         subdirs = &filter->fo_dentry_O_sub[group];
@@ -2364,7 +2365,7 @@ struct obd_llog_group *filter_find_olg(struct obd_device *obd, int group)
 
         filter = &obd->u.filter;
 
-        if (group == OBD_LLOG_GROUP)
+        if (group == FILTER_GROUP_LLOG)
                 RETURN(&obd->obd_olg);
 
         spin_lock(&filter->fo_llog_list_lock);
@@ -2386,7 +2387,7 @@ struct obd_llog_group *filter_find_create_olg(struct obd_device *obd, int group)
 
         filter = &obd->u.filter;
 
-        if (group == OBD_LLOG_GROUP)
+        if (group == FILTER_GROUP_LLOG)
                 RETURN(&obd->obd_olg);
 
         spin_lock(&filter->fo_llog_list_lock);