28 Sep, 2009

1 commit


22 Sep, 2009

1 commit


21 Sep, 2009

1 commit


17 Sep, 2009

1 commit


16 Sep, 2009

2 commits

  • bdi_start_writeback() is currently split into two paths, one for
    WB_SYNC_NONE and one for WB_SYNC_ALL. Add bdi_sync_writeback()
    for WB_SYNC_ALL writeback and let bdi_start_writeback() handle
    only WB_SYNC_NONE.

    Push down the writeback_control allocation and only accept the
    parameters that make sense for each function. This cleans up
    the API considerably.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • We do this automatically in get_sb_bdev() from the set_bdev_super()
    callback. Filesystems that have their own private backing_dev_info
    must assign that in ->fill_super().

    Note that ->s_bdi assignment is required for proper writeback!

    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe
     

15 Sep, 2009

4 commits


11 Sep, 2009

2 commits


10 Sep, 2009

4 commits

  • This patch amends and nicifies commentaries in file.c, as well as
    fixes some spelling problems.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • The 'ubifs_scan()' function returns -EUCLEAN if something is corrupted
    and recovery is needed, otherwise it returns other error codes. However,
    in few places UBIFS does not check the error codes and runs recovery.
    This patch changes this behavior and makes UBIFS start recovery only
    on -EUCLEAN errors.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • At the moment UBIFS print large and scary error messages and
    flash dumps in case of nearly any corruption, even if it is
    a recoverable corruption. For example, if the master node is
    corrupted, ubifs_scan() prints error dumps, then UBIFS recovers
    just fine and goes on.

    This patch makes UBIFS print scary error messages only in
    real cases, which are not recoverable. It adds 'quiet' argument
    to the 'ubifs_scan()' function, so the caller may ask 'ubi_scan()'
    not to print error messages if the caller is able to do recovery.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • Add one more check to UBIFS - a check that makes sure that there
    are no data nodes beyond inode size. And few commantaries fixes
    along the line.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     

22 Aug, 2009

1 commit


24 Jul, 2009

4 commits

  • Nowadays VFS always synchronizes all dirty inodes and pages before
    calling '->sync_fs()', so remove unneeded 'generic_sync_sb_inodes()'
    from 'ubifs_sync_fs()'. It used to be needed, but not any longer.

    Pointed-out-by: Christoph Hellwig
    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • The BKL was pushed down from VFS to the file-systems. It used
    to serialize mount/unmount/remount and prevented more than one
    instance of the same file-system from doing
    mount/umount/remount at the same time. But it is OK for UBIFS
    and it does not need any additional locking for these cases.
    Thus, kick the BKL out of UBIFS.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Remove 'xent_key_init_hash()' and 'data_key_init_flash()' functions,
    as they are unot used anywhere.

    Signed-off-by: Subrata Modak
    Signed-off-by: Artem Bityutskiy

    Subrata Modak
     
  • Fix "using uninitialized variable" compilation warning by using
    the "unititialized_var()" helper.

    Signed-off-by: Subrata Modak
    Signed-off-by: Artem Bityutskiy

    Subrata Modak
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

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

    Alexey Dobriyan
     

09 Jul, 2009

4 commits

  • In the 'ubifs_recover_leb()' function, when we find corrupted
    empty space, we dump 8K starting from the offset where the last
    node ends. This is OK if the corrupted empty space is somewhere
    near that offset. But if the corruption is far at the end of the
    LEB, we will dump all 0xFF bytes and complitely ignore the
    interesting data. This is observed on a PPC ("kilauea") with
    NOR flash.

    This patch changes the behavior and teaches UBIFS to print only
    interesting data. I.e., now we find where corruption starts and
    start dumping from that offset.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • recovery.c has 'is_empty()' helper and it is better to use
    this helper instead of re-implementing it in several places.
    This patch does this and removes some amount of unneeded code.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • This patch fixes few minor things I've spotted while going through
    code:

    1. Better document return codes
    2. If 'ubifs_scan_a_node()' returns some thing we do not expect,
    treat this as an error.
    3. Try to do recovery only when 'ubifs_scan()' returns %-EUCLEAN,
    not on any error.
    4. If empty space starts at a non-aligned address, print a message.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • In case of corruptions, dump 8192 bytes instead of 4096. The
    largest node is 4096+ bytes, so it is better to see a node
    boundary, which is not always possible when only 4096 bytes
    are printed.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     

