[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1338389946-13711-9-git-send-email-jeff.liu@oracle.com>
Date: Wed, 30 May 2012 22:59:02 +0800
From: jeff.liu@...cle.com
To: containers@...ts.linux-foundation.org
Cc: cgroups@...r.kernel.org, jack@...e.cz, glommer@...allels.com,
daniel.lezcano@...e.fr, tytso@....edu, bpm@....com,
chris.mason@...cle.com, hch@...radead.org,
christopher.jones@...cle.com, david@...morbit.com,
tinguely@....com, tm@....ma, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Jie Liu <jeff.liu@...cle.com>
Subject: [PATCH 08/12] container quota: let quotactl(2) works for container.
Modify quotactl(2) to determine for container quota control operations.
Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
fs/quota/quota.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 9a39120..40f381e 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -18,6 +18,12 @@
#include <linux/types.h>
#include <linux/writeback.h>
+/* Mount namespace disk quota required */
+#include <linux/mount.h>
+#include <linux/mnt_namespace.h>
+#include "../ns_quota.h"
+#include "../ns_quotaops.h"
+
static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
qid_t id)
{
@@ -355,6 +361,14 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
type = cmd & SUBCMDMASK;
/*
+ * Perform mount namespace quotactl when it is invoked from container.
+ */
+ if (do_quotactl_for_container(special)) {
+ ret = do_container_quotactl(type, cmds, id, addr);
+ goto out;
+ }
+
+ /*
* As a special case Q_SYNC can be called without a specific device.
* It will iterate all superblocks that have quota enabled and call
* the sync action on each of them.
--
1.7.9
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists