1. 12 Jun, 2009 15 commits
  2. 11 Jun, 2009 25 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable · a525890c
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (23 commits)
        Btrfs: fix extent_buffer leak during tree log replay
        Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir
        Btrfs: fix -o nodatasum printk spelling
        Btrfs: check duplicate backrefs for both data and metadata
        Btrfs: init worker struct fields before kthread-run
        Btrfs: pin buffers during write_dev_supers
        Btrfs: avoid races between super writeout and device list updates
        Fix btrfs when ACLs are configured out
        Btrfs: fdatasync should skip metadata writeout
        Btrfs: remove crc32c.h and use libcrc32c directly.
        Btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION
        Btrfs: autodetect SSD devices
        Btrfs: add mount -o ssd_spread to spread allocations out
        Btrfs: avoid allocation clusters that are too spread out
        Btrfs: Add mount -o nossd
        Btrfs: avoid IO stalls behind congested devices in a multi-device FS
        Btrfs: don't allow WRITE_SYNC bios to starve out regular writes
        Btrfs: fix metadata dirty throttling limits
        Btrfs: reduce mount -o ssd CPU usage
        Btrfs: balance btree more often
        ...
      a525890c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify · 3bb66d7f
      Linus Torvalds authored
      * 'for-linus' of git://git.infradead.org/users/eparis/notify:
        fsnotify: allow groups to set freeing_mark to null
        inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD
        dnotify: do not bother to lock entry->lock when reading mask
        dnotify: do not use ?true:false when assigning to a bool
        fsnotify: move events should indicate the event was on a child
        inotify: reimplement inotify using fsnotify
        fsnotify: handle filesystem unmounts with fsnotify marks
        fsnotify: fsnotify marks on inodes pin them in core
        fsnotify: allow groups to add private data to events
        fsnotify: add correlations between events
        fsnotify: include pathnames with entries when possible
        fsnotify: generic notification queue and waitq
        dnotify: reimplement dnotify using fsnotify
        fsnotify: parent event notification
        fsnotify: add marks to inodes so groups can interpret how to handle those inodes
        fsnotify: unified filesystem notification backend
      3bb66d7f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://linux-arm.org/linux-2.6 · 512626a0
      Linus Torvalds authored
      * 'for-linus' of git://linux-arm.org/linux-2.6:
        kmemleak: Add the corresponding MAINTAINERS entry
        kmemleak: Simple testing module for kmemleak
        kmemleak: Enable the building of the memory leak detector
        kmemleak: Remove some of the kmemleak false positives
        kmemleak: Add modules support
        kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash
        kmemleak: Add the vmalloc memory allocation/freeing hooks
        kmemleak: Add the slub memory allocation/freeing hooks
        kmemleak: Add the slob memory allocation/freeing hooks
        kmemleak: Add the slab memory allocation/freeing hooks
        kmemleak: Add documentation on the memory leak detector
        kmemleak: Add the base support
      
      Manual conflict resolution (with the slab/earlyboot changes) in:
      	drivers/char/vt.c
      	init/main.c
      	mm/slab.c
      512626a0
    • Linus Torvalds's avatar
      Merge branch 'perfcounters-for-linus' of... · 8a1ca8ce
      Linus Torvalds authored
      Merge branch 'perfcounters-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perfcounters-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (574 commits)
        perf_counter: Turn off by default
        perf_counter: Add counter->id to the throttle event
        perf_counter: Better align code
        perf_counter: Rename L2 to LL cache
        perf_counter: Standardize event names
        perf_counter: Rename enums
        perf_counter tools: Clean up u64 usage
        perf_counter: Rename perf_counter_limit sysctl
        perf_counter: More paranoia settings
        perf_counter: powerpc: Implement generalized cache events for POWER processors
        perf_counters: powerpc: Add support for POWER7 processors
        perf_counter: Accurate period data
        perf_counter: Introduce struct for sample data
        perf_counter tools: Normalize data using per sample period data
        perf_counter: Annotate exit ctx recursion
        perf_counter tools: Propagate signals properly
        perf_counter tools: Small frequency related fixes
        perf_counter: More aggressive frequency adjustment
        perf_counter/x86: Fix the model number of Intel Core2 processors
        perf_counter, x86: Correct some event and umask values for Intel processors
        ...
      8a1ca8ce
    • Linus Torvalds's avatar
      Merge branch 'topic/slab/earlyboot' of... · b640f042
      Linus Torvalds authored
      Merge branch 'topic/slab/earlyboot' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
      
      * 'topic/slab/earlyboot' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        vgacon: use slab allocator instead of the bootmem allocator
        irq: use kcalloc() instead of the bootmem allocator
        sched: use slab in cpupri_init()
        sched: use alloc_cpumask_var() instead of alloc_bootmem_cpumask_var()
        memcg: don't use bootmem allocator in setup code
        irq/cpumask: make memoryless node zero happy
        x86: remove some alloc_bootmem_cpumask_var calling
        vt: use kzalloc() instead of the bootmem allocator
        sched: use kzalloc() instead of the bootmem allocator
        init: introduce mm_init()
        vmalloc: use kzalloc() instead of alloc_bootmem()
        slab: setup allocators earlier in the boot sequence
        bootmem: fix slab fallback on numa
        bootmem: use slab if bootmem is no longer available
      b640f042
    • Eric Paris's avatar
      fsnotify: allow groups to set freeing_mark to null · a092ee20
      Eric Paris authored
      Most fsnotify listeners (all but inotify) do not care about marks being
      freed.  Allow groups to set freeing_mark to null and do not call any
      function if it is set that way.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      a092ee20
    • Eric Paris's avatar
      inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD · e42e2773
      Eric Paris authored
      inotify and dnotify will both indicate that they want any event which came
      from a child inode.  The fix is to mask off FS_EVENT_ON_CHILD when deciding
      if inotify or dnotify is interested in a given event.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      e42e2773
    • Eric Paris's avatar
      dnotify: do not bother to lock entry->lock when reading mask · ce61856b
      Eric Paris authored
      entry->lock is needed to make sure entry->mask does not change while
      manipulating it.  In dnotify_should_send_event() we don't care if we get an
      old or a new mask value out of this entry so there is no point it taking
      the lock.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      ce61856b
    • Eric Paris's avatar
      dnotify: do not use ?true:false when assigning to a bool · 5ac697b7
      Eric Paris authored
      dnotify_should send event assigned a bool using ?true:false when computing
      a bit operation.  This is poitless and the bool type does this for us.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      5ac697b7
    • Eric Paris's avatar
      fsnotify: move events should indicate the event was on a child · ff52cc21
      Eric Paris authored
      fsnotify tells its listeners explicitly when an event happened on the given
      inode verses on the child of the given inode.  (see __fsnotify_parent)
      However, the semantics of fsnotify_move() are such that we deliver events
      directly to the two parent directories in question (old_dir and new_dir)
      directly without using the __fsnotify_parent() call.  fsnotify should be
      adding FS_EVENT_ON_CHILD for the notifications to these parents.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      ff52cc21
    • Eric Paris's avatar
      inotify: reimplement inotify using fsnotify · 63c882a0
      Eric Paris authored
      Reimplement inotify_user using fsnotify.  This should be feature for feature
      exactly the same as the original inotify_user.  This does not make any changes
      to the in kernel inotify feature used by audit.  Those patches (and the eventual
      removal of in kernel inotify) will come after the new inotify_user proves to be
      working correctly.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      63c882a0
    • Eric Paris's avatar
      fsnotify: handle filesystem unmounts with fsnotify marks · 164bc619
      Eric Paris authored
      When an fs is unmounted with an fsnotify mark entry attached to one of its
      inodes we need to destroy that mark entry and we also (like inotify) send
      an unmount event.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      164bc619
    • Eric Paris's avatar
      fsnotify: fsnotify marks on inodes pin them in core · 1ef5f13c
      Eric Paris authored
      This patch pins any inodes with an fsnotify mark in core.  The idea is that
      as soon as the mark is removed from the inode->fsnotify_mark_entries list
      the inode will be iput.  In reality is doesn't quite work exactly this way.
      The igrab will happen when the mark is added to an inode, but the iput will
      happen when the inode pointer is NULL'd inside the mark.
      
      It's possible that 2 racing things will try to remove the mark from
      different directions.  One may try to remove the mark because of an
      explicit request and one might try to remove it because the inode was
      deleted.  It's possible that the removal because of inode deletion will
      remove the mark from the inode's list, but the removal by explicit request
      will actually set entry->inode == NULL; and call the iput.  This is safe.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      1ef5f13c
    • Eric Paris's avatar
      fsnotify: allow groups to add private data to events · e4aff117
      Eric Paris authored
      inotify needs per group information attached to events.  This patch allows
      groups to attach private information and implements a callback so that
      information can be freed when an event is being destroyed.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      e4aff117
    • Eric Paris's avatar
      fsnotify: add correlations between events · 47882c6f
      Eric Paris authored
      As part of the standard inotify events it includes a correlation cookie
      between two dentry move operations.  This patch includes the same behaviour
      in fsnotify events.  It is needed so that inotify userspace can be
      implemented on top of fsnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      47882c6f
    • Eric Paris's avatar
      fsnotify: include pathnames with entries when possible · 62ffe5df
      Eric Paris authored
      When inotify wants to send events to a directory about a child it includes
      the name of the original file.  This patch collects that filename and makes
      it available for notification.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      62ffe5df
    • Eric Paris's avatar
      fsnotify: generic notification queue and waitq · a2d8bc6c
      Eric Paris authored
      inotify needs to do asyc notification in which event information is stored
      on a queue until the listener is ready to receive it.  This patch
      implements a generic notification queue for inotify (and later fanotify) to
      store events to be sent at a later time.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      a2d8bc6c
    • Eric Paris's avatar
      dnotify: reimplement dnotify using fsnotify · 3c5119c0
      Eric Paris authored
      Reimplement dnotify using fsnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      3c5119c0
    • Eric Paris's avatar
      fsnotify: parent event notification · c28f7e56
      Eric Paris authored
      inotify and dnotify both use a similar parent notification mechanism.  We
      add a generic parent notification mechanism to fsnotify for both of these
      to use.  This new machanism also adds the dentry flag optimization which
      exists for inotify to dnotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      c28f7e56
    • Eric Paris's avatar
      fsnotify: add marks to inodes so groups can interpret how to handle those inodes · 3be25f49
      Eric Paris authored
      This patch creates a way for fsnotify groups to attach marks to inodes.
      These marks have little meaning to the generic fsnotify infrastructure
      and thus their meaning should be interpreted by the group that attached
      them to the inode's list.
      
      dnotify and inotify  will make use of these markings to indicate which
      inodes are of interest to their respective groups.  But this implementation
      has the useful property that in the future other listeners could actually
      use the marks for the exact opposite reason, aka to indicate which inodes
      it had NO interest in.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      3be25f49
    • Eric Paris's avatar
      fsnotify: unified filesystem notification backend · 90586523
      Eric Paris authored
      fsnotify is a backend for filesystem notification.  fsnotify does
      not provide any userspace interface but does provide the basis
      needed for other notification schemes such as dnotify.  fsnotify
      can be extended to be the backend for inotify or the upcoming
      fanotify.  fsnotify provides a mechanism for "groups" to register for
      some set of filesystem events and to then deliver those events to
      those groups for processing.
      
      fsnotify has a number of benefits, the first being actually shrinking the size
      of an inode.  Before fsnotify to support both dnotify and inotify an inode had
      
              unsigned long           i_dnotify_mask; /* Directory notify events */
              struct dnotify_struct   *i_dnotify; /* for directory notifications */
              struct list_head        inotify_watches; /* watches on this inode */
              struct mutex            inotify_mutex;  /* protects the watches list
      
      But with fsnotify this same functionallity (and more) is done with just
      
              __u32                   i_fsnotify_mask; /* all events for this inode */
              struct hlist_head       i_fsnotify_mark_entries; /* marks on this inode */
      
      That's right, inotify, dnotify, and fanotify all in 64 bits.  We used that
      much space just in inotify_watches alone, before this patch set.
      
      fsnotify object lifetime and locking is MUCH better than what we have today.
      inotify locking is incredibly complex.  See 8f7b0ba1 as an example of
      what's been busted since inception.  inotify needs to know internal semantics
      of superblock destruction and unmounting to function.  The inode pinning and
      vfs contortions are horrible.
      
      no fsnotify implementers do allocation under locks.  This means things like
      f04b30de which (due to an overabundance of caution) changes GFP_KERNEL to
      GFP_NOFS can be reverted.  There are no longer any allocation rules when using
      or implementing your own fsnotify listener.
      
      fsnotify paves the way for fanotify.  In brief fanotify is a notification
      mechanism that delivers the lisener both an 'event' and an open file descriptor
      to the object in question.  This means that fanotify is pathname agnostic.
      Some on lkml may not care for the original companies or users that pushed for
      TALPA, but fanotify was designed with flexibility and input for other users in
      mind.  The readahead group expressed interest in fanotify as it could be used
      to profile disk access on boot without breaking the audit system.  The desktop
      search groups have also expressed interest in fanotify as it solves a number
      of the race conditions and problems present with managing inotify when more
      than a limited number of specific files are of interest.  fanotify can provide
      for a userspace access control system which makes it a clean interface for AV
      vendors to hook without trying to do binary patching on the syscall table,
      LSM, and everywhere else they do their things today.  With this patch series
      fanotify can be implemented in less than 1200 lines of easy to review code.
      Almost all of which is the socket based user interface.
      
      This patch series builds fsnotify to the point that it can implement
      dnotify and inotify_user.  Patches exist and will be sent soon after
      acceptance to finish the in kernel inotify conversion (audit) and implement
      fanotify.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      90586523
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 · 871fa907
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
        jfs: Add missing mutex_unlock call to error path
        missing unlock in jfs_quota_write()
      871fa907
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · 7702667b
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: memtest: use pointers of equal type for comparison
      7702667b
    • Oleg Nesterov's avatar
      slow_work_thread() should do the exclusive wait · b415c49a
      Oleg Nesterov authored
      slow_work_thread() sleeps on slow_work_thread_wq without WQ_FLAG_EXCLUSIVE,
      this means that slow_work_enqueue()->__wake_up(nr_exclusive => 1) wakes up all
      kslowd threads.  This is not what we want, so we change slow_work_thread() to
      use prepare_to_wait_exclusive() instead.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b415c49a
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 6adc74b7
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        [libata] ata_piix: Enable parallel scan
        sata_nv: use hardreset only for post-boot probing
        [libata] ahci: Restore SB600 SATA controller 64 bit DMA
        ata_piix: Remove stale comment
        ata_piix: Turn on hotplugging support for older chips
        ahci: misc cleanups for EM stuff
        [libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2
        sata_sil: enable 32-bit PIO
        sata_sx4: speed up ECC initialization
        libata-sff: avoid byte swapping in ata_sff_data_xfer()
        [libata] ahci: use less error-prone array initializers
      6adc74b7