1. 07 9月, 2006 3 次提交
    • D
      [XFS] Fix xfs_splice_write() so appended data gets to disk. · 0a8d17d0
      David Chinner 提交于
      xfs_splice_write() failed to update the on disk inode size when extending
      the so when the file was closed the range extended by splice was truncated
      off. Hence any region of a file written to by splice would end up as a
      hole full of zeros.
      
      SGI-PV: 955939
      SGI-Modid: xfs-linux-melb:xfs-kern:26920a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NDavid Chatterton <chatz@sgi.com>
      0a8d17d0
    • L
      [XFS] Fix ABBA deadlock between i_mutex and iolock. Avoid calling · 721259bc
      Lachlan McIlroy 提交于
      __blockdev_direct_IO for the DIO_OWN_LOCKING case for direct I/O reads
      since it drops and reacquires the i_mutex while holding the iolock and
      this violates the locking order.
      
      SGI-PV: 955696
      SGI-Modid: xfs-linux-melb:xfs-kern:26898a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chatterton <chatz@sgi.com>
      721259bc
    • D
      [XFS] Prevent free space oversubscription and xfssyncd looping. · 4be536de
      David Chinner 提交于
      The fix for recent ENOSPC deadlocks introduced certain limitations on
      allocations. The fix could cause xfssyncd to loop endlessly if we did not
      leave some space free for the allocator to work correctly. Basically, we
      needed to ensure that we had at least 4 blocks free for an AG free list
      and a block for the inode bmap btree at all times.
      
      However, this did not take into account the fact that each AG has a free
      list that needs 4 blocks. Hence any filesystem with more than one AG could
      cause oversubscription of free space and make xfssyncd spin forever trying
      to allocate space needed for AG freelists that was not available in the
      AG.
      
      The following patch reserves space for the free lists in all AGs plus the
      inode bmap btree which prevents oversubscription. It also prevents those
      blocks from being reported as free space (as they can never be used) and
      makes the SMP in-core superblock accounting code and the reserved block
      ioctl respect this requirement.
      
      SGI-PV: 955674
      SGI-Modid: xfs-linux-melb:xfs-kern:26894a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NDavid Chatterton <chatz@sgi.com>
      4be536de
  2. 30 8月, 2006 1 次提交
  3. 10 8月, 2006 1 次提交
    • N
      [XFS] Fix xfs_free_extent related NULL pointer dereference. · 0e1edbd9
      Nathan Scott 提交于
      We recently fixed an out-of-space deadlock in XFS, and part of that fix
      involved the addition of the XFS_ALLOC_FLAG_FREEING flag to some of the
      space allocator calls to indicate they're freeing space, not allocating
      it. There was a missed xfs_alloc_fix_freelist condition test that did not
      correctly test "flags". The same test would also test an uninitialised
      structure field (args->userdata) and depending on its value either would
      or would not return early with a critical buffer pointer set to NULL.
      
      This fixes that up, adds asserts to several places to catch future botches
      of this nature, and skips sections of xfs_alloc_fix_freelist that are
      irrelevent for the space-freeing case.
      
      SGI-PV: 955303
      SGI-Modid: xfs-linux-melb:xfs-kern:26743a
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      0e1edbd9
  4. 28 7月, 2006 4 次提交
  5. 11 7月, 2006 1 次提交
  6. 01 7月, 2006 1 次提交
  7. 29 6月, 2006 1 次提交
  8. 28 6月, 2006 4 次提交
  9. 27 6月, 2006 7 次提交
  10. 26 6月, 2006 1 次提交
  11. 23 6月, 2006 4 次提交
    • K
      [PATCH] for_each_possible_cpu: xfs · 6f0419e0
      KAMEZAWA Hiroyuki 提交于
      for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
      in the past where people were using for_each_cpu() where they should have been
      iterating across only online or present CPUs.  This is inefficient and
      possibly buggy.
      
      We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
      future.
      
      This patch replaces for_each_cpu with for_each_possible_cpu.
      in xfs.
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NNathan Scott <nathans@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6f0419e0
    • D
      [PATCH] XFS: Use the dentry passed to statfs() to limit the scope of the results · d6938d1b
      David Howells 提交于
      Enable XFS to limit the statfs() results to the project quota covering the
      dentry used as a base for call.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d6938d1b
    • D
      [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry · 726c3342
      David Howells 提交于
      Give the statfs superblock operation a dentry pointer rather than a superblock
      pointer.
      
      This complements the get_sb() patch.  That reduced the significance of
      sb->s_root, allowing NFS to place a fake root there.  However, NFS does
      require a dentry to use as a target for the statfs operation.  This permits
      the root in the vfsmount to be used instead.
      
      linux/mount.h has been added where necessary to make allyesconfig build
      successfully.
      
      Interest has also been expressed for use with the FUSE and XFS filesystems.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      726c3342
    • D
      [PATCH] VFS: Permit filesystem to override root dentry on mount · 454e2398
      David Howells 提交于
      Extend the get_sb() filesystem operation to take an extra argument that
      permits the VFS to pass in the target vfsmount that defines the mountpoint.
      
      The filesystem is then required to manually set the superblock and root dentry
      pointers.  For most filesystems, this should be done with simple_set_mnt()
      which will set the superblock pointer and then set the root dentry to the
      superblock's s_root (as per the old default behaviour).
      
      The get_sb() op now returns an integer as there's now no need to return the
      superblock pointer.
      
      This patch permits a superblock to be implicitly shared amongst several mount
      points, such as can be done with NFS to avoid potential inode aliasing.  In
      such a case, simple_set_mnt() would not be called, and instead the mnt_root
      and mnt_sb would be set directly.
      
      The patch also makes the following changes:
      
       (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
           pointer argument and return an integer, so most filesystems have to change
           very little.
      
       (*) If one of the convenience function is not used, then get_sb() should
           normally call simple_set_mnt() to instantiate the vfsmount. This will
           always return 0, and so can be tail-called from get_sb().
      
       (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
           dcache upon superblock destruction rather than shrink_dcache_anon().
      
           This is required because the superblock may now have multiple trees that
           aren't actually bound to s_root, but that still need to be cleaned up. The
           currently called functions assume that the whole tree is rooted at s_root,
           and that anonymous dentries are not the roots of trees which results in
           dentries being left unculled.
      
           However, with the way NFS superblock sharing are currently set to be
           implemented, these assumptions are violated: the root of the filesystem is
           simply a dummy dentry and inode (the real inode for '/' may well be
           inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
           with child trees.
      
           [*] Anonymous until discovered from another tree.
      
       (*) The documentation has been adjusted, including the additional bit of
           changing ext2_* into foo_* in the documentation.
      
      [akpm@osdl.org: convert ipath_fs, do other stuff]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      454e2398
  12. 20 6月, 2006 4 次提交
  13. 19 6月, 2006 5 次提交
  14. 13 6月, 2006 1 次提交
  15. 09 6月, 2006 2 次提交