04 Jan, 2012

1 commit


03 Nov, 2011

2 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (97 commits)
    jbd2: Unify log messages in jbd2 code
    jbd/jbd2: validate sb->s_first in journal_get_superblock()
    ext4: let ext4_ext_rm_leaf work with EXT_DEBUG defined
    ext4: fix a syntax error in ext4_ext_insert_extent when debugging enabled
    ext4: fix a typo in struct ext4_allocation_context
    ext4: Don't normalize an falloc request if it can fit in 1 extent.
    ext4: remove comments about extent mount option in ext4_new_inode()
    ext4: let ext4_discard_partial_buffers handle unaligned range correctly
    ext4: return ENOMEM if find_or_create_pages fails
    ext4: move vars to local scope in ext4_discard_partial_page_buffers_no_lock()
    ext4: Create helper function for EXT4_IO_END_UNWRITTEN and i_aiodio_unwritten
    ext4: optimize locking for end_io extent conversion
    ext4: remove unnecessary call to waitqueue_active()
    ext4: Use correct locking for ext4_end_io_nolock()
    ext4: fix race in xattr block allocation path
    ext4: trace punch_hole correctly in ext4_ext_map_blocks
    ext4: clean up AGGRESSIVE_TEST code
    ext4: move variables to their scope
    ext4: fix quota accounting during migration
    ext4: migrate cleanup
    ...

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    udf: Cleanup metadata flags handling
    udf: Skip mirror metadata FE loading when metadata FE is ok
    ext3: Allow quota file use root reservation
    udf: Remove web reference from UDF MAINTAINERS entry
    quota: Drop path reference on error exit from quotactl
    udf: Neaten udf_debug uses
    udf: Neaten logging output, use vsprintf extension %pV
    udf: Convert printks to pr_
    udf: Rename udf_warning to udf_warn
    udf: Rename udf_error to udf_err
    udf: Promote some debugging messages to udf_error
    ext3: Remove the obsolete broken EXT3_IOC32_WAIT_FOR_READONLY.
    udf: Add readpages support for udf.
    ext3/balloc.c: local functions should be static
    ext2: fix the outdated comment in ext2_nfs_get_inode()
    ext3: remove deprecated oldalloc
    fs/ext3/balloc.c: delete useless initialization
    fs/ext2/balloc.c: delete useless initialization
    ext3: fix message in ext3_remount for rw-remount case
    ext3: Remove i_mutex from ext3_sync_file()

    Fix up trivial (printf format cleanup) conflicts in fs/udf/udfdecl.h

    Linus Torvalds
     

01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

31 Aug, 2011

1 commit


17 Aug, 2011

1 commit

  • For a long time now orlov is the default block allocator in the ext3. It
    performs better than the old one and no one seems to claim otherwise so
    we can safely drop it and make oldalloc and orlov mount option
    deprecated.

    Signed-off-by: Lukas Czerner
    Signed-off-by: Jan Kara

    Lukas Czerner
     

27 Jul, 2011

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
    jbd: change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t
    ext3.txt: update the links in the section "useful links" to the latest ones
    ext3: Fix data corruption in inodes with journalled data
    ext2: check xattr name_len before acquiring xattr_sem in ext2_xattr_get
    ext3: Fix compilation with -DDX_DEBUG
    quota: Remove unused declaration
    jbd: Use WRITE_SYNC in journal checkpoint.
    jbd: Fix oops in journal_remove_journal_head()
    ext3: Return -EINVAL when start is beyond the end of fs in ext3_trim_fs()
    ext3/ioctl.c: silence sparse warnings about different address spaces
    ext3/ext4 Documentation: remove bh/nobh since it has been deprecated
    ext3: Improve truncate error handling
    ext3: use proper little-endian bitops
    ext2: include fs.h into ext2_fs.h
    ext3: Fix oops in ext3_try_to_allocate_with_rsv()
    jbd: fix a bug of leaking jh->b_jcount
    jbd: remove dependency on __GFP_NOFAIL
    ext3: Convert ext3 to new truncate calling convention
    jbd: Add fixed tracepoints
    ext3: Add fixed tracepoints

    Resolve conflicts in fs/ext3/fsync.c due to fsync locking push-down and
    new fixed tracepoints.

    Linus Torvalds
     

