Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-7991 quota: project quota against ZFS backend
[fs/lustre-release.git]
/
lustre
/
osd-zfs
/
osd_handler.c
diff --git
a/lustre/osd-zfs/osd_handler.c
b/lustre/osd-zfs/osd_handler.c
index
fc6c701
..
5adcd1a
100644
(file)
--- a/
lustre/osd-zfs/osd_handler.c
+++ b/
lustre/osd-zfs/osd_handler.c
@@
-1078,6
+1078,15
@@
static int osd_mount(const struct lu_env *env,
if (rc)
GOTO(err, rc);
if (rc)
GOTO(err, rc);
+#ifdef ZFS_PROJINHERIT
+ if (dmu_objset_projectquota_enabled(o->od_os)) {
+ rc = __osd_obj2dnode(o->od_os, DMU_PROJECTUSED_OBJECT,
+ &o->od_projectused_dn);
+ if (rc && rc != -ENOENT)
+ GOTO(err, rc);
+ }
+#endif
+
/* 1. initialize oi before any file create or file open */
rc = osd_oi_init(env, o);
if (rc)
/* 1. initialize oi before any file create or file open */
rc = osd_oi_init(env, o);
if (rc)
@@
-1158,6
+1167,13
@@
static void osd_umount(const struct lu_env *env, struct osd_device *o)
o->od_groupused_dn = NULL;
}
o->od_groupused_dn = NULL;
}
+#ifdef ZFS_PROJINHERIT
+ if (o->od_projectused_dn) {
+ osd_dnode_rele(o->od_projectused_dn);
+ o->od_projectused_dn = NULL;
+ }
+#endif
+
if (o->od_os != NULL) {
if (!o->od_dt_dev.dd_rdonly)
/* force a txg sync to get all commit callbacks */
if (o->od_os != NULL) {
if (!o->od_dt_dev.dd_rdonly)
/* force a txg sync to get all commit callbacks */