05 Jul, 2009

9 commits

  • UBIFS uses a bdi device per volume, but does not care to hand out unique
    names to each of them. This causes an error when trying to mount more
    than one volumes. Append the UBI volume and device ID to avoid that.

    [Amended a bit by Artem Bityutskiy]

    Signed-off-by: Daniel Mack
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: linux-mtd@lists.infradead.org
    Signed-off-by: Artem Bityutskiy

    Daniel Mack
     
  • When debugging is enabled and an unclean file-system is mounter,
    the following assertion is triggered:

    UBIFS assert failed in ubifs_tnc_start_commit at 805 (pid 1081)
    Call Trace:
    [cfaffbd0] [c0006cf8] show_stack+0x44/0x16c (unreliable)
    [cfaffc10] [c011b738] ubifs_tnc_start_commit+0xbb8/0xd18
    [cfaffc90] [c0112670] do_commit+0x150/0xa44
    [cfaffd10] [c0125234] ubifs_rcvry_gc_commit+0xd8/0x544
    [cfaffd60] [c0100e9c] ubifs_fill_super+0xe78/0x15f8
    [cfaffdf0] [c0102118] ubifs_get_sb+0x20c/0x320
    [cfaffe70] [c007f764] vfs_kern_mount+0x58/0xe0
    [cfaffe90] [c007f83c] do_kern_mount+0x40/0xf8
    [cfaffeb0] [c0095c24] do_mount+0x550/0x758
    [cfafff10] [c0095ebc] sys_mount+0x90/0xe0
    [cfafff40] [c000ed4c] ret_from_syscall+0x0/0x3c

    The reason is that we initialize 'c->min_leb_idx' early, and do
    not re-calculate it after journal replay.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Signed-off-by: Adrian Hunter

    Adrian Hunter
     
  • Signed-off-by: Adrian Hunter

    Adrian Hunter
     
  • Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • This patch cleans up write-buffer timeout initialization and
    sets it to 3-5 interval.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • This patch adds the following minor optimization:

    1. If write-buffer does not use the timer, indicate it with the
    wbuf->no_timer variable, instead of using the wbuf->softlimit
    variable. This is better because wbuf->softlimit is of ktime_t
    type, and the ktime_to_ns function contains 64-bit multiplication.

    2. Do not call the 'hrtimer_cancel()' function for write-buffers
    which do not use timers.

    3. Do not cancel the timer in 'ubifs_put_super()' because the
    synchronization function does this.

    This patch also removes a confusing comment.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • 1. Make the I/O debugging message print the journal head number.
    2. Add prints to timer functions.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • Fix the following warning:

    fs/ubifs/io.c: In function 'ubifs_wbuf_init':
    fs/ubifs/io.c:860: warning: integer overflow in expression

    And limit maximum hrtimer delta to ULONG_MAX because the
    argument is 'unsigned long'.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Artem Bityutskiy

    Adrian Hunter
     

24 Jun, 2009

1 commit


18 Jun, 2009

1 commit

  • * 'linux-next' of git://git.infradead.org/ubifs-2.6:
    UBIFS: start using hrtimers
    hrtimer: export ktime_add_safe
    UBIFS: do not forget to register BDI device
    UBIFS: allow sync option in rootflags
    UBIFS: remove dead code
    UBIFS: use anonymous device
    UBIFS: return proper error code if the compr is not present
    UBIFS: return error if link and unlink race
    UBIFS: reset no_space flag after inode deletion

    Linus Torvalds
     

16 Jun, 2009

1 commit


12 Jun, 2009

2 commits

  • [xfs, btrfs, capifs, shmem don't need BKL, exempt]

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Al Viro

    Alessio Igor Bogani
     
  • Move BKL into ->put_super from the only caller. A couple of
    filesystems had trivial enough ->put_super (only kfree and NULLing of
    s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
    hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most
    of them probably don't need it, but I'd rather sort that out individually.
    Preferably after all the other BKL pushdowns in that area.

    [AV: original used to move lock_super() down as well; these changes are
    removed since we don't do lock_super() at all in generic_shutdown_super()
    now]
    [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

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

    Christoph Hellwig