1. 28 5月, 2010 22 次提交
  2. 27 5月, 2010 5 次提交
  3. 26 5月, 2010 8 次提交
    • A
      fs/fscache/object-list.c: fix warning on 32-bit · cc68e3be
      Andrew Morton 提交于
      fs/fscache/object-list.c: In function 'fscache_objlist_lookup':
      fs/fscache/object-list.c:105: warning: cast to pointer from integer of different size
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cc68e3be
    • C
      Btrfs: avoid ENOSPC errors in btrfs_dirty_inode · 94b60442
      Chris Mason 提交于
      btrfs_dirty_inode tries to sneak in without much waiting or
      space reservation, mostly for performance reasons.  This
      usually works well but can cause problems when there are
      many many writers.
      
      When btrfs_update_inode fails with ENOSPC, we fallback
      to a slower btrfs_start_transaction call that will reserve
      some space.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      94b60442
    • C
      Btrfs: move O_DIRECT space reservation to btrfs_direct_IO · 3f7c579c
      Chris Mason 提交于
      This moves the delalloc space reservation done for O_DIRECT
      into btrfs_direct_IO.  This way we don't leak reserved space
      if the generic O_DIRECT write code errors out before it
      calls into btrfs_direct_IO.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3f7c579c
    • T
      NFS: Fix another nfs_wb_page() deadlock · 0522f6ad
      Trond Myklebust 提交于
      J.R. Okajima reports that the call to sync_inode() in nfs_wb_page() can
      deadlock with other writeback flush calls. It boils down to the fact
      that we cannot ever call writeback_single_inode() while holding a page
      lock (even if we do set nr_to_write to zero) since another process may
      already be waiting in the call to do_writepages(), and so will deny us
      the I_SYNC lock.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0522f6ad
    • T
      NFS: Ensure that we mark the inode as dirty if we exit early from commit · c5efa5fc
      Trond Myklebust 提交于
      If we exit from nfs_commit_inode() without ensuring that the COMMIT rpc
      call has been completed, we must re-mark the inode as dirty. Otherwise,
      future calls to sync_inode() with the WB_SYNC_ALL flag set will fail to
      ensure that the data is on the disk.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c5efa5fc
    • T
      NFS: Fix a lock imbalance typo in nfs_access_cache_shrinker · 59844a9b
      Trond Myklebust 提交于
      Commit 9c7e7e23 (NFS: Don't call iput() in
      nfs_access_cache_shrinker) unintentionally removed the spin unlock for the
      inode->i_lock.
      Reported-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      59844a9b
    • C
      Btrfs: rework O_DIRECT enospc handling · 4845e44f
      Chris Mason 提交于
      This changes O_DIRECT write code to mark extents as delalloc
      while it is processing them.  Yan Zheng has reworked the
      enospc accounting based on tracking delalloc extents and
      this makes it much easier to track enospc in the O_DIRECT code.
      
      There are a few space cases with the O_DIRECT code though,
      it only sets the EXTENT_DELALLOC bits, instead of doing
      EXTENT_DELALLOC | EXTENT_DIRTY | EXTENT_UPTODATE, because
      we don't want to mess with clearing the dirty and uptodate
      bits when things go wrong.  This is important because there
      are no pages in the page cache, so any extent state structs
      that we put in the tree won't get freed by releasepage.  We have
      to clear them ourselves as the DIO ends.
      
      With this commit, we reserve space at in btrfs_file_aio_write,
      and then as each btrfs_direct_IO call progresses it sets
      EXTENT_DELALLOC on the range.
      
      btrfs_get_blocks_direct is responsible for clearing the delalloc
      at the same time it drops the extent lock.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      4845e44f
    • K
      driver core: add devname module aliases to allow module on-demand auto-loading · 578454ff
      Kay Sievers 提交于
      This adds:
        alias: devname:<name>
      to some common kernel modules, which will allow the on-demand loading
      of the kernel module when the device node is accessed.
      
      Ideally all these modules would be compiled-in, but distros seems too
      much in love with their modularization that we need to cover the common
      cases with this new facility. It will allow us to remove a bunch of pretty
      useless init scripts and modprobes from init scripts.
      
      The static device node aliases will be carried in the module itself. The
      program depmod will extract this information to a file in the module directory:
        $ cat /lib/modules/2.6.34-00650-g537b60d1-dirty/modules.devname
        # Device nodes to trigger on-demand module loading.
        microcode cpu/microcode c10:184
        fuse fuse c10:229
        ppp_generic ppp c108:0
        tun net/tun c10:200
        dm_mod mapper/control c10:235
      
      Udev will pick up the depmod created file on startup and create all the
      static device nodes which the kernel modules specify, so that these modules
      get automatically loaded when the device node is accessed:
        $ /sbin/udevd --debug
        ...
        static_dev_create_from_modules: mknod '/dev/cpu/microcode' c10:184
        static_dev_create_from_modules: mknod '/dev/fuse' c10:229
        static_dev_create_from_modules: mknod '/dev/ppp' c108:0
        static_dev_create_from_modules: mknod '/dev/net/tun' c10:200
        static_dev_create_from_modules: mknod '/dev/mapper/control' c10:235
        udev_rules_apply_static_dev_perms: chmod '/dev/net/tun' 0666
        udev_rules_apply_static_dev_perms: chmod '/dev/fuse' 0666
      
      A few device nodes are switched to statically allocated numbers, to allow
      the static nodes to work. This might also useful for systems which still run
      a plain static /dev, which is completely unsafe to use with any dynamic minor
      numbers.
      
      Note:
      The devname aliases must be limited to the *common* and *single*instance*
      device nodes, like the misc devices, and never be used for conceptually limited
      systems like the loop devices, which should rather get fixed properly and get a
      control node for losetup to talk to, instead of creating a random number of
      device nodes in advance, regardless if they are ever used.
      
      This facility is to hide the mess distros are creating with too modualized
      kernels, and just to hide that these modules are not compiled-in, and not to
      paper-over broken concepts. Thanks! :)
      
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: Ian Kent <raven@themaw.net>
      Signed-Off-By: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      578454ff
  4. 25 5月, 2010 5 次提交