return res;
}
EXPORT_SYMBOL(obdo_cmp_md);
+
+void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj)
+{
+ ioobj->ioo_id = oa->o_id;
+ if (oa->o_valid & OBD_MD_FLGROUP)
+ ioobj->ioo_gr = oa->o_gr;
+ else
+ ioobj->ioo_gr = 0;
+ ioobj->ioo_type = oa->o_mode;
+}
+EXPORT_SYMBOL(obdo_to_ioobj);
#define FILTER_LR_MAX_CLIENT_WORDS (FILTER_LR_MAX_CLIENTS/sizeof(unsigned long))
#define FILTER_SUBDIR_COUNT 32 /* set to zero for no subdirs */
-#define FILTER_GROUPS 2 /* must be at least 3; not dynamic yet */
+#define FILTER_GROUPS 3 /* must be at least 3; not dynamic yet */
#define FILTER_MOUNT_RECOV 2
#define FILTER_RECOVERY_TIMEOUT (obd_timeout * 5 * HZ / 2) /* *waves hands* */
int filter_finish_transno(struct obd_export *, struct obd_trans_info *, int rc);
__u64 filter_next_id(struct filter_obd *, struct obdo *);
-int filter_update_server_data(struct obd_device *, struct file *,
+int filter_update_server_data(struct obd_device *, struct file *, obd_gr,
struct filter_server_data *, int force_sync);
int filter_update_last_objid(struct obd_device *, obd_gr, int force_sync);
int filter_common_setup(struct obd_device *, obd_count len, void *buf,
memset(res, 0, niocount * sizeof(*res));
push_ctxt(&saved, &exp->exp_obd->obd_ctxt, NULL);
- dentry = filter_fid2dentry(exp->exp_obd, NULL, 0, obj->ioo_id);
+ dentry = filter_fid2dentry(exp->exp_obd, NULL, obj->ioo_gr,
+ obj->ioo_id);
if (IS_ERR(dentry))
GOTO(cleanup, rc = PTR_ERR(dentry));
rnb[i].len = pga[i].count;
}
- ioo.ioo_id = oa->o_id;
- ioo.ioo_gr = 0;
- ioo.ioo_type = oa->o_mode & S_IFMT;
+ obdo_to_ioobj(oa, &ioo);
ioo.ioo_bufcnt = oa_bufs;
ret = filter_preprw(cmd, exp, oa, 1, &ioo, oa_bufs, rnb, lnb, oti);
logid = cathandle->lgh_id;
fsd->fsd_catalog_oid = cpu_to_le64(logid.lgl_oid);
fsd->fsd_catalog_ogr = cpu_to_le64(logid.lgl_ogr);
- rc = filter_update_server_data(obd, filter->fo_rcvd_filp,fsd,0);
+ rc = filter_update_server_data(obd, filter->fo_rcvd_filp, 1,
+ fsd, 0);
if (rc) {
CERROR("error writing new catalog to disk: rc %d\n",rc);
GOTO(out_handle, rc);