<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/quotaops.h, branch v4.6-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>quota: Add support for -&gt;get_nextdqblk() for VFS quota</title>
<updated>2016-02-09T12:05:23+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2016-01-25T18:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be6257b251cebd2deb8c76d43e387e28e3f7412d'/>
<id>be6257b251cebd2deb8c76d43e387e28e3f7412d</id>
<content type='text'>
Add infrastructure for supporting get_nextdqblk() callback for VFS
quotas. Translate the operation into a callback to appropriate
filesystem and consequently to quota format callback.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add infrastructure for supporting get_nextdqblk() callback for VFS
quotas. Translate the operation into a callback to appropriate
filesystem and consequently to quota format callback.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Propagate error from -&gt;acquire_dquot()</title>
<updated>2015-07-23T18:59:10+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2015-06-24T16:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6184fc0b8dd76c6aedc7a26e93254993e14e52de'/>
<id>6184fc0b8dd76c6aedc7a26e93254993e14e52de</id>
<content type='text'>
Currently when some error happened in -&gt;acquire_dquot(), dqget() just
returned NULL. That was indistinguishable from a case when e.g. someone
run quotaoff and so was generally silently ignored. However
-&gt;acquire_dquot() can fail because of ENOSPC or EIO in which case user
should better know. So propagate error up from -&gt;acquire_dquot properly.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when some error happened in -&gt;acquire_dquot(), dqget() just
returned NULL. That was indistinguishable from a case when e.g. someone
run quotaoff and so was generally silently ignored. However
-&gt;acquire_dquot() can fail because of ENOSPC or EIO in which case user
should better know. So propagate error up from -&gt;acquire_dquot properly.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'quota_interface' into for_next_testing</title>
<updated>2015-03-16T09:26:41+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2015-03-16T09:26:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dca0548a21e5efa445b68a73554ef863e09c623'/>
<id>7dca0548a21e5efa445b68a73554ef863e09c623</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: reorder flags in quota state</title>
<updated>2015-03-04T15:42:46+00:00</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>khlebnikov@yandex-team.ru</email>
</author>
<published>2015-02-12T16:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=781970240a56d1c15a9b8ee37d28987b8182f060'/>
<id>781970240a56d1c15a9b8ee37d28987b8182f060</id>
<content type='text'>
Flags in struct quota_state keep flags for each quota type and
some common flags. This patch reorders typed flags:

Before:

0 USRQUOTA DQUOT_USAGE_ENABLED
1 USRQUOTA DQUOT_LIMITS_ENABLED
2 USRQUOTA DQUOT_SUSPENDED
3 GRPQUOTA DQUOT_USAGE_ENABLED
4 GRPQUOTA DQUOT_LIMITS_ENABLED
5 GRPQUOTA DQUOT_SUSPENDED
6          DQUOT_QUOTA_SYS_FILE
7          DQUOT_NEGATIVE_USAGE

After:

0 USRQUOTA DQUOT_USAGE_ENABLED
1 GRPQUOTA DQUOT_USAGE_ENABLED
2 USRQUOTA DQUOT_LIMITS_ENABLED
3 GRPQUOTA DQUOT_LIMITS_ENABLED
4 USRQUOTA DQUOT_SUSPENDED
5 GRPQUOTA DQUOT_SUSPENDED
6          DQUOT_QUOTA_SYS_FILE
7          DQUOT_NEGATIVE_USAGE

Now we can get bitmap of all enabled/suspended quota types without loop.
For example suspended: (flags / DQUOT_SUSPENDED) &amp; ((1 &lt;&lt; MAXQUOTAS) - 1).

add/remove: 0/1 grow/shrink: 3/11 up/down: 56/-215 (-159)
function                                     old     new   delta
__dquot_initialize                           423     447     +24
dquot_transfer                               181     197     +16
dquot_alloc_inode                            286     302     +16
dquot_reclaim_space_nodirty                  316     313      -3
dquot_claim_space_nodirty                    314     311      -3
dquot_resume                                 286     281      -5
dquot_free_inode                             332     324      -8
__dquot_alloc_space                          500     492      -8
dquot_disable                               1944    1929     -15
dquot_quota_enable                           252     236     -16
__dquot_free_space                           750     734     -16
dquot_writeback_dquots                       625     608     -17
__dquot_transfer                            1186    1154     -32
dquot_quota_sync                             299     261     -38
dquot_active.isra                             54       -     -54

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Flags in struct quota_state keep flags for each quota type and
some common flags. This patch reorders typed flags:

