10 Dec, 2009

3 commits

  • So far the maximum quota space limit was 4TB. Apparently this isn't enough
    for Lustre guys anymore. So implement new quota format which raises block
    limits to 2^64 bytes. Also store number of inodes and inode limits in
    64-bit variables as 2^32 files isn't that insanely high anymore.

    The first version of the patch has been developed by Andrew Perepechko
    .

    CC: Andrew.Perepechko@Sun.COM
    Signed-off-by: Jan Kara

    Jan Kara
     
  • We should hold i_mutex when looking up quota files for journaled quotas,
    otherwise a WARN_ON in lookup_one_len triggers. The fact that we didn't
    hold i_mutex previously probably could not lead to a real bug since the
    filesystem is just being mounted / remounted read-write and thus the
    root directory cannot change anyway but it's definitely cleaner with
    i_mutex.

    Reported-by: Bastien ROUCARIES
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Jan Kara

    Alexey Dobriyan
     

08 Dec, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits)
    security/tomoyo: Remove now unnecessary handling of security_sysctl.
    security/tomoyo: Add a special case to handle accesses through the internal proc mount.
    sysctl: Drop & in front of every proc_handler.
    sysctl: Remove CTL_NONE and CTL_UNNUMBERED
    sysctl: kill dead ctl_handler definitions.
    sysctl: Remove the last of the generic binary sysctl support
    sysctl net: Remove unused binary sysctl code
    sysctl security/tomoyo: Don't look at ctl_name
    sysctl arm: Remove binary sysctl support
    sysctl x86: Remove dead binary sysctl support
    sysctl sh: Remove dead binary sysctl support
    sysctl powerpc: Remove dead binary sysctl support
    sysctl ia64: Remove dead binary sysctl support
    sysctl s390: Remove dead sysctl binary support
    sysctl frv: Remove dead binary sysctl support
    sysctl mips/lasat: Remove dead binary sysctl support
    sysctl drivers: Remove dead binary sysctl support
    sysctl crypto: Remove dead binary sysctl support
    sysctl security/keys: Remove dead binary sysctl support
    sysctl kernel: Remove binary sysctl logic
    ...

    Linus Torvalds
     

03 Dec, 2009

1 commit

  • Sending a message to userspace in a generic format to warn
    of events (e.g. quota exceeded) in the quota subsystem is
    a generically useful feature. This patch makes some minor
    changes to the send_message function from dquot.c renaming
    it quota_send_message, moving it to quota.c and exporting it
    for use by filesystems which do not use the dquot code.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

19 Nov, 2009

1 commit


12 Nov, 2009

1 commit


22 Sep, 2009

2 commits


30 Jul, 2009

1 commit

  • Commit d01730d74d2b0155da50d44555001706294014f7 didn't completely fix
    the problem since we still take dqio_mutex and i_mutex in the wrong
    order. Move taking of i_mutex further down (luckily it's needed only
    for updating inode flags) below where dqio_mutex is taken.

    Tested-by: Valdis Kletnieks
    Signed-off-by: Jan Kara

    Jan Kara
     

08 Jul, 2009

1 commit

  • The following test script triggers a deadlock on ext2 filesystem:
    while true; do quotaon /dev/hda >&/dev/null; usleep $RANDOM; done &
    while true; do quotaoff /dev/hda >&/dev/null; usleep $RANDOM; done &

    I found there is a potential deadlock between quotaon and quotaoff (or
    quotasync). Basically, all of quotactl operations need to be protected by
    dqonoff_mutex. vfs_quota_off and vfs_quota_sync also call sb->s_op->quota_write
    that needs to grab the i_mutex of the quota file. But in vfs_quota_on_inode
    (called from quotaon operation), the current code tries to grab the i_mutex of
    the quota file first before getting quonoff_mutex.

    Reverse the order in which we take locks in vfs_quota_on_inode().

    Jan Kara: Changed changelog to be more readable, made lockdep happy with
    I_MUTEX_QUOTA.

    Signed-off-by: Jiaying Zhang
    Signed-off-by: Jan Kara

    Jiaying Zhang
     

