From fc0972b9350d382815f280895898866efbf4b804 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 9 Jun 2009 08:50:03 +0000 Subject: [PATCH] - OSD doesn't need anything from upper layers to initialize quota --- lustre/osd/osd_handler.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 5850dea..bcbc6f4 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -955,12 +955,17 @@ static void osd_init_quota_ctxt(const struct lu_env *env, struct dt_device *d, { struct obd_device *obd = (void *)ctxt; struct vfsmount *mnt = (struct vfsmount *)data; + struct osd_device *osd; ENTRY; - obd->u.obt.obt_sb = mnt->mnt_root->d_inode->i_sb; + osd = osd_dt_dev(d); + LASSERT(osd_sb(osd)); + + obd->u.obt.obt_sb = osd_sb(osd); + OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt); - obd->obd_lvfs_ctxt.pwdmnt = mnt; - obd->obd_lvfs_ctxt.pwd = mnt->mnt_root; + obd->obd_lvfs_ctxt.pwdmnt = osd->od_mnt; + obd->obd_lvfs_ctxt.pwd = osd->od_mnt->mnt_root; obd->obd_lvfs_ctxt.fs = get_ds(); EXIT; -- 1.8.3.1