24 Mar, 2012

1 commit

  • Pull UBIFS changes from Artem Bityutskiy:
    - Improve error messages
    - Clean-up i_nlink management
    - Minor clean-ups

    * tag 'upstream-3.4-rc1' of git://git.infradead.org/linux-ubifs:
    UBIFS: improve error messages
    UBIFS: kill CUR_MAX_KEY_LEN macro
    UBIFS: do not use inc_link when i_nlink is zero
    UBIFS: make the dbg_lock spinlock static
    UBIFS: increase dumps loglevel
    UBIFS: amend recovery debugging message

    Linus Torvalds
     

22 Mar, 2012

1 commit

  • Pull vfs pile 1 from Al Viro:
    "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
    yet."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
    ext4: initialization of ext4_li_mtx needs to be done earlier
    debugfs-related mode_t whack-a-mole
    hfsplus: add an ioctl to bless files
    hfsplus: change finder_info to u32
    hfsplus: initialise userflags
    qnx4: new helper - try_extent()
    qnx4: get rid of qnx4_bread/qnx4_getblk
    take removal of PF_FORKNOEXEC to flush_old_exec()
    trim includes in inode.c
    um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it
    um: embed ->stub_pages[] into mmu_context
    gadgetfs: list_for_each_safe() misuse
    ocfs2: fix leaks on failure exits in module_init
    ecryptfs: make register_filesystem() the last potential failure exit
    ntfs: forgets to unregister sysctls on register_filesystem() failure
    logfs: missing cleanup on register_filesystem() failure
    jfs: mising cleanup on register_filesystem() failure
    make configfs_pin_fs() return root dentry on success
    configfs: configfs_create_dir() has parent dentry in dentry->d_parent
    configfs: sanitize configfs_create()
    ...

    Linus Torvalds
     

21 Mar, 2012

1 commit


20 Mar, 2012

1 commit


07 Mar, 2012

1 commit

  • Ricard complaints that the following error message is odd:

    "UBIFS error (pid 1578): validate_sb: bad superblock, error 8"

    and he is right. This patch improves the error messages a bit and makes
    them more user-friendly.

    Reported-by: Ricard Wanderlof
    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

01 Mar, 2012

1 commit


29 Feb, 2012

