* Author: Johann Lombardi <johann@whamcloud.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_OSD
#include <lustre_ver.h>
{
struct osd_object *mo;
- OBD_SLAB_ALLOC_PTR_GFP(mo, osd_object_kmem, __GFP_IO);
+ OBD_SLAB_ALLOC_PTR_GFP(mo, osd_object_kmem, GFP_NOFS);
if (mo != NULL) {
struct lu_object *l;
*/
obj->oo_dt.do_lu.lo_header->loh_attr |= obj->oo_attr.la_mode & S_IFMT;
- cfs_mb();
+ smp_mb();
obj->oo_dt.do_lu.lo_header->loh_attr |= LOHA_EXISTS;
RETURN(0);
oh = container_of0(handle, struct osd_thandle, ot_super);
LASSERT(obj->oo_sa_hdl != NULL);
+ LASSERT(oh->ot_tx != NULL);
dmu_tx_hold_sa(oh->ot_tx, obj->oo_sa_hdl, 0);
+ if (oh->ot_tx->tx_err != 0)
+ RETURN(-oh->ot_tx->tx_err);
sa_object_size(obj->oo_sa_hdl, &blksize, &bspace);
bspace = toqb(bspace * blksize);
static void osd_ah_init(const struct lu_env *env, struct dt_allocation_hint *ah,
struct dt_object *parent, struct dt_object *child,
- cfs_umode_t child_mode)
+ umode_t child_mode)
{
LASSERT(ah);
struct lu_buf buf;
int rc;
- lustre_lma_init(lma, fid, 0);
+ lustre_lma_init(lma, fid, 0, 0);
lustre_lma_swab(lma);
buf.lb_buf = lma;
buf.lb_len = sizeof(*lma);
db = osd_create_type_f(dof->dof_type)(env, osd, attr, zapid, oh);
if (IS_ERR(db))
- GOTO(out, rc = PTR_ERR(th));
+ GOTO(out, rc = PTR_ERR(db));
zde->zde_pad = 0;
zde->zde_dnode = db->db_object;
RETURN(oc);
}
-static int osd_object_sync(const struct lu_env *env, struct dt_object *dt)
+static int osd_object_sync(const struct lu_env *env, struct dt_object *dt,
+ __u64 start, __u64 end)
{
struct osd_device *osd = osd_obj2dev(osd_dt_obj(dt));
ENTRY;
/* XXX: no other option than syncing the whole filesystem until we
- * support ZIL */
+ * support ZIL. If the object tracked the txg that it was last
+ * modified in, it could pass that txg here instead of "0". Maybe
+ * the changes are already committed, so no wait is needed at all? */
txg_wait_synced(dmu_objset_pool(osd->od_objset.os), 0ULL);
RETURN(0);