1. 17 Sep, 2012 1 commit
    • Daniel Lezcano's avatar
      cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure · 3d339dcb
      Daniel Lezcano authored
      Currently we have the cpuidle_device field in the acpi_processor_power structure.
      This adds a dependency between processor.h and cpuidle.h
      
      Although it is not a real problem, removing this dependency has the benefit of
      separating a bit more the cpuidle code from the rest of the acpi code.
      Also, the compilation should be a bit improved because we do no longer
      include cpuidle.h in processor.h. The preprocessor was generating 30418 loc
      and with this patch it generates 30256 loc for processor_thermal.c, a file
      which is not concerned at all by cpuidle, like processor_perflib.c and
      processor_throttling.c.
      
      That may sound ridiculous, but "small streams make big rivers" :P
      
      This patch moves this field into a static global per cpu variable like what is
      done in the intel_idle driver.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      3d339dcb
  2. 15 Sep, 2012 2 commits
  3. 05 Sep, 2012 1 commit
  4. 03 Sep, 2012 2 commits
    • Rafael J. Wysocki's avatar
      PM / cpuidle: Make ladder governor use the "disabled" state flag · 66804c13
      Rafael J. Wysocki authored
      For the mechanism introduced by commit cbc9ef02 (PM / Domains: Add
      preliminary support for cpuidle, v2) to work with the ladder
      governor, that governor should respect the "disabled" state flag
      added by that commit.  Change the ladder governor accordingly.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      66804c13
    • Carsten Emde's avatar
      Honor state disabling in the cpuidle ladder governor · 62d6ae88
      Carsten Emde authored
      There are two cpuidle governors ladder and menu. While the ladder
      governor is always available, if CONFIG_CPU_IDLE is selected, the
      menu governor additionally requires CONFIG_NO_HZ.
      
      A particular C state can be disabled by writing to the sysfs file
      /sys/devices/system/cpu/cpuN/cpuidle/stateN/disable, but this mechanism
      is only implemented in the menu governor. Thus, in a system where
      CONFIG_NO_HZ is not selected, the ladder governor becomes default and
      always will walk through all sleep states - irrespective of whether the
      C state was disabled via sysfs or not. The only way to select a specific
      C state was to write the related latency to /dev/cpu_dma_latency and
      keep the file open as long as this setting was required - not very
      practical and not suitable for setting a single core in an SMP system.
      
      With this patch, the ladder governor only will promote to the next
      C state, if it has not been disabled, and it will demote, if the
      current C state was disabled.
      
      Note that the patch does not make the setting of the sysfs variable
      "disable" coherent, i.e. if one is disabling a light state, then all
      deeper states are disabled as well, but the "disable" variable does not
      reflect it. Likewise, if one enables a deep state but a lighter state
      still is disabled, then this has no effect. A related section has been
      added to the documentation.
      Signed-off-by: default avatarCarsten Emde <C.Emde@osadl.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      62d6ae88
  5. 01 Sep, 2012 5 commits
  6. 30 Aug, 2012 5 commits
  7. 29 Aug, 2012 18 commits
  8. 28 Aug, 2012 6 commits
    • Stefan Behrens's avatar
      Btrfs: fix that repair code is spuriously executed for transid failures · 256dd1bb
      Stefan Behrens authored
      If verify_parent_transid() fails for all mirrors, the current code
      calls repair_io_failure() anyway which means:
      - that the disk block is rewritten without repairing anything and
      - that a kernel log message is printed which misleadingly claims
        that a read error was corrected.
      
      This is an example:
      parent transid verify failed on 615015833600 wanted 110423 found 110424
      parent transid verify failed on 615015833600 wanted 110423 found 110424
      btrfs read error corrected: ino 1 off 615015833600 (dev /dev/...)
      
      It is wrong to ignore the results from verify_parent_transid() and to
      call repair_eb_io_failure() when the verification of the transids failed.
      This commit fixes the issue.
      Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      256dd1bb
    • Liu Bo's avatar
      Btrfs: fix ordered extent leak when failing to start a transaction · d280e5be
      Liu Bo authored
      We cannot just return error before freeing ordered extent and releasing reserved
      space when we fail to start a transacion.
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      d280e5be
    • Liu Bo's avatar
      Btrfs: fix a dio write regression · 24c03fa5
      Liu Bo authored
      This bug is introduced by commit 3b8bde746f6f9bd36a9f05f5f3b6e334318176a9
      (Btrfs: lock extents as we map them in DIO).
      
      In dio write, we should unlock the section which we didn't do IO on in case that
      we fall back to buffered write.  But we need to not only unlock the section
      but also cleanup reserved space for the section.
      
      This bug was found while running xfstests 133, with this 133 no longer complains.
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      24c03fa5
    • Josef Bacik's avatar
      Btrfs: fix deadlock with freeze and sync V2 · bd7de2c9
      Josef Bacik authored
      We can deadlock with freeze right now because we unconditionally start a
      transaction in our ->sync_fs() call.  To fix this just check and see if we
      have a running transaction to commit.  This saves us from the deadlock
      because at this point we'll have the umount sem for the sb so we're safe
      from freezes coming in after we've done our check.  With this patch the
      freeze xfstests no longer deadlocks.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      bd7de2c9
    • Stefan Behrens's avatar
      Btrfs: revert checksum error statistic which can cause a BUG() · 5ee0844d
      Stefan Behrens authored
      Commit 442a4f63 added btrfs device
      statistic counters for detected IO and checksum errors to Linux 3.5.
      The statistic part that counts checksum errors in
      end_bio_extent_readpage() can cause a BUG() in a subfunction:
      "kernel BUG at fs/btrfs/volumes.c:3762!"
      That part is reverted with the current patch.
      However, the counting of checksum errors in the scrub context remains
      active, and the counting of detected IO errors (read, write or flush
      errors) in all contexts remains active.
      
      Cc: stable <stable@vger.kernel.org> # 3.5
      Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      5ee0844d
    • Stefan Behrens's avatar
      Btrfs: remove superblock writing after fatal error · 68ce9682
      Stefan Behrens authored
      With commit acce952b, btrfs was changed to flag the filesystem with
      BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal
      error happened like a write I/O errors of all mirrors.
      In such situations, on unmount, the superblock is written in
      btrfs_error_commit_super(). This is done with the intention to be able
      to evaluate the error flag on the next mount. A warning is printed
      in this case during the next mount and the log tree is ignored.
      
      The issue is that it is possible that the superblock points to a root
      that was not written (due to write I/O errors).
      The result is that the filesystem cannot be mounted. btrfsck also does
      not start and all the other btrfs-progs tools fail to start as well.
      However, mount -o recovery is working well and does the right things
      to recover the filesystem (i.e., don't use the log root, clear the
      free space cache and use the next mountable root that is stored in the
      root backup array).
      
      This patch removes the writing of the superblock when
      BTRFS_SUPER_FLAG_ERROR is set, and removes the handling of the error
      flag in the mount function.
      
      These lines can be used to reproduce the issue (using /dev/sdm):
      SCRATCH_DEV=/dev/sdm
      SCRATCH_MNT=/mnt
      echo 0 25165824 linear $SCRATCH_DEV 0 | dmsetup create foo
      ls -alLF /dev/mapper/foo
      mkfs.btrfs /dev/mapper/foo
      mount /dev/mapper/foo $SCRATCH_MNT
      echo bar > $SCRATCH_MNT/foo
      sync
      echo 0 25165824 error | dmsetup reload foo
      dmsetup resume foo
      ls -alF $SCRATCH_MNT
      touch $SCRATCH_MNT/1
      ls -alF $SCRATCH_MNT
      sleep 35
      echo 0 25165824 linear $SCRATCH_DEV 0 | dmsetup reload foo
      dmsetup resume foo
      sleep 1
      umount $SCRATCH_MNT
      btrfsck /dev/mapper/foo
      dmsetup remove foo
      Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
      68ce9682