1. 28 May, 2013 13 commits
    • Paul Taysom's avatar
      ext4: suppress ext4 orphan messages on mount · 566370a2
      Paul Taysom authored
      Suppress the messages releating to processing the ext4 orphan list
      ("truncating inode" and "deleting unreferenced inode") unless the
      debug option is on, since otherwise they end up taking up space in the
      log that could be used for more useful information.
      
      Tested by opening several files, unlinking them, then
      crashing the system, rebooting the system and examining
      /var/log/messages.
      
      Addresses the problem described in http://crbug.com/220976Signed-off-by: default avatarPaul Taysom <taysom@chromium.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      566370a2
    • Darrick J. Wong's avatar
      jbd2: fix block tag checksum verification brokenness · eee06c56
      Darrick J. Wong authored
      Al Viro complained of a ton of bogosity with regards to the jbd2 block
      tag header checksum.  This one checksum is 16 bits, so cut off the
      upper 16 bits and treat it as a 16-bit value and don't mess around
      with be32* conversions.  Fortunately metadata checksumming is still
      "experimental" and not in a shipping e2fsprogs, so there should be few
      users affected by this.
      Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      eee06c56
    • Zheng Liu's avatar
      jbd2: use kmem_cache_zalloc for allocating journal head · 5d9cf9c6
      Zheng Liu authored
      This commit tries to use kmem_cache_zalloc instead of kmem_cache_alloc/
      memset when a new journal head is alloctated.
      Signed-off-by: default avatarZheng Liu <wenqing.lz@taobao.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      5d9cf9c6
    • Lukas Czerner's avatar
      ext4: make punch hole code path work with bigalloc · d23142c6
      Lukas Czerner authored
      Currently punch hole is disabled in file systems with bigalloc
      feature enabled. However the recent changes in punch hole patch should
      make it easier to support punching holes on bigalloc enabled file
      systems.
      
      This commit changes partial_cluster handling in ext4_remove_blocks(),
      ext4_ext_rm_leaf() and ext4_ext_remove_space(). Currently
      partial_cluster is unsigned long long type and it makes sure that we
      will free the partial cluster if all extents has been released from that
      cluster. However it has been specifically designed only for truncate.
      
      With punch hole we can be freeing just some extents in the cluster
      leaving the rest untouched. So we have to make sure that we will notice
      cluster which still has some extents. To do this I've changed
      partial_cluster to be signed long long type. The only scenario where
      this could be a problem is when cluster_size == block size, however in
      that case there would not be any partial clusters so we're safe. For
      bigger clusters the signed type is enough. Now we use the negative value
      in partial_cluster to mark such cluster used, hence we know that we must
      not free it even if all other extents has been freed from such cluster.
      
      This scenario can be described in simple diagram:
      
      |FFF...FF..FF.UUU|
       ^----------^
        punch hole
      
      . - free space
      | - cluster boundary
      F - freed extent
      U - used extent
      
      Also update respective tracepoints to use signed long long type for
      partial_cluster.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      d23142c6
    • Lukas Czerner's avatar
      ext4: update ext4_ext_remove_space trace point · 61801325
      Lukas Czerner authored
      Add "end" variable.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      61801325
    • Lukas Czerner's avatar
      ext4: remove unused code from ext4_remove_blocks() · 78fb9cdf
      Lukas Czerner authored
      The "head removal" branch in the condition is never used in any code
      path in ext4 since the function only caller ext4_ext_rm_leaf() will make
      sure that the extent is properly split before removing blocks. Note that
      there is a bug in this branch anyway.
      
      This commit removes the unused code completely and makes use of
      ext4_error() instead of printk if dubious range is provided.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      78fb9cdf
    • Lukas Czerner's avatar
      ext4: remove unused discard_partial_page_buffers · c121ffd0
      Lukas Czerner authored
      The discard_partial_page_buffers is no longer used anywhere so we can
      simply remove it including the *_no_lock variant and
      EXT4_DISCARD_PARTIAL_PG_ZERO_UNMAPPED define.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      c121ffd0
    • Lukas Czerner's avatar
      ext4: use ext4_zero_partial_blocks in punch_hole · a87dd18c
      Lukas Czerner authored
      We're doing to get rid of ext4_discard_partial_page_buffers() since it is
      duplicating some code and also partially duplicating work of
      truncate_pagecache_range(), moreover the old implementation was much
      clearer.
      
      Now when the truncate_inode_pages_range() can handle truncating non page
      aligned regions we can use this to invalidate and zero out block aligned
      region of the punched out range and then use ext4_block_truncate_page()
      to zero the unaligned blocks on the start and end of the range. This
      will greatly simplify the punch hole code. Moreover after this commit we
      can get rid of the ext4_discard_partial_page_buffers() completely.
      
      We also introduce function ext4_prepare_punch_hole() to do come common
      operations before we attempt to do the actual punch hole on
      indirect or extent file which saves us some code duplication.
      
      This has been tested on ppc64 with 1k block size with fsx and xfstests
      without any problems.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      a87dd18c
    • Lukas Czerner's avatar
      ext4: truncate_inode_pages() in orphan cleanup path · 55f252c9
      Lukas Czerner authored
      Currently we do not tell mm to zero out tail of the page before truncate
      in orphan_cleanup(). This is ok, because the page should not be
      uptodate, however this may eventually change and I might cause problems.
      
      Call truncate_inode_pages() as precautionary measure. Thanks Jan Kara
      for pointing this out.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      55f252c9
    • Lukas Czerner's avatar
      Revert "ext4: fix fsx truncate failure" · eb3544c6
      Lukas Czerner authored
      This reverts commit 189e868f.
      
      This commit reintroduces the use of ext4_block_truncate_page() in ext4
      truncate operation instead of ext4_discard_partial_page_buffers().
      
      The statement in the commit description that the truncate operation only
      zero block unaligned portion of the last page is not exactly right,
      since truncate_pagecache_range() also zeroes and invalidate the unaligned
      portion of the page. Then there is no need to zero and unmap it once more
      and ext4_block_truncate_page() was doing the right job, although we
      still need to update the buffer head containing the last block, which is
      exactly what ext4_block_truncate_page() is doing.
      
      Moreover the problem described in the commit is fixed more properly with
      commit
      
      15291164
      	jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer
      
      This was tested on ppc64 machine with block size of 1024 bytes without
      any problems.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      eb3544c6
    • Lukas Czerner's avatar
      ext4: Call ext4_jbd2_file_inode() after zeroing block · 0713ed0c
      Lukas Czerner authored
      In data=ordered mode we should call ext4_jbd2_file_inode() so that crash
      after the truncate transaction has committed does not expose stall data
      in the tail of the block.
      
      Thanks Jan Kara for pointing that out.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      0713ed0c
    • Lukas Czerner's avatar
      Revert "ext4: remove no longer used functions in inode.c" · d863dc36
      Lukas Czerner authored
      This reverts commit ccb4d7af.
      
      This commit reintroduces functions ext4_block_truncate_page() and
      ext4_block_zero_page_range() which has been previously removed in favour
      of ext4_discard_partial_page_buffers().
      
      In future commits we want to reintroduce those function and remove
      ext4_discard_partial_page_buffers() since it is duplicating some code
      and also partially duplicating work of truncate_pagecache_range(),
      moreover the old implementation was much clearer.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      d863dc36
    • Lukas Czerner's avatar
      mm: teach truncate_inode_pages_range() to handle non page aligned ranges · 5a720394
      Lukas Czerner authored
      This commit changes truncate_inode_pages_range() so it can handle non
      page aligned regions of the truncate. Currently we can hit BUG_ON when
      the end of the range is not page aligned, but we can handle unaligned
      start of the range.
      
      Being able to handle non page aligned regions of the page can help file
      system punch_hole implementations and save some work, because once we're
      holding the page we might as well deal with it right away.
      
      In previous commits we've changed ->invalidatepage() prototype to accept
      'length' argument to be able to specify range to invalidate. No we can
      use that new ability in truncate_inode_pages_range().
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Hugh Dickins <hughd@google.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      5a720394
  2. 22 May, 2013 9 commits
  3. 20 May, 2013 10 commits
  4. 19 May, 2013 3 commits
  5. 18 May, 2013 5 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 130901ba
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Miao Xie has been very busy, fixing races and enospc problems and many
        other small but important pieces.
      
        Alexandre Oliva discovered some problems with how our error handling
        was interacting with the block layer and for now has disabled our
        partial handling of sub-page writes.  The real sub-page work is in a
        series of patches from IBM that we still need to integrate and test.
        The code Alexandre has turned off was really incomplete.
      
        Josef has more error handling fixes and an important fix for the new
        skinny extent format.
      
        This also has my fix for the tracepoint crash from late in 3.9.  It's
        the first stage in a larger clean up to get rid of btrfs_bio and make
        a proper bioset for all the items we need to tack into the bio.  For
        now the bioset only holds our mirror_num and stripe_index, but for the
        next merge window I'll shuffle more in."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
        Btrfs: use a btrfs bioset instead of abusing bio internals
        Btrfs: make sure roots are assigned before freeing their nodes
        Btrfs: explicitly use global_block_rsv for quota_tree
        btrfs: do away with non-whole_page extent I/O
        Btrfs: don't invoke btrfs_invalidate_inodes() in the spin lock context
        Btrfs: remove BUG_ON() in btrfs_read_fs_tree_no_radix()
        Btrfs: pause the space balance when remounting to R/O
        Btrfs: fix unprotected root node of the subvolume's inode rb-tree
        Btrfs: fix accessing a freed tree root
        Btrfs: return errno if possible when we fail to allocate memory
        Btrfs: update the global reserve if it is empty
        Btrfs: don't steal the reserved space from the global reserve if their space type is different
        Btrfs: optimize the error handle of use_block_rsv()
        Btrfs: don't use global block reservation for inode cache truncation
        Btrfs: don't abort the current transaction if there is no enough space for inode cache
        Correct allowed raid levels on balance.
        Btrfs: fix possible memory leak in replace_path()
        Btrfs: fix possible memory leak in the find_parent_nodes()
        Btrfs: don't allow device replace on RAID5/RAID6
        Btrfs: handle running extent ops with skinny metadata
        ...
      130901ba
    • Linus Torvalds's avatar
      Merge branch 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · e5106682
      Linus Torvalds authored
      Pull devm usage cleanup from Wolfram Sang:
       "Lately, I have been experimenting how to improve the devm interface to
        make writing device drivers easier and less error prone while also
        getting rid of its subtle issues.  I think it has more potential but
        still needs work and definately conistency, especiall in its usage.
      
        The first thing I come up with is a low hanging fruit regarding
        devm_ioremap_resouce().  This function already checks if the passed
        resource is valid and gives an error message if not.  So, we can
        remove similar checks from the drivers and get rid of a bit of code
        and a number of inconsistent error strings.
      
        This series only removes the unneeded check iff devm_ioremap_resource
        follows platform_get_resource directly.  The previous version tried to
        shuffle code if needed, too, what lead to an embarrasing bug.  It
        turned out to me that shuffling code for all cases found will make the
        automated script too complex, so I am unsure if an automated cleanup
        is the proper tool for this case.  Removing the easy stuff seems
        worthwhile to me, though.
      
        Despite various architectures and platform dependencies, I managed to
        compile test 45 out of 57 modified files locally using heuristics and
        defconfigs."
      
      Pulled because: 296 deletions, 0 additions.
      
      * 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (33 commits)
        sound/soc/kirkwood: don't check resource with devm_ioremap_resource
        sound/soc/fsl: don't check resource with devm_ioremap_resource
        arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
        arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
        arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
        drivers/watchdog: don't check resource with devm_ioremap_resource
        drivers/w1/masters: don't check resource with devm_ioremap_resource
        drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
        drivers/video/omap2: don't check resource with devm_ioremap_resource
        drivers/usb/phy: don't check resource with devm_ioremap_resource
        drivers/usb/host: don't check resource with devm_ioremap_resource
        drivers/usb/gadget: don't check resource with devm_ioremap_resource
        drivers/usb/chipidea: don't check resource with devm_ioremap_resource
        drivers/thermal: don't check resource with devm_ioremap_resource
        drivers/staging/nvec: don't check resource with devm_ioremap_resource
        drivers/staging/dwc2: don't check resource with devm_ioremap_resource
        drivers/spi: don't check resource with devm_ioremap_resource
        drivers/rtc: don't check resource with devm_ioremap_resource
        drivers/pwm: don't check resource with devm_ioremap_resource
        drivers/pinctrl: don't check resource with devm_ioremap_resource
        ...
      e5106682
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux · ff9129b0
      Linus Torvalds authored
      Pull device tree fixes from Grant Likely:
       "Device tree bug fixes and documentation updates for v3.10
      
        Nothing earth shattering here.  A build failure fix, and fix for
        releasing nodes and some documenation updates."
      
      * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
        Documentation/devicetree: make semantic of initrd-end more explicit
        of/base: release the node correctly in of_parse_phandle_with_args()
        of/documentation: move video device bindings to a common place
        <linux/of_platform.h>: fix compilation warnings with DT disabled
      ff9129b0
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 3c6a279f
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Patching up across the field.  The reversion of the two ASID patches
        is particularly important as it was breaking many platforms."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: ralink: use the dwc2 driver for the rt305x USB controller
        MIPS: Extract schedule_mfi info from __schedule
        MIPS: Fix sibling call handling in get_frame_info
        MIPS: MSP71xx: remove inline marking of EXPORT_SYMBOL functions
        MIPS: Make virt_to_phys() work for all unmapped addresses.
        MIPS: Fix build error for crash_dump.c in 3.10-rc1
        MIPS: Xway: Fix clk leak
        Revert "MIPS: Allow ASID size to be determined at boot time."
        Revert "MIPS: microMIPS: Support dynamic ASID sizing."
      3c6a279f
    • Linus Torvalds's avatar
      Merge tag 'kmemleak-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 8f05bde9
      Linus Torvalds authored
      Pull kmemleak patches from Catalin Marinas:
       "Kmemleak now scans all the writable and non-executable module sections
        to avoid false positives (previously it was only scanning specific
        sections and missing .ref.data)."
      
      * tag 'kmemleak-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        kmemleak: No need for scanning specific module sections
        kmemleak: Scan all allocated, writeable and not executable module sections
      8f05bde9