12 Jun, 2009

1 commit

  • Currently the VFS calls vfs_dq_sync to sync out disk quotas for a given
    superblock. This is a small wrapper around sync_dquots which for the
    case of a non-NULL superblock is a small wrapper around quota_sync_sb.

    Just make quota_sync_sb global (rename it to sync_quota_sb) and call it
    directly. Also call it directly for those cases in quota.c that have a
    superblock and leave sync_dquots purely an iterator over sync_quota_sb and
    remove it's superblock argument.

    To make this nicer move the check for the lack of a quota_sync method
    from the callers into sync_quota_sb.

    [folded build fix from Alexander Beregalov ]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara
    Signed-off-by: Al Viro

    Christoph Hellwig
     

27 Apr, 2009

1 commit


03 Apr, 2009

1 commit

  • clear_inode() will switch inode state from I_FREEING to I_CLEAR, and do so
    _outside_ of inode_lock. So any I_FREEING testing is incomplete without a
    coupled testing of I_CLEAR.

    So add I_CLEAR tests to drop_pagecache_sb(), generic_sync_sb_inodes() and
    add_dquot_ref().

    Masayoshi MIZUMA discovered the bug in drop_pagecache_sb() and Jan Kara
    reminds fixing the other two cases.

    Masayoshi MIZUMA has a nice panic flow:

    =====================================================================
    [process A] | [process B]
    | |
    | prune_icache() | drop_pagecache()
    | spin_lock(&inode_lock) | drop_pagecache_sb()
    | inode->i_state |= I_FREEING; | |
    | spin_unlock(&inode_lock) | V
    | | | spin_lock(&inode_lock)
    | V | |
    | dispose_list() | |
    | list_del() | |
    | clear_inode() | |
    | inode->i_state = I_CLEAR | |
    | | | V
    | | | if (inode->i_state & (I_FREEING|I_WILL_FREE))
    | | | continue;
    Reviewed-by: Jan Kara
    Signed-off-by: Wu Fengguang
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     

28 Mar, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
    fs: avoid I_NEW inodes
    Merge code for single and multiple-instance mounts
    Remove get_init_pts_sb()
    Move common mknod_ptmx() calls into caller
    Parse mount options just once and copy them to super block
    Unroll essentials of do_remount_sb() into devpts
    vfs: simple_set_mnt() should return void
    fs: move bdev code out of buffer.c
    constify dentry_operations: rest
    constify dentry_operations: configfs
    constify dentry_operations: sysfs
    constify dentry_operations: JFS
    constify dentry_operations: OCFS2
    constify dentry_operations: GFS2
    constify dentry_operations: FAT
    constify dentry_operations: FUSE
    constify dentry_operations: procfs
    constify dentry_operations: ecryptfs
    constify dentry_operations: CIFS
    constify dentry_operations: AFS
    ...

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6: (27 commits)
    ext2: Zero our b_size in ext2_quota_read()
    trivial: fix typos/grammar errors in fs/Kconfig
    quota: Coding style fixes
    quota: Remove superfluous inlines
    quota: Remove uppercase aliases for quota functions.
    nfsd: Use lowercase names of quota functions
    jfs: Use lowercase names of quota functions
    udf: Use lowercase names of quota functions
    ufs: Use lowercase names of quota functions
    reiserfs: Use lowercase names of quota functions
    ext4: Use lowercase names of quota functions
    ext3: Use lowercase names of quota functions
    ext2: Use lowercase names of quota functions
    ramfs: Remove quota call
    vfs: Use lowercase names of quota functions
    quota: Remove dqbuf_t and other cleanups
    quota: Remove NODQUOT macro
    quota: Make global quota locks cacheline aligned
    quota: Move quota files into separate directory
    ext4: quota reservation for delayed allocation
    ...

    Linus Torvalds
     

26 Mar, 2009

7 commits