Before:

0 USRQUOTA DQUOT_USAGE_ENABLED
1 USRQUOTA DQUOT_LIMITS_ENABLED
2 USRQUOTA DQUOT_SUSPENDED
3 GRPQUOTA DQUOT_USAGE_ENABLED
4 GRPQUOTA DQUOT_LIMITS_ENABLED
5 GRPQUOTA DQUOT_SUSPENDED
6          DQUOT_QUOTA_SYS_FILE
7          DQUOT_NEGATIVE_USAGE

After:

0 USRQUOTA DQUOT_USAGE_ENABLED
1 GRPQUOTA DQUOT_USAGE_ENABLED
2 USRQUOTA DQUOT_LIMITS_ENABLED
3 GRPQUOTA DQUOT_LIMITS_ENABLED
4 USRQUOTA DQUOT_SUSPENDED
5 GRPQUOTA DQUOT_SUSPENDED
6          DQUOT_QUOTA_SYS_FILE
7          DQUOT_NEGATIVE_USAGE

Now we can get bitmap of all enabled/suspended quota types without loop.
For example suspended: (flags / DQUOT_SUSPENDED) &amp; ((1 &lt;&lt; MAXQUOTAS) - 1).

add/remove: 0/1 grow/shrink: 3/11 up/down: 56/-215 (-159)
function                                     old     new   delta
__dquot_initialize                           423     447     +24
dquot_transfer                               181     197     +16
dquot_alloc_inode                            286     302     +16
dquot_reclaim_space_nodirty                  316     313      -3
dquot_claim_space_nodirty                    314     311      -3
dquot_resume                                 286     281      -5
dquot_free_inode                             332     324      -8
__dquot_alloc_space                          500     492      -8
dquot_disable                               1944    1929     -15
dquot_quota_enable                           252     236     -16
__dquot_free_space                           750     734     -16
dquot_writeback_dquots                       625     608     -17
__dquot_transfer                            1186    1154     -32
dquot_quota_sync                             299     261     -38
dquot_active.isra                             54       -     -54

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Make -&gt;set_info use structure with neccesary info to VFS and XFS</title>
<updated>2015-03-04T15:06:38+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-12-16T11:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5eacb2ac029161d94969a511e0adf7dca28cda1f'/>
<id>5eacb2ac029161d94969a511e0adf7dca28cda1f</id>
<content type='text'>
Change -&gt;set_info to take new qc_info structure which contains all the
necessary information both for XFS and VFS. Convert Q_SETINFO handler
to use this structure.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change -&gt;set_info to take new qc_info structure which contains all the
necessary information both for XFS and VFS. Convert Q_SETINFO handler
to use this structure.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Make VFS quotas use new interface for getting quota info</title>
<updated>2015-03-04T15:06:34+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-11-18T23:42:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a240339a8deeb13a19043389bba4285a6c0592e'/>
<id>0a240339a8deeb13a19043389bba4285a6c0592e</id>
<content type='text'>
Create new internal interface for getting information about quota which
contains everything needed for both VFS quotas and XFS quotas. Make VFS
use this and hook it up to Q_GETINFO.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create new internal interface for getting information about quota which
contains everything needed for both VFS quotas and XFS quotas. Make VFS
use this and hook it up to Q_GETINFO.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Add -&gt;quota_{enable,disable} callbacks for VFS quotas</title>
<updated>2015-01-30T11:50:32+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-10-06T16:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3e2af67e66ff025796af1a8a1fcbb4236304f90c'/>
<id>3e2af67e66ff025796af1a8a1fcbb4236304f90c</id>
<content type='text'>
Add functions which translate -&gt;quota_enable / -&gt;quota_disable calls
into appropriate changes in VFS quota. This will enable filesystems
supporting VFS quota files in system inodes to be controlled via
Q_XQUOTA[ON|OFF] quotactls for better userspace compatibility.