21 Jul, 2011

1 commit

  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     

25 Jun, 2011

2 commits

  • ext3_{set,clear}_bit() is defined as __test_and_{set,clear}_bit_le()
    for ext3. But all ext3_{set,clear}_bit() calls ignore return values.
    So these can be replaced with __{set,clear}_bit_le().

    This changes ext3_{set,clear}_bit safely, because if someone uses
    these macros without noticing the change, new ext3_{set,clear}_bit
    don't have return value and causes compiler errors where the return
    value is used.

    This also removes unused ext3_find_first_zero_bit().

    Signed-off-by: Akinobu Mita
    Cc: Jan Kara
    Cc: Andrew Morton
    Cc: Andreas Dilger
    Cc: linux-ext4@vger.kernel.org
    Signed-off-by: Jan Kara

    Akinobu Mita
     
  • Mostly trivial conversion. We fix a bug that IS_IMMUTABLE and IS_APPEND files
    could not be truncated during failed writes as we change the code. In fact the
    test is not needed at all because both IS_IMMUTABLE and IS_APPEND is tested in
    upper layers in do_sys_[f]truncate(), may_write(), etc.

    Signed-off-by: Jan Kara

    Jan Kara
     

27 May, 2011

1 commit

  • Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
    anything else, so that the filesystem can track internally if it
    needs to push out a transaction for fdatasync or not.

    This is just the prototype change with no user for it yet. I plan
    to push large XFS changes for the next merge window, and getting
    this trivial infrastructure in this window would help a lot to avoid
    tree interdependencies.

    Also remove incorrect comments that ->dirty_inode can't block. That
    has been changed a long time ago, and many implementations rely on it.

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

    Christoph Hellwig
     

24 Mar, 2011

1 commit

  • As a preparation for removing ext2 non-atomic bit operations from
    asm/bitops.h. This converts ext2 non-atomic bit operations to
    little-endian bit operations.

    Signed-off-by: Akinobu Mita
    Acked-by: Jan Kara
    Cc: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

08 Mar, 2011

1 commit


02 Feb, 2011

1 commit

  • SELinux would like to implement a new labeling behavior of newly created
    inodes. We currently label new inodes based on the parent and the creating
    process. This new behavior would also take into account the name of the
    new object when deciding the new label. This is not the (supposed) full path,
    just the last component of the path.

    This is very useful because creating /etc/shadow is different than creating
    /etc/passwd but the kernel hooks are unable to differentiate these
    operations. We currently require that userspace realize it is doing some
    difficult operation like that and than userspace jumps through SELinux hoops
    to get things set up correctly. This patch does not implement new
    behavior, that is obviously contained in a seperate SELinux patch, but it
    does pass the needed name down to the correct LSM hook. If no such name
    exists it is fine to pass NULL.

    Signed-off-by: Eric Paris

    Eric Paris
     

11 Jan, 2011

2 commits

  • The addition of 64k block capability in the rec_len_from_disk
    and rec_len_to_disk functions added a bit of math overhead which
    slows down file create workloads needlessly when the architecture
    cannot even support 64k blocks, thanks to page size limits.

    Similar changes already exist in the ext4 codebase.

    The directory entry checking can also be optimized a bit
    by sprinkling in some unlikely() conditions to move the
    error handling out of line.

    bonnie++ sequential file creates on a 512MB ramdisk speeds up
    from about 77,000/s to about 82,000/s, about a 6% improvement.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Jan Kara

    Eric Sandeen
     
  • Walk through allocation groups and trim all free extents. It can be
    invoked through FITRIM ioctl on the file system. The main idea is to
    provide a way to trim the whole file system if needed, since some SSD's
    may suffer from performance loss after the whole device was filled (it
    does not mean that fs is full!).

    It search for free extents in allocation groups specified by Byte range
    start -> start+len. When the free extent is within this range, blocks are
    marked as used and then trimmed. Afterwards these blocks are marked as
    free in per-group bitmap.

    [JK: Fixed up error handling and trimming of a single group]

    Signed-off-by: Lukas Czerner
    Reviewed-by: Jan Kara
    Reviewed-by: Dmitry Monakhov
    Signed-off-by: Jan Kara

    Lukas Czerner
     

