/* llo_* api support */
#include <md_object.h>
-/* dt_acct_features */
-#include <lquota.h>
+#include <lustre_quota.h>
#ifdef HAVE_LDISKFS_PDO
int ldiskfs_pdo = 1;
osd_index_fini(obj);
if (inode != NULL) {
+ struct qsd_instance *qsd = osd_obj2dev(obj)->od_quota_slave;
+ qid_t uid = inode->i_uid;
+ qid_t gid = inode->i_gid;
+
iput(inode);
obj->oo_inode = NULL;
+
+ if (qsd != NULL) {
+ struct osd_thread_info *info = osd_oti_get(env);
+ struct lquota_id_info *qi = &info->oti_qi;
+
+ /* Release granted quota to master if necessary */
+ qi->lqi_id.qid_uid = uid;
+ qsd_adjust_quota(env, qsd, &qi->lqi_id, USRQUOTA);
+
+ qi->lqi_id.qid_uid = gid;
+ qsd_adjust_quota(env, qsd, &qi->lqi_id, GRPQUOTA);
+ }
}
}
OSD_EXEC_OP(handle, attr_set);
inode = obj->oo_inode;
+ ll_vfs_dq_init(inode);
rc = osd_quota_transfer(inode, attr);
if (rc)
if (fl & LU_XATTR_CREATE)
fs_flags |= XATTR_CREATE;
+ ll_vfs_dq_init(inode);
dentry->d_inode = inode;
rc = inode->i_op->setxattr(dentry, name, buf->lb_buf,
buf->lb_len, fs_flags);
OSD_EXEC_OP(handle, xattr_set);
+ ll_vfs_dq_init(inode);
dentry->d_inode = inode;
rc = inode->i_op->removexattr(dentry, name);
return rc;
if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_DELETE))
RETURN(-EACCES);
+ ll_vfs_dq_init(dir);
dentry = osd_child_dentry_get(env, obj,
(char *)key, strlen((char *)key));
} else {
child->d_fsdata = NULL;
}
+ LASSERT(pobj->oo_inode);
+ ll_vfs_dq_init(pobj->oo_inode);
rc = osd_ldiskfs_add_entry(oth->ot_handle, child, cinode, hlock);
RETURN(rc);
static int osd_recovery_complete(const struct lu_env *env,
struct lu_device *d)
{
- RETURN(0);
+ struct osd_device *osd = osd_dev(d);
+ int rc = 0;
+ ENTRY;
+
+ if (osd->od_quota_slave == NULL)
+ RETURN(0);
+
+ /* start qsd instance on recovery completion, this notifies the quota
+ * slave code that we are about to process new requests now */
+ rc = qsd_start(env, osd->od_quota_slave);
+ RETURN(rc);
}
/*