1. 26 1月, 2015 4 次提交
  2. 10 10月, 2014 1 次提交
  3. 09 8月, 2014 1 次提交
  4. 08 8月, 2014 16 次提交
    • I
    • A
      death to mnt_pinned · 3064c356
      Al Viro 提交于
      Rather than playing silly buggers with vfsmount refcounts, just have
      acct_on() ask fs/namespace.c for internal clone of file->f_path.mnt
      and replace it with said clone.  Then attach the pin to original
      vfsmount.  Voila - the clone will be alive until the file gets closed,
      making sure that underlying superblock remains active, etc., and
      we can drop the original vfsmount, so that it's not kept busy.
      If the file lives until the final mntput of the original vfsmount,
      we'll notice that there's an fs_pin (one in bsd_acct_struct that
      holds that file) and mnt_pin_kill() will take it out.  Since
      ->kill() is synchronous, we won't proceed past that point until
      these files are closed (and private clones of our vfsmount are
      gone), so we get the same ordering warranties we used to get.
      
      mnt_pin()/mnt_unpin()/->mnt_pinned is gone now, and good riddance -
      it never became usable outside of kernel/acct.c (and racy wrt
      umount even there).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3064c356
    • A
      take fs_pin stuff to fs/* · efb170c2
      Al Viro 提交于
      Add a new field to fs_pin - kill(pin).  That's what umount and r/o remount
      will be calling for all pins attached to vfsmount and superblock resp.
      Called after bumping the refcount, so it won't go away under us.  Dropping
      the refcount is responsibility of the instance.  All generic stuff moved to
      fs/fs_pin.c; the next step will rip all the knowledge of kernel/acct.c from
      fs/super.c and fs/namespace.c.  After that - death to mnt_pin(); it was
      intended to be usable as generic mechanism for code that wants to attach
      objects to vfsmount, so that they would not make the sucker busy and
      would get killed on umount.  Never got it right; it remained acct.c-specific
      all along.  Now it's very close to being killable.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      efb170c2
    • A
      start carving bsd_acct_struct up · 1629d0eb
      Al Viro 提交于
      pull generic parts into struct fs_pin.  Eventually we want those
      to replace mnt_pin()/mnt_unpin() mess; that stuff will move to
      fs/*.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1629d0eb
    • A
      acct: move mnt_pin() upwards. · 215748e6
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      215748e6
    • A
      make acct_kill() wait for file closing. · 17c0a5aa
      Al Viro 提交于
      Do actual closing of file via schedule_work().  And use
      __fput_sync() there.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      17c0a5aa
    • A
      acct: get rid of acct_lock for acct->count · 2798d4ce
      Al Viro 提交于
      * make acct->count atomic and acct freeing - rcu-delayed.
      * instead of grabbing acct_lock around the places where we take a reference,
      do that under rcu_read_lock() with atomic_long_inc_not_zero().
      * have the new acct locked before making ns->bacct point to it
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2798d4ce
    • A
      acct: get rid of acct_list · 215752fc
      Al Viro 提交于
      Put these suckers on per-vfsmount and per-superblock lists instead.
      Note: right now it's still acct_lock for everything, but that's
      going to change.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      215752fc
    • A
      acct: simplify check_free_space() · 54a4d58a
      Al Viro 提交于
      a) file can't be NULL
      b) file can't be changed under us
      c) all writes are serialized by acct->lock; no need to mess with
      spinlock there.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      54a4d58a
    • A
      acct: new lifetime rules · b8f00e6b
      Al Viro 提交于
      Do not reuse bsd_acct_struct after closing the damn thing.
      Structure lifetime is controlled by refcount now.  We also
      have a mutex in there, held over closing and writing (the
      file is O_APPEND, so we are not losing any concurrency).
      
      As the result, we do not need to bother with get_file()/fput()
      on log write anymore.  Moreover, do_acct_process() only needs
      acct itself; file and pidns are picked from it.
      
      Killed instances are distinguished by having NULL ->ns.
      Refcount is protected by acct_lock; anybody taking the
      mutex needs to grab a reference first.
      
      The things will get a lot simpler in the next commits - this
      is just the minimal chunk switching to the new lifetime rules.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b8f00e6b
    • A
      acct: serialize acct_on() · 9df7fa16
      Al Viro 提交于
      brute-force - on a global mutex that isn't nested into anything.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      9df7fa16
    • A
      acct() should honour the limits from the very beginning · 795a2f22
      Al Viro 提交于
      We need to check free space on the first write to freshly opened log.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      795a2f22
    • A
      split the slow path in acct_process() off · e25ff11f
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e25ff11f
    • A
      separate namespace-independent parts of filling acct_t · cdd37e23
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      cdd37e23
    • A
      acct: switch to __kernel_write() · ed44724b
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ed44724b
    • A
      acct: encode_comp_t(0) is 0, fortunately... · ecfdb33d
      Al Viro 提交于
      There was an amusing bogosity in ac_rw calculation - it tried to
      do encode_comp_t(encode_comp_t(0) / 1024).  Seeing that comp_t is
      a 3-bit exponent + 13-bit mantissa... it's a good thing that 0 is
      represented by all-bits-clear.
      
      The history of that one is interesting - it was introduced in
      2.1.68pre1, when acct.c had been reworked and moved to separate
      file.  Two months later (2.1.86) somebody has noticed that the
      sucker won't compile - there was no task_struct::io_usage.
      At which point the ac_io calculation had changed from
      encode_comp_t(current->io_usage) to encode_comp_t(0) and the
      bug in the next line (absolutely real back then, had it ever
      managed to compile) become a harmless bogosity.  Looks like
      nobody has ever noticed until now.
      
      Anyway, let's bury that idiocy now that it got noticed.  17 years
      is long enough...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ecfdb33d
  5. 24 7月, 2014 1 次提交
  6. 12 6月, 2014 1 次提交
  7. 07 6月, 2014 2 次提交
  8. 05 5月, 2013 1 次提交
  9. 10 4月, 2013 1 次提交
  10. 23 2月, 2013 1 次提交
  11. 28 1月, 2013 1 次提交
    • F
      cputime: Use accessors to read task cputime stats · 6fac4829
      Frederic Weisbecker 提交于
      This is in preparation for the full dynticks feature. While
      remotely reading the cputime of a task running in a full
      dynticks CPU, we'll need to do some extra-computation. This
      way we can account the time it spent tickless in userspace
      since its last cputime snapshot.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      6fac4829
  12. 13 10月, 2012 2 次提交
    • J
      vfs: make path_openat take a struct filename pointer · 669abf4e
      Jeff Layton 提交于
      ...and fix up the callers. For do_file_open_root, just declare a
      struct filename on the stack and fill out the .name field. For
      do_filp_open, make it also take a struct filename pointer, and fix up its
      callers to call it appropriately.
      
      For filp_open, add a variant that takes a struct filename pointer and turn
      filp_open into a wrapper around it.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      669abf4e
    • J
      vfs: define struct filename and have getname() return it · 91a27b2a
      Jeff Layton 提交于
      getname() is intended to copy pathname strings from userspace into a
      kernel buffer. The result is just a string in kernel space. It would
      however be quite helpful to be able to attach some ancillary info to
      the string.
      
      For instance, we could attach some audit-related info to reduce the
      amount of audit-related processing needed. When auditing is enabled,
      we could also call getname() on the string more than once and not
      need to recopy it from userspace.
      
      This patchset converts the getname()/putname() interfaces to return
      a struct instead of a string. For now, the struct just tracks the
      string in kernel space and the original userland pointer for it.
      
      Later, we'll add other information to the struct as it becomes
      convenient.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      91a27b2a
  13. 12 10月, 2012 1 次提交
  14. 18 9月, 2012 1 次提交
  15. 07 1月, 2012 1 次提交
  16. 04 1月, 2012 1 次提交
  17. 15 12月, 2011 1 次提交
  18. 10 8月, 2010 1 次提交
    • C
      pass a struct path to vfs_statfs · ebabe9a9
      Christoph Hellwig 提交于
      We'll need the path to implement the flags field for statvfs support.
      We do have it available in all callers except:
      
       - ecryptfs_statfs.  This one doesn't actually need vfs_statfs but just
         needs to do a caller to the lower filesystem statfs method.
       - sys_ustat.  Add a non-exported statfs_by_dentry helper for it which
         doesn't won't be able to fill out the flags field later on.
      
      In addition rename the helpers for statfs vs fstatfs to do_*statfs instead
      of the misleading vfs prefix.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ebabe9a9
  19. 12 5月, 2010 1 次提交
  20. 12 4月, 2010 1 次提交