1. 13 12月, 2011 5 次提交
    • T
      cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() · 2f7ee569
      Tejun Heo 提交于
      Currently, there's no way to pass multiple tasks to cgroup_subsys
      methods necessitating the need for separate per-process and per-task
      methods.  This patch introduces cgroup_taskset which can be used to
      pass multiple tasks and their associated cgroups to cgroup_subsys
      methods.
      
      Three methods - can_attach(), cancel_attach() and attach() - are
      converted to use cgroup_taskset.  This unifies passed parameters so
      that all methods have access to all information.  Conversions in this
      patchset are identical and don't introduce any behavior change.
      
      -v2: documentation updated as per Paul Menage's suggestion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NPaul Menage <paul@paulmenage.org>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Balbir Singh <bsingharora@gmail.com>
      Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: James Morris <jmorris@namei.org>
      2f7ee569
    • T
      cgroup: improve old cgroup handling in cgroup_attach_proc() · 134d3373
      Tejun Heo 提交于
      cgroup_attach_proc() behaves differently from cgroup_attach_task() in
      the following aspects.
      
      * All hooks are invoked even if no task is actually being moved.
      
      * ->can_attach_task() is called for all tasks in the group whether the
        new cgrp is different from the current cgrp or not; however,
        ->attach_task() is skipped if new equals new.  This makes the calls
        asymmetric.
      
      This patch improves old cgroup handling in cgroup_attach_proc() by
      looking up the current cgroup at the head, recording it in the flex
      array along with the task itself, and using it to remove the above two
      differences.  This will also ease further changes.
      
      -v2: nr_todo renamed to nr_migrating_tasks as per Paul Menage's
           suggestion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NPaul Menage <paul@paulmenage.org>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      134d3373
    • T
      cgroup: always lock threadgroup during migration · cd3d0952
      Tejun Heo 提交于
      Update cgroup to take advantage of the fack that threadgroup_lock()
      guarantees stable threadgroup.
      
      * Lock threadgroup even if the target is a single task.  This
        guarantees that when the target tasks stay stable during migration
        regardless of the target type.
      
      * Remove PF_EXITING early exit optimization from attach_task_by_pid()
        and check it in cgroup_task_migrate() instead.  The optimization was
        for rather cold path to begin with and PF_EXITING state can be
        trusted throughout migration by checking it after locking
        threadgroup.
      
      * Don't add PF_EXITING tasks to target task array in
        cgroup_attach_proc().  This ensures that task migration is performed
        only for live tasks.
      
      * Remove -ESRCH failure path from cgroup_task_migrate().  With the
        above changes, it's guaranteed to be called only for live tasks.
      
      After the changes, only live tasks are migrated and they're guaranteed
      to stay alive until migration is complete.  This removes problems
      caused by exec and exit racing against cgroup migration including
      symmetry among cgroup attach methods and different cgroup methods
      racing each other.
      
      v2: Oleg pointed out that one more PF_EXITING check can be removed
          from cgroup_attach_proc().  Removed.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Paul Menage <paul@paulmenage.org>
      cd3d0952
    • T
      threadgroup: rename signal->threadgroup_fork_lock to ->group_rwsem · 257058ae
      Tejun Heo 提交于
      Make the following renames to prepare for extension of threadgroup
      locking.
      
      * s/signal->threadgroup_fork_lock/signal->group_rwsem/
      * s/threadgroup_fork_read_lock()/threadgroup_change_begin()/
      * s/threadgroup_fork_read_unlock()/threadgroup_change_end()/
      * s/threadgroup_fork_write_lock()/threadgroup_lock()/
      * s/threadgroup_fork_write_unlock()/threadgroup_unlock()/
      
      This patch doesn't cause any behavior change.
      
      -v2: Rename threadgroup_change_done() to threadgroup_change_end() per
           KAMEZAWA's suggestion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Paul Menage <paul@paulmenage.org>
      257058ae
    • T
      cgroup: add cgroup_root_mutex · e25e2cbb
      Tejun Heo 提交于
      cgroup wants to make threadgroup stable while modifying cgroup
      hierarchies which will introduce locking dependency on
      cred_guard_mutex from cgroup_mutex.  This unfortunately completes
      circular dependency.
      
       A. cgroup_mutex -> cred_guard_mutex -> s_type->i_mutex_key -> namespace_sem
       B. namespace_sem -> cgroup_mutex
      
      B is from cgroup_show_options() and this patch breaks it by
      introducing another mutex cgroup_root_mutex which nests inside
      cgroup_mutex and protects cgroupfs_root.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      e25e2cbb
  2. 03 11月, 2011 3 次提交
  3. 13 9月, 2011 1 次提交
  4. 27 7月, 2011 1 次提交
  5. 20 7月, 2011 1 次提交
  6. 09 7月, 2011 1 次提交
  7. 09 6月, 2011 1 次提交
    • E
      cgroupfs: use init_cred when populating new cgroupfs mount · 2ce9738b
      eparis@redhat 提交于
      We recently found that in some configurations SELinux was blocking the ability
      for cgroupfs to be mounted.  The reason for this is because cgroupfs creates
      files and directories during the get_sb() call and also uses lookup_one_len()
      during that same get_sb() call.  This is a problem since the security
      subsystem cannot initialize the superblock and the inodes in that filesystem
      until after the get_sb() call returns.  Thus we leave the inodes in
      an unitialized state during get_sb().  For the vast majority of filesystems
      this is not an issue, but since cgroupfs uses lookup_on_len() it does
      search permission checks on the directories in the path it walks.  Since the
      inode security state is not set up SELinux does these checks as if the inodes
      were 'unlabeled.'
      
      Many 'normal' userspace process do not have permission to interact with
      unlabeled inodes.  The solution presented here is to do the permission checks
      of path walk and inode creation as the kernel rather than as the task that
      called mount.  Since the kernel has permission to read/write/create
      unlabeled inodes the get_sb() call will complete successfully and the SELinux
      code will be able to initialize the superblock and those inodes created during
      the get_sb() call.
      
      This appears to be the same solution used by other filesystems such as devtmpfs
      to solve the same issue and should thus have no negative impact on other LSMs
      which currently work.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NPaul Menage <menage@google.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      2ce9738b
  8. 27 5月, 2011 4 次提交
    • D
      cgroup: remove the ns_cgroup · a77aea92
      Daniel Lezcano 提交于
      The ns_cgroup is an annoying cgroup at the namespace / cgroup frontier and
      leads to some problems:
      
        * cgroup creation is out-of-control
        * cgroup name can conflict when pids are looping
        * it is not possible to have a single process handling a lot of
          namespaces without falling in a exponential creation time
        * we may want to create a namespace without creating a cgroup
      
        The ns_cgroup was replaced by a compatibility flag 'clone_children',
        where a newly created cgroup will copy the parent cgroup values.
        The userspace has to manually create a cgroup and add a task to
        the 'tasks' file.
      
      This patch removes the ns_cgroup as suggested in the following thread:
      
      https://lists.linux-foundation.org/pipermail/containers/2009-June/018616.html
      
      The 'cgroup_clone' function is removed because it is no longer used.
      
      This is a userspace-visible change.  Commit 45531757 ("cgroup: notify
      ns_cgroup deprecated") (merged into 2.6.27) caused the kernel to emit a
      printk warning users that the feature is planned for removal.  Since that
      time we have heard from XXX users who were affected by this.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Signed-off-by: NSerge E. Hallyn <serge.hallyn@canonical.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Jamal Hadi Salim <hadi@cyberus.ca>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPaul Menage <menage@google.com>
      Acked-by: NMatt Helsley <matthltc@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a77aea92
    • B
      cgroups: use flex_array in attach_proc · d846687d
      Ben Blum 提交于
      Convert cgroup_attach_proc to use flex_array.
      
      The cgroup_attach_proc implementation requires a pre-allocated array to
      store task pointers to atomically move a thread-group, but asking for a
      monolithic array with kmalloc() may be unreliable for very large groups.
      Using flex_array provides the same functionality with less risk of
      failure.
      
      This is a post-patch for cgroup-procs-write.patch.
      Signed-off-by: NBen Blum <bblum@andrew.cmu.edu>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Reviewed-by: NPaul Menage <menage@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Miao Xie <miaox@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d846687d
    • B
      cgroups: make procs file writable · 74a1166d
      Ben Blum 提交于
      Make procs file writable to move all threads by tgid at once.
      
      Add functionality that enables users to move all threads in a threadgroup
      at once to a cgroup by writing the tgid to the 'cgroup.procs' file.  This
      current implementation makes use of a per-threadgroup rwsem that's taken
      for reading in the fork() path to prevent newly forking threads within the
      threadgroup from "escaping" while the move is in progress.
      Signed-off-by: NBen Blum <bblum@andrew.cmu.edu>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Reviewed-by: NPaul Menage <menage@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Miao Xie <miaox@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      74a1166d
    • B
      cgroups: add per-thread subsystem callbacks · f780bdb7
      Ben Blum 提交于
      Add cgroup subsystem callbacks for per-thread attachment in atomic contexts
      
      Add can_attach_task(), pre_attach(), and attach_task() as new callbacks
      for cgroups's subsystem interface.  Unlike can_attach and attach, these
      are for per-thread operations, to be called potentially many times when
      attaching an entire threadgroup.
      
      Also, the old "bool threadgroup" interface is removed, as replaced by
      this.  All subsystems are modified for the new interface - of note is
      cpuset, which requires from/to nodemasks for attach to be globally scoped
      (though per-cpuset would work too) to persist from its pre_attach to
      attach_task and attach.
      
      This is a pre-patch for cgroup-procs-writable.patch.
      Signed-off-by: NBen Blum <bblum@andrew.cmu.edu>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Reviewed-by: NPaul Menage <menage@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Miao Xie <miaox@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f780bdb7
  9. 08 5月, 2011 3 次提交
  10. 31 3月, 2011 1 次提交
  11. 23 3月, 2011 1 次提交
  12. 16 2月, 2011 2 次提交
    • S
      perf: Add cgroup support · e5d1367f
      Stephane Eranian 提交于
      This kernel patch adds the ability to filter monitoring based on
      container groups (cgroups). This is for use in per-cpu mode only.
      
      The cgroup to monitor is passed as a file descriptor in the pid
      argument to the syscall. The file descriptor must be opened to
      the cgroup name in the cgroup filesystem. For instance, if the
      cgroup name is foo and cgroupfs is mounted in /cgroup, then the
      file descriptor is opened to /cgroup/foo. Cgroup mode is
      activated by passing PERF_FLAG_PID_CGROUP in the flags argument
      to the syscall.
      
      For instance to measure in cgroup foo on CPU1 assuming
      cgroupfs is mounted under /cgroup:
      
      struct perf_event_attr attr;
      int cgroup_fd, fd;
      
      cgroup_fd = open("/cgroup/foo", O_RDONLY);
      fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
      close(cgroup_fd);
      Signed-off-by: NStephane Eranian <eranian@google.com>
      [ added perf_cgroup_{exit,attach} ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <4d590250.114ddf0a.689e.4482@mx.google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e5d1367f
    • P
      cgroup: Fix cgroup_subsys::exit callback · d41d5a01
      Peter Zijlstra 提交于
      Make the ::exit method act like ::attach, it is after all very nearly
      the same thing.
      
      The bug had no effect on correctness - fixing it is an optimization for
      the scheduler. Also, later perf-cgroups patches rely on it.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NPaul Menage <menage@google.com>
      LKML-Reference: <1297160655.13327.92.camel@laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d41d5a01
  13. 15 1月, 2011 1 次提交
  14. 14 1月, 2011 1 次提交
  15. 13 1月, 2011 1 次提交
  16. 07 1月, 2011 7 次提交
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: dcache rationalise dget variants · dc0474be
      Nick Piggin 提交于
      dget_locked was a shortcut to avoid the lazy lru manipulation when we already
      held dcache_lock (lru manipulation was relatively cheap at that point).
      However, how that the lru lock is an innermost one, we never hold it at any
      caller, so the lock cost can now be avoided. We already have well working lazy
      dcache LRU, so it should be fine to defer LRU manipulations to scan time.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      dc0474be
    • N
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin 提交于
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • N
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin 提交于
      Protect d_subdirs and d_child with d_lock, except in filesystems that aren't
      using dcache_lock for these anyway (eg. using i_mutex).
      
      Note: if we change the locking rule in future so that ->d_child protection is
      provided only with ->d_parent->d_lock, it may allow us to reduce some locking.
      But it would be an exception to an otherwise regular locking scheme, so we'd
      have to see some good results. Probably not worthwhile.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • N
      fs: dcache scale dentry refcount · b7ab39f6
      Nick Piggin 提交于
      Make d_count non-atomic and protect it with d_lock. This allows us to ensure a
      0 refcount dentry remains 0 without dcache_lock. It is also fairly natural when
      we start protecting many other dentry members with d_lock.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b7ab39f6
    • N
      fs: change d_delete semantics · fe15ce44
      Nick Piggin 提交于
      Change d_delete from a dentry deletion notification to a dentry caching
      advise, more like ->drop_inode. Require it to be constant and idempotent,
      and not take d_lock. This is how all existing filesystems use the callback
      anyway.
      
      This makes fine grained dentry locking of dput and dentry lru scanning
      much simpler.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fe15ce44
    • N
      cgroup fs: avoid switching ->d_op on live dentry · 5adcee1d
      Nick Piggin 提交于
      Switching d_op on a live dentry is racy in general, so avoid it. In this case
      it is a negative dentry, which is safer, but there are still concurrent ops
      which may be called on d_op in that case (eg. d_revalidate). So in general
      a filesystem may not do this. Fix cgroupfs so as not to do this.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      5adcee1d
  17. 29 10月, 2010 1 次提交
  18. 28 10月, 2010 3 次提交
    • E
      cgroups: add check for strcpy destination string overflow · f4a2589f
      Evgeny Kuznetsov 提交于
      Function "strcpy" is used without check for maximum allowed source string
      length and could cause destination string overflow.  Check for string
      length is added before using "strcpy".  Function now is return error if
      source string length is more than a maximum.
      
      akpm: presently considered NotABug, but add the check for general
      future-safeness and robustness.
      Signed-off-by: NEvgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
      Acked-by: NPaul Menage <menage@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f4a2589f
    • D
      cgroup: make the mount options parsing more accurate · 32a8cf23
      Daniel Lezcano 提交于
      Current behavior:
      =================
      
      (1) When we mount a cgroup, we can specify the 'all' option which
          means to enable all the cgroup subsystems.  This is the default option
          when no option is specified.
      
      (2) If we want to mount a cgroup with a subset of the supported cgroup
          subsystems, we have to specify a subsystems name list for the mount
          option.
      
      (3) If we specify another option like 'noprefix' or 'release_agent',
          the actual code wants the 'all' or a subsystem name option specified
          also.  Not critical but a bit not friendly as we should assume (1) in
          this case.
      
      (4) Logically, the 'all' option is mutually exclusive with a subsystem
          name, but this is not detected.
      
      In other words:
       succeed : mount -t cgroup -o all,freezer cgroup /cgroup
      	=> is it 'all' or 'freezer' ?
       fails : mount -t cgroup -o noprefix cgroup /cgroup
      	=> succeed if we do '-o noprefix,all'
      
      The following patches consolidate a bit the mount options check.
      
      New behavior:
      =============
      
      (1) untouched
      (2) untouched
      (3) the 'all' option will be by default when specifying other than
          a subsystem name option
      (4) raises an error
      
      In other words:
       fails   : mount -t cgroup -o all,freezer cgroup /cgroup
       succeed : mount -t cgroup -o noprefix cgroup /cgroup
      
      For the sake of lisibility, the if ... then ... else ... if ...
      indentation when parsing the options has been changed to:
      if ... then
      	...
      	continue
      fi
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Signed-off-by: NSerge E. Hallyn <serge.hallyn@canonical.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Reviewed-by: NPaul Menage <menage@google.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Jamal Hadi Salim <hadi@cyberus.ca>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      32a8cf23
    • D
      cgroup: add clone_children control file · 97978e6d
      Daniel Lezcano 提交于
      The ns_cgroup is a control group interacting with the namespaces.  When a
      new namespace is created, a corresponding cgroup is automatically created
      too.  The cgroup name is the pid of the process who did 'unshare' or the
      child of 'clone'.
      
      This cgroup is tied with the namespace because it prevents a process to
      escape the control group and use the post_clone callback, so the child
      cgroup inherits the values of the parent cgroup.
      
      Unfortunately, the more we use this cgroup and the more we are facing
      problems with it:
      
      (1) when a process unshares, the cgroup name may conflict with a
          previous cgroup with the same pid, so unshare or clone return -EEXIST
      
      (2) the cgroup creation is out of control because there may have an
          application creating several namespaces where the system will
          automatically create several cgroups in his back and let them on the
          cgroupfs (eg.  a vrf based on the network namespace).
      
      (3) the mix of (1) and (2) force an administrator to regularly check
          and clean these cgroups.
      
      This patchset removes the ns_cgroup by adding a new flag to the cgroup and
      the cgroupfs mount option.  It enables the copy of the parent cgroup when
      a child cgroup is created.  We can then safely remove the ns_cgroup as
      this flag brings a compatibility.  We have now to manually create and add
      the task to a cgroup, which is consistent with the cgroup framework.
      
      This patch:
      
      Sent as an answer to a previous thread around the ns_cgroup.
      
      https://lists.linux-foundation.org/pipermail/containers/2009-June/018627.html
      
      It adds a control file 'clone_children' for a cgroup.  This control file
      is a boolean specifying if the child cgroup should be a clone of the
      parent cgroup or not.  The default value is 'false'.
      
      This flag makes the child cgroup to call the post_clone callback of all
      the subsystem, if it is available.
      
      At present, the cpuset is the only one which had implemented the
      post_clone callback.
      
      The option can be set at mount time by specifying the 'clone_children'
      mount option.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Signed-off-by: NSerge E. Hallyn <serge.hallyn@canonical.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Acked-by: NPaul Menage <menage@google.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Jamal Hadi Salim <hadi@cyberus.ca>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97978e6d
  19. 26 10月, 2010 1 次提交
    • C
      fs: do not assign default i_ino in new_inode · 85fe4025
      Christoph Hellwig 提交于
      Instead of always assigning an increasing inode number in new_inode
      move the call to assign it into those callers that actually need it.
      For now callers that need it is estimated conservatively, that is
      the call is added to all filesystems that do not assign an i_ino
      by themselves.  For a few more filesystems we can avoid assigning
      any inode number given that they aren't user visible, and for others
      it could be done lazily when an inode number is actually needed,
      but that's left for later patches.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      85fe4025
  20. 05 10月, 2010 1 次提交