| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs: send warning of project quota to userspace via netlink |
| From: | Masatake YAMATO <yamato@xxxxxxxxxx> |
| Date: | Wed, 25 Nov 2015 17:52:41 +0900 |
| Cc: | yamato@xxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
Linux's quota subsystem has an ability to handle
project quota. This commit just utilizes the ability
from xfs side.
Signed-off-by: Masatake YAMATO <yamato@xxxxxxxxxx>
---
fs/xfs/xfs_trans_dquot.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index ce78534..1a46544 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -572,12 +572,17 @@ xfs_quota_warn(
struct xfs_dquot *dqp,
int type)
{
- /* no warnings for project quotas - we just return ENOSPC later */
+ enum quota_type t;
+
if (dqp->dq_flags & XFS_DQ_PROJ)
- return;
+ t = PRJQUOTA;
+ else if (dqp->dq_flags & XFS_DQ_USER)
+ t = USRQUOTA;
+ else
+ t = GRPQUOTA;
+
quota_send_warning(make_kqid(&init_user_ns,
- (dqp->dq_flags & XFS_DQ_USER) ?
- USRQUOTA : GRPQUOTA,
+ t,
be32_to_cpu(dqp->q_core.d_id)),
mp->m_super->s_dev, type);
}
--
2.5.0
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] ext4: fix race aio-dio vs freeze_fs, Dmitry Monakhov |
|---|---|
| Next by Date: | Re: [PATCH] ext4: fix race aio-dio vs freeze_fs, Jan Kara |
| Previous by Thread: | Re: [PATCH] ext4: fix race aio-dio vs freeze_fs, Jan Kara |
| Next by Thread: | Re: [PATCH] xfs: send warning of project quota to userspace via netlink, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |