27 Sep, 2006

3 commits

  • This eliminates the i_blksize field from struct inode. Filesystems that want
    to provide a per-inode st_blksize can do so by providing their own getattr
    routine instead of using the generic_fillattr() function.

    Note that some filesystems were providing pretty much random (and incorrect)
    values for i_blksize.

    [bunk@stusta.de: cleanup]
    [akpm@osdl.org: generic_fillattr() fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • * Rougly half of callers already do it by not checking return value
    * Code in drivers/acpi/osl.c does the following to be sure:

    (void)kmem_cache_destroy(cache);

    * Those who check it printk something, however, slab_error already printed
    the name of failed cache.
    * XFS BUGs on failed kmem_cache_destroy which is not the decision
    low-level filesystem driver should make. Converted to ignore.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • * Removing useless casts
    * Removing useless wrapper
    * Conversion from kmalloc+memset to kzalloc

    Signed-off-by: Panagiotis Issaris
    Acked-by: Dave Kleikamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Panagiotis Issaris
     

07 Sep, 2006

4 commits

  • SGI-PV: 955993
    SGI-Modid: xfs-linux-melb:xfs-kern:26934a

    Signed-off-by: Nathan Scott
    Signed-off-by: David Chatterton

    Nathan Scott
     
  • 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: David Chinner
    Signed-off-by: David Chatterton

    David Chinner
     
  • __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: Lachlan McIlroy
    Signed-off-by: David Chatterton

    Lachlan McIlroy
     
  • 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: David Chinner
    Signed-off-by: David Chatterton

    David Chinner
     

30 Aug, 2006

1 commit


10 Aug, 2006

1 commit

  • 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: Nathan Scott

    Nathan Scott
     

28 Jul, 2006

4 commits


11 Jul, 2006

1 commit


01 Jul, 2006

1 commit


29 Jun, 2006

1 commit


28 Jun, 2006

5 commits


27 Jun, 2006

7 commits


26 Jun, 2006

1 commit


23 Jun, 2006

4 commits

  • 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: KAMEZAWA Hiroyuki
    Acked-by: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Enable XFS to limit the statfs() results to the project quota covering the
    dentry used as a base for call.

    Signed-off-by: David Howells
    Signed-off-by: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

20 Jun, 2006

4 commits


19 Jun, 2006

3 commits