1. 22 Nov, 2012 1 commit
    • NeilBrown's avatar
      md/raid10: close race that lose writes lost when replacement completes. · e7c0c3fa
      NeilBrown authored
      When a replacement operation completes there is a small window
      when the original device is marked 'faulty' and the replacement
      still looks like a replacement.  The faulty should be removed and
      the replacement moved in place very quickly, bit it isn't instant.
      
      So the code write out to the array must handle the possibility that
      the only working device for some slot in the replacement - but it
      doesn't.  If the primary device is faulty it just gives up.  This
      can lead to corruption.
      
      So make the code more robust: if either  the primary or the
      replacement is present and working, write to them.  Only when
      neither are present do we give up.
      
      This bug has been present since replacement was introduced in
      3.3, so it is suitable for any -stable kernel since then.
      Reported-by: default avatar"George Spelvin" <linux@horizon.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      e7c0c3fa
  2. 21 Nov, 2012 2 commits
    • NeilBrown's avatar
      md/raid5: Make sure we clear R5_Discard when discard is finished. · ca64cae9
      NeilBrown authored
      commit 9e444768
          MD: raid5 avoid unnecessary zero page for trim
      
      change raid5 to clear R5_Discard when the complete request is
      handled rather than when submitting the per-device discard request.
      However it did not clear R5_Discard for the parity device.
      
      This means that if the stripe_head was reused before it expired from
      the cache, the setting would be wrong and a hang would result.
      
      Also if the R5_Uptodate bit happens to be set, R5_Discard again
      won't be cleared.  But R5_Uptodate really should be clear at this point.
      
      So make sure R5_Discard is cleared in all cases, and clear
      R5_Uptodate when a 'discard' completes.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      ca64cae9
    • NeilBrown's avatar
      md/raid5: move resolving of reconstruct_state earlier in · ef5b7c69
      NeilBrown authored
      stripe_handle.
      
      The chunk of code in stripe_handle which responds to a
      *_result value in reconstruct_state is really the completion
      of some processing that happened outside of handle_stripe
      (possibly asynchronously) and so should be one of the first
      things done in handle_stripe().
      
      After the next patch it will be important that it happens before
      handle_stripe_clean_event(), as that will clear some dev->flags
      bit that this code tests.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      ef5b7c69
  3. 20 Nov, 2012 1 commit
  4. 19 Nov, 2012 3 commits
  5. 31 Oct, 2012 2 commits
    • Jonathan Brassow's avatar
      MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c · ed30be07
      Jonathan Brassow authored
      Commit 2863b9eb didn't take into account the changes to add TRIM support to
      RAID10 (commit 532a2a3f).  That is, when using dm-raid.c to create the
      RAID10 arrays, there is no mddev->gendisk or mddev->queue.  The code added
      to support TRIM simply assumes that mddev->queue is available without
      checking.  The result is an oops any time dm-raid.c attempts to create a
      RAID10 device.
      Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      ed30be07
    • NeilBrown's avatar
      md/raid1: Fix assembling of arrays containing Replacements. · 02b898f2
      NeilBrown authored
      setup_conf in raid1.c uses conf->raid_disks before assigning
      a value.  It is used when including 'Replacement' devices.
      
      The consequence is that assembling an array which contains a
      replacement will misbehave and either not include the replacement, or
      not include the device being replaced.
      
      Though this doesn't lead directly to data corruption, it could lead to
      reduced data safety.
      
      So use mddev->raid_disks, which is initialised, instead.
      
      Bug was introduced by commit c19d5798
            md/raid1: recognise replacements when assembling arrays.
      
      in 3.3, so fix is suitable for 3.3.y thru 3.6.y.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      02b898f2
  6. 21 Oct, 2012 1 commit
    • Eric Sandeen's avatar
      md faulty: use disk_stack_limits() · 0be1fecd
      Eric Sandeen authored
      in:
      fe86cdce block: do not artificially constrain max_sectors for stacking drivers
      
      max_sectors defaults to UINT_MAX.  md faulty wasn't using
      disk_stack_limits(), so inherited this large value as well.
      This triggered a bug in XFS when stressed over md_faulty, when
      a very large bio_alloc() failed.
      
      That was on an older kernel, and I can't reproduce exactly the
      same thing upstream, but I think the fix is appropriate in any
      case.
      
      Thanks to Mike Snitzer for pointing out the problem.
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      0be1fecd
  7. 15 Oct, 2012 1 commit
  8. 14 Oct, 2012 6 commits
    • Linus Torvalds's avatar
      Linux 3.7-rc1 · ddffeb8c
      Linus Torvalds authored
      ddffeb8c
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · a5ef3f7d
      Linus Torvalds authored
      Pull MIPS update from Ralf Baechle:
       "Cleanups and fixes for breakage that occured earlier during this merge
        phase.  Also a few patches that didn't make the first pull request.
        Of those is the Alchemy work that merges code for many of the SOCs and
        evaluation boards thus among other code shrinkage, reduces the number
        of MIPS defconfigs by 5."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (22 commits)
        MIPS: SNI: Switch RM400 serial to SCCNXP driver
        MIPS: Remove unused empty_bad_pmd_table[] declaration.
        MIPS: MT: Remove kspd.
        MIPS: Malta: Fix section mismatch.
        MIPS: asm-offset.c: Delete unused irq_cpustat_t struct offsets.
        MIPS: Alchemy: Merge PB1100/1500 support into DB1000 code.
        MIPS: Alchemy: merge PB1550 support into DB1550 code
        MIPS: Alchemy: Single kernel for DB1200/1300/1550
        MIPS: Optimize TLB refill for RI/XI configurations.
        MIPS: proc: Cleanup printing of ASEs.
        MIPS: Hardwire detection of DSP ASE Rev 2 for systems, as required.
        MIPS: Add detection of DSP ASE Revision 2.
        MIPS: Optimize pgd_init and pmd_init
        MIPS: perf: Add perf functionality for BMIPS5000
        MIPS: perf: Split the Kconfig option CONFIG_MIPS_MT_SMP
        MIPS: perf: Remove unnecessary #ifdef
        MIPS: perf: Add cpu feature bit for PCI (performance counter interrupt)
        MIPS: perf: Change the "mips_perf_event" table unsupported indicator.
        MIPS: Align swapper_pg_dir to 64K for better TLB Refill code.
        vmlinux.lds.h: Allow architectures to add sections to the front of .bss
        ...
      a5ef3f7d
    • Linus Torvalds's avatar
      Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · d25282d1
      Linus Torvalds authored
      Pull module signing support from Rusty Russell:
       "module signing is the highlight, but it's an all-over David Howells frenzy..."
      
      Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG.
      
      * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits)
        X.509: Fix indefinite length element skip error handling
        X.509: Convert some printk calls to pr_devel
        asymmetric keys: fix printk format warning
        MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
        MODSIGN: Make mrproper should remove generated files.
        MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
        MODSIGN: Use the same digest for the autogen key sig as for the module sig
        MODSIGN: Sign modules during the build process
        MODSIGN: Provide a script for generating a key ID from an X.509 cert
        MODSIGN: Implement module signature checking
        MODSIGN: Provide module signing public keys to the kernel
        MODSIGN: Automatically generate module signing keys if missing
        MODSIGN: Provide Kconfig options
        MODSIGN: Provide gitignore and make clean rules for extra files
        MODSIGN: Add FIPS policy
        module: signature checking hook
        X.509: Add a crypto key parser for binary (DER) X.509 certificates
        MPILIB: Provide a function to read raw data into an MPI
        X.509: Add an ASN.1 decoder
        X.509: Add simple ASN.1 grammar compiler
        ...
      d25282d1
    • Matt Fleming's avatar
      x86, boot: Explicitly include autoconf.h for hostprogs · b6eea87f
      Matt Fleming authored
      The hostprogs need access to the CONFIG_* symbols found in
      include/generated/autoconf.h.  But commit abbf1590 ("UAPI: Partition
      the header include path sets and add uapi/ header directories") replaced
      $(LINUXINCLUDE) with $(USERINCLUDE) which doesn't contain the necessary
      include paths.
      
      This has the undesirable effect of breaking the EFI boot stub because
      the #ifdef CONFIG_EFI_STUB code in arch/x86/boot/tools/build.c is
      never compiled.
      
      It should also be noted that because $(USERINCLUDE) isn't exported by
      the top-level Makefile it's actually empty in arch/x86/boot/Makefile.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6eea87f
    • Ingo Molnar's avatar
      perf: Fix UAPI fallout · 7d380c8f
      Ingo Molnar authored
      The UAPI commits forgot to test tooling builds such as tools/perf/,
      and this fixes the fallout.
      
      Manual conversion.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d380c8f
    • Linus Torvalds's avatar
      Merge branch 'late-for-linus' of git://git.linaro.org/people/rmk/linux-arm · 3d6ee36d
      Linus Torvalds authored
      Pull ARM update from Russell King:
       "This is the final round of stuff for ARM, left until the end of the
        merge window to reduce the number of conflicts.  This set contains the
        ARM part of David Howells UAPI changes, and a fix to the ordering of
        'select' statements in ARM Kconfig files (see the appropriate commit
        for why this happened - thanks to Andrew Morton for pointing out the
        problem.)
      
        I've left this as long as I dare for this window to avoid conflicts,
        and I regenerated the config patch yesterday, posting it to our
        mailing list for review and testing.  I have several acks which
        include successful test reports for it.
      
        However, today I notice we've got new conflicts with previously unseen
        code...  though that conflict should be trivial (it's my changes vs a
        one liner.)"
      
      * 'late-for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: config: make sure that platforms are ordered by option string
        ARM: config: sort select statements alphanumerically
        UAPI: (Scripted) Disintegrate arch/arm/include/asm
      
      Fix up fairly conflict in arch/arm/Kconfig (the select re-organization
      vs recent addition of GENERIC_KERNEL_EXECVE)
      3d6ee36d
  9. 13 Oct, 2012 23 commits