Also provide a vector for quotactl using these functions which can be
used by filesystems with quota files stored in hidden system files.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add functions which translate -&gt;quota_enable / -&gt;quota_disable calls
into appropriate changes in VFS quota. This will enable filesystems
supporting VFS quota files in system inodes to be controlled via
Q_XQUOTA[ON|OFF] quotactls for better userspace compatibility.

Also provide a vector for quotactl using these functions which can be
used by filesystems with quota files stored in hidden system files.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Wire up -&gt;quota_{enable,disable} callbacks into Q_QUOTA{ON,OFF}</title>
<updated>2015-01-30T11:50:16+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-10-08T14:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3b863248577504f6eecca2a464d6ddf86b71584'/>
<id>d3b863248577504f6eecca2a464d6ddf86b71584</id>
<content type='text'>
Make Q_QUOTAON / Q_QUOTAOFF quotactl call -&gt;quota_enable /
-&gt;quota_disable callback when provided. To match current behavior of
ocfs2 &amp; ext4 we make these quotactls turn on / off quota enforcement for
appropriate quota type.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make Q_QUOTAON / Q_QUOTAOFF quotactl call -&gt;quota_enable /
-&gt;quota_disable callback when provided. To match current behavior of
ocfs2 &amp; ext4 we make these quotactls turn on / off quota enforcement for
appropriate quota type.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Switch -&gt;get_dqblk() and -&gt;set_dqblk() to use bytes as space units</title>
<updated>2015-01-28T08:01:40+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-10-09T14:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=14bf61ffe6ac54afcd1e888a4407fe16054483db'/>
<id>14bf61ffe6ac54afcd1e888a4407fe16054483db</id>
<content type='text'>
Currently -&gt;get_dqblk() and -&gt;set_dqblk() use struct fs_disk_quota which
tracks space limits and usage in 512-byte blocks. However VFS quotas
track usage in bytes (as some filesystems require that) and we need to
somehow pass this information. Upto now it wasn't a problem because we
didn't do any unit conversion (thus VFS quota routines happily stuck
number of bytes into d_bcount field of struct fd_disk_quota). Only if
you tried to use Q_XGETQUOTA or Q_XSETQLIM for VFS quotas (or Q_GETQUOTA
/ Q_SETQUOTA for XFS quotas), you got bogus results. Hardly anyone
tried this but reportedly some Samba users hit the problem in practice.
So when we want interfaces compatible we need to fix this.

We bite the bullet and define another quota structure used for passing
information from/to -&gt;get_dqblk()/-&gt;set_dqblk. It's somewhat sad we have
to have more conversion routines in fs/quota/quota.c and another copying
of quota structure slows down getting of quota information by about 2%
but it seems cleaner than overloading e.g. units of d_bcount to bytes.

CC: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently -&gt;get_dqblk() and -&gt;set_dqblk() use struct fs_disk_quota which
tracks space limits and usage in 512-byte blocks. However VFS quotas
track usage in bytes (as some filesystems require that) and we need to
somehow pass this information. Upto now it wasn't a problem because we
didn't do any unit conversion (thus VFS quota routines happily stuck
number of bytes into d_bcount field of struct fd_disk_quota). Only if
you tried to use Q_XGETQUOTA or Q_XSETQLIM for VFS quotas (or Q_GETQUOTA
/ Q_SETQUOTA for XFS quotas), you got bogus results. Hardly anyone
tried this but reportedly some Samba users hit the problem in practice.
So when we want interfaces compatible we need to fix this.

We bite the bullet and define another quota structure used for passing
information from/to -&gt;get_dqblk()/-&gt;set_dqblk. It's somewhat sad we have
to have more conversion routines in fs/quota/quota.c and another copying
of quota structure slows down getting of quota information by about 2%
but it seems cleaner than overloading e.g. units of d_bcount to bytes.

CC: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: Remove const from function declarations</title>
<updated>2014-11-10T09:06:07+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-10-20T14:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6bab3596bbede980c067eaeaf6a470c262888dac'/>
<id>6bab3596bbede980c067eaeaf6a470c262888dac</id>
<content type='text'>
We don't use const through VFS too much so just remove it from quota
function declarations.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't use const through VFS too much so just remove it from quota
function declarations.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
