<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">
<pre>on 2019/10/24 16:14, Jan Kara wrote:</pre>
</div>
<blockquote type="cite"
cite="mid:20191024081438.GJ31271@quack2.suse.cz">
<pre class="moz-quote-pre" wrap="">On Wed 23-10-19 17:00:30, Yang Xu wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">This is a variant about quotactl01. It is used to test project quota.
I split it into a new case instead of adding it in quotaclt01 because
two points:
1)before linux 4.10, ext4 doesn't support project quota
2)on old kernel, kernel doesn't permit mount both prjquota and grpquota together
Signed-off-by: Yang Xu <a class="moz-txt-link-rfc2396E" href="mailto:xuyang2018.jy@cn.fujitsu.com"><xuyang2018.jy@cn.fujitsu.com></a>
Suggested-by: Jan Kara <a class="moz-txt-link-rfc2396E" href="mailto:jack@suse.cz"><jack@suse.cz></a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">...
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">@@ -0,0 +1,159 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 FUJITSU LIMITED. All rights reserved.
+ * Author: Yang Xu <a class="moz-txt-link-rfc2396E" href="mailto:xuyang2018.jy@cn.fujitsu.com"><xuyang2018.jy@cn.fujitsu.com></a>
+ *
+ * This testcase checks the basic flag of quotactl(2) for project quota on
+ * non-XFS filesystems.
+ *
+ * 1) quotactl(2) succeeds to turn on quota with Q_QUOTAON flag for project.
+ * 2) quotactl(2) succeeds to set disk quota limits with Q_SETQUOTA flag
+ * for project.
+ * 3) quotactl(2) succeeds to get disk quota limits with Q_GETQUOTA flag
+ * for project.
+ * 4) quotactl(2) succeeds to set information about quotafile with Q_SETINFO
+ * flag for project.
+ * 5) quotactl(2) succeeds to get information about quotafile with Q_GETINFO
+ * flag for project.
+ * 6) quotactl(2) succeeds to get quota format with Q_GETFMT flag for project.
+ * 7) quotactl(2) succeeds to update quota usages with Q_SYNC flag for project.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Testing Q_SYNC is mostly pointless for project quota as it will just do
nothing (the quota changes are journalled).</pre>
</blockquote>
<pre>I have no objection about removint Q_SYNC.
</pre>
<blockquote type="cite"
cite="mid:20191024081438.GJ31271@quack2.suse.cz">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">+ * 8) quotactl(2) succeeds to get disk quota limit greater than or equal to
+ * ID with Q_GETNEXTQUOTA flag for project.
+ * 9) quotactl(2) succeeds to turn off quota with Q_QUOTAOFF flag for project.
+ */
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Otherwise the set of checks looks sensible to do basic sanity check of
quotactl(2) syscall.
Honza
</pre>
</blockquote>
</body>
</html>