11 Aug, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
    no need for list_for_each_entry_safe()/resetting with superblock list
    Fix sget() race with failing mount
    vfs: don't hold s_umount over close_bdev_exclusive() call
    sysv: do not mark superblock dirty on remount
    sysv: do not mark superblock dirty on mount
    btrfs: remove junk sb_dirt change
    BFS: clean up the superblock usage
    AFFS: wait for sb synchronization when needed
    AFFS: clean up dirty flag usage
    cifs: truncate fallout
    mbcache: fix shrinker function return value
    mbcache: Remove unused features
    add f_flags to struct statfs(64)
    pass a struct path to vfs_statfs
    update VFS documentation for method changes.
    All filesystems that need invalidate_inode_buffers() are doing that explicitly
    convert remaining ->clear_inode() to ->evict_inode()
    Make ->drop_inode() just return whether inode needs to be dropped
    fs/inode.c:clear_inode() is gone
    fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
    ...

    Fix up trivial conflicts in fs/nilfs2/super.c

    Linus Torvalds
     

10 Aug, 2010

1 commit


21 Jul, 2010

1 commit


28 May, 2010

1 commit


30 Mar, 2010

1 commit

  • In commit 9df93939b735 ("ext3: Use bitops to read/modify
    EXT3_I(inode)->i_state") ext3 changed its internal 'i_state' variable to
    use bitops for its state handling. However, unline the same ext4
    change, it didn't actually change the name of the field when it changed
    the semantics of it.

    As a result, an old use of 'i_state' remained in fs/ext3/ialloc.c that
    initialized the field to EXT3_STATE_NEW. And that does not work
    _at_all_ when we're now working with individually named bits rather than
    values that get masked. So the code tried to mark the state to be new,
    but in actual fact set the field to EXT3_STATE_JDATA. Which makes no
    sense at all, and screws up all the code that checks whether the inode
    was newly allocated.

    In particular, it made the xattr code unhappy, and caused various random
    behavior, like apparently

    https://bugzilla.redhat.com/show_bug.cgi?id=577911

    So fix the initialization, and rename the field to match ext4 so that we
    don't have this happen again.

    Cc: James Morris
    Cc: Stephen Smalley
    Cc: Daniel J Walsh
    Cc: Eric Paris
    Cc: Jan Kara
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Mar, 2010

2 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
    quota: stop using QUOTA_OK / NO_QUOTA
    dquot: cleanup dquot initialize routine
    dquot: move dquot initialization responsibility into the filesystem
    dquot: cleanup dquot drop routine
    dquot: move dquot drop responsibility into the filesystem
    dquot: cleanup dquot transfer routine
    dquot: move dquot transfer responsibility into the filesystem
    dquot: cleanup inode allocation / freeing routines
    dquot: cleanup space allocation / freeing routines
    ext3: add writepage sanity checks
    ext3: Truncate allocated blocks if direct IO write fails to update i_size
    quota: Properly invalidate caches even for filesystems with blocksize < pagesize
    quota: generalize quota transfer interface
    quota: sb_quota state flags cleanup
    jbd: Delay discarding buffers in journal_unmap_buffer
    ext3: quota_write cross block boundary behaviour
    quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
    quota: split out compat_sys_quotactl support from quota.c
    quota: split out netlink notification support from quota.c
    quota: remove invalid optimization from quota_sync_all
    ...

    Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c

    Linus Torvalds
     
  • This gives the filesystem more information about the writeback that
    is happening. Trond requested this for the NFS unstable write handling,
    and other filesystems might benefit from this too by beeing able to
    distinguish between the different callers in more detail.

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

    Christoph Hellwig
     

05 Mar, 2010

1 commit

  • At several places we modify EXT3_I(inode)->i_state without holding i_mutex
    (ext3_release_file, ext3_bmap, ext3_journalled_writepage, ext3_do_update_inode,
    ...). These modifications are racy and we can lose updates to i_state. So
    convert handling of i_state to use bitops which are atomic.

    Signed-off-by: Jan Kara

    Jan Kara
     

10 Dec, 2009

1 commit

  • Make messages produced by ext3 more unified. It should be
    easy to parse.

    dmesg before patch:
    [ 4893.684892] reservations ON
    [ 4893.684896] xip option not supported
    [ 4893.684964] EXT3-fs warning: maximal mount count reached, running
    e2fsck is recommended

    dmesg after patch:
    [ 873.300792] EXT3-fs (loop0): using internal journaln
    [ 873.300796] EXT3-fs (loop0): mounted filesystem with writeback data mode
    [ 924.163657] EXT3-fs (loop0): error: can't find ext3 filesystem on dev loop0.
    [ 723.755642] EXT3-fs (loop0): error: bad blocksize 8192
    [ 357.874687] EXT3-fs (loop0): error: no journal found. mounting ext3 over ext2?
    [ 873.300764] EXT3-fs (loop0): warning: maximal mount count reached, running e2fsck is recommended
    [ 924.163657] EXT3-fs (loop0): error: can't find ext3 filesystem on dev loop0.

    Signed-off-by: Alexey Fisher
    Signed-off-by: Jan Kara

    Alexey Fisher
     

16 Jul, 2009

1 commit

  • Get rid of extenddisksize parameter of ext3_get_blocks_handle(). This seems to
    be a relict from some old days and setting disksize in this function does not
    make much sence. Currently it was set only by ext3_getblk(). Since the
    parameter has some effect only if create == 1, it is easy to check that the
    three callers which end up calling ext3_getblk() with create == 1 (ext3_append,
    ext3_quota_write, ext3_mkdir) do the right thing and set disksize themselves.

    Signed-off-by: Jan Kara

    Jan Kara
     

04 Apr, 2009

1 commit


03 Apr, 2009

2 commits


09 Jan, 2009

3 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits)
    jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
    ext4: Remove "extents" mount option
    block: Add Kconfig help which notes that ext4 needs CONFIG_LBD
    ext4: Make printk's consistently prefixed with "EXT4-fs: "
    ext4: Add sanity checks for the superblock before mounting the filesystem
    ext4: Add mount option to set kjournald's I/O priority
    jbd2: Submit writes to the journal using WRITE_SYNC
    jbd2: Add pid and journal device name to the "kjournald2 starting" message
    ext4: Add markers for better debuggability
    ext4: Remove code to create the journal inode
    ext4: provide function to release metadata pages under memory pressure
    ext3: provide function to release metadata pages under memory pressure
    add releasepage hooks to block devices which can be used by file systems
    ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc
    ext4: Init the complete page while building buddy cache
    ext4: Don't allow new groups to be added during block allocation
    ext4: mark the blocks/inode bitmap beyond end of group as used
    ext4: Use new buffer_head flag to check uninit group bitmaps initialization
    ext4: Fix the race between read_inode_bitmap() and ext4_new_inode()
    ext4: code cleanup
    ...

    Linus Torvalds
     
  • At the moment there are few restrictions on which flags may be set on
    which inodes. Specifically DIRSYNC may only be set on directories and
    IMMUTABLE and APPEND may not be set on links. Tighten that to disallow
    TOPDIR being set on non-directories and only NODUMP and NOATIME to be set
    on non-regular file, non-directories.

    Introduces a flags masking function which masks flags based on mode and
    use it during inode creation and when flags are set via the ioctl to
    facilitate future consistency.

    Signed-off-by: Duane Griffin
    Acked-by: Andreas Dilger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Duane Griffin
     
  • At present INDEX is the only flag that new ext3 inodes do NOT inherit from
    their parent. In addition prevent the flags DIRTY, ECOMPR, IMAGIC and
    TOPDIR from being inherited. List inheritable flags explicitly to prevent
    future flags from accidentally being inherited.

    This fixes the TOPDIR flag inheritance bug reported at
    http://bugzilla.kernel.org/show_bug.cgi?id=9866.

    Signed-off-by: Duane Griffin
    Acked-by: Andreas Dilger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Duane Griffin
     