4 commits

  • This patch changes the 'i_nlink' counter handling in 'ubifs_unlink()',
    'ubifs_rmdir()' and 'ubifs_rename()'. In these function 'i_nlink' may become 0,
    and if 'ubifs_jnl_update()' failed, we would use 'inc_nlink()' to restore
    the previous 'i_nlink' value, which is incorrect from the VFS point of view and
    would cause a 'WARN_ON()' (see 'inc_nlink() implementation).

    This patches saves the previous 'i_nlink' value in a local variable and uses it
    at the error path instead of calling 'inc_nlink()'. We do this only for the
    inodes where 'i_nlink' may potentially become zero.

    This change has been requested by Al Viro .

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Remove the usage of the 'dbg_lock' spinlock from 'dbg_err()' and make
    it static.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Most of the time we use the dumping function to dump something in case
    of error. We use 'KERN_DEBUG' printk level, and the drawback is that users
    do not see them in the console, while they see the other error messages
    in the console. The result is that they send bug reports which does not
    contain a lot of useful information. This patch changes the printk level
    of the dump functions to 'KERN_ERR' to correct the situation.

    I documented it in the MTD web site that people have to send the 'dmesg' output
    when submitting bug reposts - it did not help.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Print LEB and offset as well.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

15 Jan, 2012

1 commit

  • Fix a brown paperbag bug introduced by me in the previous commit. I was
    in hurry and forgot about the non-debug case completely.

    Artem: amend the commit message and tweak the patch to preserve alignment.
    This made the patch a bit less readable, though.

    Signed-off-by: Artem Bityutskiy

    Dominique Martinet
     

14 Jan, 2012

1 commit


13 Jan, 2012

2 commits

  • Before commit 56e46742e846e4de167dde0e1e1071ace1c882a5 we have had locking
    around all printing macros and we could use static buffers for creating
    key strings and printing them. However, now we do not have that locking and
    we cannot use static buffers. This commit removes the old DBGKEY() macros
    and introduces few new helper macros for printing debugging messages plus
    a key at the end. Thankfully, all the messages are already structures in
    a way that the key is printed in the end.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Switch to 'snprintf()' which is more secure and reliable. This is also a
    preparation to the subsequent key printing fixes.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

12 Jan, 2012

2 commits

  • Patch 56e46742e846e4de167dde0e1e1071ace1c882a5 broke UBIFS debugging messages:
    before that commit when UBIFS debugging was enabled, users saw few useful
    debugging messages after mount. However, that patch turned 'dbg_msg()' into
    'pr_debug()', so to enable the debugging messages users have to enable them
    first via /sys/kernel/debug/dynamic_debug/control, which is very impractical.

    This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just
    as it was before the breakage.

    Signed-off-by: Artem Bityutskiy
    Cc: stable@kernel.org [3.0+]

    Artem Bityutskiy
     
  • We switch to dynamic debugging in commit
    56e46742e846e4de167dde0e1e1071ace1c882a5 but did not take into account that
    now we do not control anymore whether a specific message is enabled or not.
    So now we lock the "dbg_lock" and release it in every debugging macro, which
    make them not so light-weight.

    This commit removes the "dbg_lock" protection from the debugging macros to
    fix the issue.

    The downside is that now our DBGKEY() stuff is broken, but this is not
    critical at all and will be fixed later.

    Signed-off-by: Artem Bityutskiy
    Cc: stable@kernel.org [3.0+]

    Artem Bityutskiy
     

11 Jan, 2012

1 commit


07 Jan, 2012

1 commit


04 Jan, 2012

7 commits


14 Dec, 2011

1 commit


22 Nov, 2011

1 commit


08 Nov, 2011

1 commit


07 Nov, 2011

1 commit

  • * 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: Add a 'reason' to wb_writeback_work
    writeback: send work item to queue_io, move_expired_inodes
    writeback: trace event balance_dirty_pages
    writeback: trace event bdi_dirty_ratelimit
    writeback: fix ppc compile warnings on do_div(long long, unsigned long)
    writeback: per-bdi background threshold
    writeback: dirty position control - bdi reserve area
    writeback: control dirty pause time
    writeback: limit max dirty pause time
    writeback: IO-less balance_dirty_pages()
    writeback: per task dirty rate limit
    writeback: stabilize bdi->dirty_ratelimit
    writeback: dirty rate control
    writeback: add bg_threshold parameter to __bdi_update_bandwidth()
    writeback: dirty position control
    writeback: account per-bdi accumulated dirtied pages

    Linus Torvalds
     

02 Nov, 2011

2 commits


31 Oct, 2011

1 commit

  • This creates a new 'reason' field in a wb_writeback_work
    structure, which unambiguously identifies who initiates
    writeback activity. A 'wb_reason' enumeration has been
    added to writeback.h, to enumerate the possible reasons.

    The 'writeback_work_class' and tracepoint event class and
    'writeback_queue_io' tracepoints are updated to include the
    symbolic 'reason' in all trace events.

    And the 'writeback_inodes_sbXXX' family of routines has had
    a wb_stats parameter added to them, so callers can specify
    why writeback is being started.

    Acked-by: Jan Kara
    Signed-off-by: Curt Wohlgemuth
    Signed-off-by: Wu Fengguang

    Curt Wohlgemuth
     

26 Aug, 2011

1 commit


22 Aug, 2011

1 commit


19 Aug, 2011

1 commit

  • With
    $ grep -e UBIFS_FS_DEBUG -e DYNAMIC_DEBUG .config
    # CONFIG_UBIFS_FS_DEBUG is not set
    CONFIG_DYNAMIC_DEBUG=y

    Debug messages are kept in the object files due to the
    dynamic_pr_debug() macro, even if they are never going to be printed:
    $ make fs/ubifs/super.o
    $ strings fs/ubifs/super.o | grep 'compiled on'
    compiled on: Aug 11 2011 at 12:21:38

    Use plain printk to fix this.

    Signed-off-by: Michal Marek
    Signed-off-by: Artem Bityutskiy

    Michal Marek
     

23 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits)
    vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp
    isofs: Remove global fs lock
    jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory
    fix IN_DELETE_SELF on overwriting rename() on ramfs et.al.
    mm/truncate.c: fix build for CONFIG_BLOCK not enabled
    fs:update the NOTE of the file_operations structure
    Remove dead code in dget_parent()
    AFS: Fix silly characters in a comment
    switch d_add_ci() to d_splice_alias() in "found negative" case as well
    simplify gfs2_lookup()
    jfs_lookup(): don't bother with . or ..
    get rid of useless dget_parent() in btrfs rename() and link()
    get rid of useless dget_parent() in fs/btrfs/ioctl.c
    fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
    drivers: fix up various ->llseek() implementations
    fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek
    Ext4: handle SEEK_HOLE/SEEK_DATA generically
    Btrfs: implement our own ->llseek
    fs: add SEEK_HOLE and SEEK_DATA flags
    reiserfs: make reiserfs default to barrier=flush
    ...

    Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new
    shrinker callout for the inode cache, that clashed with the xfs code to
    start the periodic workers later.

    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
     

08 Jul, 2011

1 commit

  • When the 1st LEB was unmapped and written but 2nd LEB not,
    the master node recovery doesn't succeed after power cut.
    We see following error when mounting UBIFS partition on NOR
    flash:

    UBIFS error (pid 1137): ubifs_recover_master_node: failed to recover master node

    Correct 2nd master node offset check is needed to fix the
    problem. If the 2nd master node is at the end in the 2nd LEB,
    first master node is used for recovery. When checking for this
    condition we should check whether the master node is exactly at
    the end of the LEB (without remaining empty space) or whether
    it is followed by an empty space less than the master node size.

    Artem: when the error happened, offs2 = 261120, sz = 512, c->leb_size = 262016.

    Signed-off-by: Anatolij Gustschin
    Signed-off-by: Artem Bityutskiy

    Anatolij Gustschin
     

04 Jul, 2011

2 commits

  • This patch cleans-up and improves the power cut testing:

    1. Kill custom 'simple_random()' function and use 'random32()' instead.
    2. Make timeout larger
    3. When cutting the buffer - fill the end with random data sometimes, not
    only with 0xFFs.
    4. Some times cut in the middle of the buffer, not always at the end.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Since the recovery testing is effectively about emulating power cuts by UBIFS,
    use "power cut" as the base term for all the related variables and name them
    correspondingly. This is just a minor clean-up for the sake of readability.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy