From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: [PATCH] cgroup: deprecate remount option changes mount option Date: Thu, 15 Mar 2012 09:56:55 -0700 Message-ID: <20120315165655.GD32137@google.com> References: <20120314215228.GI7349@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=n4uLn3z6FkPrew7brmj7OWKNfxR5WEh5BnzFimByAoc=; b=SOrvlxoOi9REOEPmwTb+v2u2YVTSKE7GfNFt7VXyvZA/sWzvd1TrOUCOk3Yf8n8pGr YZKSZlU/zk3WJgOeMv1X/+aPwQXxxZjt7Xidzt80hDlI8w+Acno2SMIRgRtkVsUJUfg9 KD+Z/1AmA2thLgBGBpraQ0gWUikhwiQYKEW2+NWY8cZUBAQ43lYozCsBeZ/aNBLg969o niWGWPo/2oNfn9RnqWS8DKzzhj43VG6Ke8BIV+ADLI6HmqDWBVgOoqukeh6hkkW/GhWt Vl80CbNzi7S/mcDQ4CGo4bvtU6Wbu2AxyzxWX2R5FbNYcBiW8H1PDQpPK8D5HcB0s8On Iujg== Content-Disposition: inline In-Reply-To: <20120314215228.GI7349-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Li Zefan , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Frederic Weisbecker , Lennart Poettering This patch marks the following features for deprecation. * Rebinding subsys by remount: Never reached useful state - only works on empty hierarchies. * release_agent update by remount: release_agent itself will be replaced with conventional fsnotify notification. v2: Lennart pointed out that "name=" is necessary for mounts w/o any controller attached. Drop "name=" deprecation. Signed-off-by: Tejun Heo Cc: Li Zefan Cc: Lennart Poettering --- Documentation/feature-removal-schedule.txt | 10 ++++++++++ kernel/cgroup.c | 5 +++++ 2 files changed, 15 insertions(+) Index: work/Documentation/feature-removal-schedule.txt =================================================================== --- work.orig/Documentation/feature-removal-schedule.txt +++ work/Documentation/feature-removal-schedule.txt @@ -510,3 +510,13 @@ Why: The pci_scan_bus_parented() interfa convert to using pci_scan_root_bus() so they can supply a list of bus resources when the bus is created. Who: Bjorn Helgaas + +---------------------------- + +What: cgroup option updates via remount +When: March 2013 +Why: Remount currently allows changing bound subsystems and + release_agent. Rebinding is hardly useful as it only works + when the hierarchy is empty and release_agent itself should be + replaced with conventional fsnotify. +Who: Tejun Heo Index: work/kernel/cgroup.c =================================================================== --- work.orig/kernel/cgroup.c +++ work/kernel/cgroup.c @@ -1294,6 +1294,11 @@ static int cgroup_remount(struct super_b if (ret) goto out_unlock; + /* See feature-removal-schedule.txt */ + if (opts.subsys_bits != root->actual_subsys_bits || opts.release_agent) + pr_warning("cgroup: option changes via remount are deprecated (pid=%d comm=%s)\n", + task_tgid_nr(current), current->comm); + /* Don't allow flags or name to change at remount */ if (opts.flags != root->flags || (opts.name && strcmp(opts.name, root->name))) {