29 Oct, 2008

1 commit

  • The original ext3 hash algorithms assumed that variables of type char
    were signed, as God and K&R intended. Unfortunately, this assumption
    is not true on some architectures. Userspace support for marking
    filesystems with non-native signed/unsigned chars was added two years
    ago, but the kernel-side support was never added (until now).

    Signed-off-by: "Theodore Ts'o"
    Cc: akpm@linux-foundation.org
    Cc: linux-kernel@vger.kernel.org

    Theodore Ts'o
     

20 Oct, 2008

1 commit

  • If the journal doesn't abort when it gets an IO error in file data blocks,
    the file data corruption will spread silently. Because most of
    applications and commands do buffered writes without fsync(), they don't
    notice the IO error. It's scary for mission critical systems. On the
    other hand, if the journal aborts whenever it gets an IO error in file
    data blocks, the system will easily become inoperable. So this patch
    introduces a filesystem option to determine whether it aborts the journal
    or just call printk() when it gets an IO error in file data.

    If you mount a ext3 fs with data_err=abort option, it aborts on file data
    write error. If you mount it with data_err=ignore, it doesn't abort, just
    call printk(). data_err=ignore is the default.

    Signed-off-by: Hidehiro Kawai
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     

17 Oct, 2008

1 commit


04 Oct, 2008

1 commit

  • Any block based fs (this patch includes ext3) just has to declare its own
    fiemap() function and then call this generic function with its own
    get_block_t. This works well for block based filesystems that will map
    multiple contiguous blocks at one time, but will work for filesystems that
    only map one block at a time, you will just end up with an "extent" for each
    block. One gotcha is this will not play nicely where there is hole+data
    after the EOF. This function will assume its hit the end of the data as soon
    as it hits a hole after the EOF, so if there is any data past that it will
    not pick that up. AFAIK no block based fs does this anyway, but its in the
    comments of the function anyway just in case.

    Signed-off-by: Josef Bacik
    Signed-off-by: Mark Fasheh
    Signed-off-by: "Theodore Ts'o"
    Cc: linux-fsdevel@vger.kernel.org

    Josef Bacik
     

26 Jul, 2008

1 commit

  • If the orphan node list includes valid, untruncatable nodes with nlink > 0
    the ext3_orphan_cleanup loop which attempts to delete them will not do so,
    causing it to loop forever. Fix by checking for such nodes in the
    ext3_orphan_get function.

    This patch fixes the second case (image hdb.20000009.softlockup.gz)
    reported in http://bugzilla.kernel.org/show_bug.cgi?id=10882.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: printk warning fix]
    Signed-off-by: Duane Griffin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Duane Griffin
     

08 Feb, 2008

1 commit

  • Stop the EXT3 filesystem from using iget() and read_inode(). Replace
    ext3_read_inode() with ext3_iget(), and call that instead of iget().
    ext3_iget() then uses iget_locked() directly and returns a proper error code
    instead of an inode in the event of an error.

    ext3_fill_super() returns any error incurred when getting the root inode
    instead of EINVAL.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: David Howells
    Acked-by: "Theodore Ts'o"
    Acked-by: Jan Kara
    Cc:
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

15 Nov, 2007

1 commit

  • With 64KB blocksize, a directory entry can have size 64KB which does not
    fit into 16 bits we have for entry lenght. So we store 0xffff instead and
    convert value when read from / written to disk. The patch also converts
    some places to use ext3_next_entry() when we are changing them anyway.

    [akpm@linux-foundation.org: coding-style cleanups]
    Signed-off-by: Jan Kara
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     

19 Oct, 2007

1 commit