1. 12 Sep, 2012 1 commit
    • Jan Kara's avatar
      jbd: Fix assertion failure in commit code due to lacking transaction credits · 09e05d48
      Jan Kara authored
      ext3 users of data=journal mode with blocksize < pagesize were occasionally
      hitting assertion failure in journal_commit_transaction() checking whether the
      transaction has at least as many credits reserved as buffers attached.  The
      core of the problem is that when a file gets truncated, buffers that still need
      checkpointing or that are attached to the committing transaction are left with
      buffer_mapped set. When this happens to buffers beyond i_size attached to a
      page stradding i_size, subsequent write extending the file will see these
      buffers and as they are mapped (but underlying blocks were freed) things go
      awry from here.
      
      The assertion failure just coincidentally (and in this case luckily as we would
      start corrupting filesystem) triggers due to journal_head not being properly
      cleaned up as well.
      
      Under some rare circumstances this bug could even hit data=ordered mode users.
      There the assertion won't trigger and we would end up corrupting the
      filesystem.
      
      We fix the problem by unmapping buffers if possible (in lots of cases we just
      need a buffer attached to a transaction as a place holder but it must not be
      written out anyway). And in one case, we just have to bite the bullet and wait
      for transaction commit to finish.
      Reviewed-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      09e05d48
  2. 06 Sep, 2012 1 commit
    • Ian Abbott's avatar
      UDF: Add support for O_DIRECT · 5eec54fc
      Ian Abbott authored
      Add support for the O_DIRECT flag.  There are two cases to deal with:
      
      1. Small files stored in the ICB (inode control block?): just return 0
      from the new udf_adinicb_direct_IO() handler to fall back to buffered
      I/O.
      
      2. Larger files, not stored in the ICB: nothing special here.  Just call
      blockdev_direct_IO() from our new udf_direct_IO() handler and tidy up
      any blocks instantiated outside i_size on error.  This is pretty
      standard.  Factor error handling code out of udf_write_begin() into new
      function udf_write_failed() so it can also be called by udf_direct_IO().
      
      Also change the whitespace in udf_aops to make it a bit neater.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      5eec54fc
  3. 05 Sep, 2012 2 commits
    • Jan Kara's avatar
      Merge branch 'fast_track' into for_next · 3f6bba82
      Jan Kara authored
      3f6bba82
    • Jan Kara's avatar
      udf: Fix data corruption for files in ICB · 9c2fc0de
      Jan Kara authored
      When a file is stored in ICB (inode), we overwrite part of the file, and
      the page containing file's data is not in page cache, we end up corrupting
      file's data by overwriting them with zeros. The problem is we use
      simple_write_begin() which simply zeroes parts of the page which are not
      written to. The problem has been introduced by be021ee4 (udf: convert to
      new aops).
      
      Fix the problem by providing a ->write_begin function which makes the page
      properly uptodate.
      
      CC: <stable@vger.kernel.org> # >= 2.6.24
      Reported-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      9c2fc0de
  4. 04 Sep, 2012 1 commit
  5. 03 Sep, 2012 4 commits
    • Namjae Jeon's avatar
      udf: add writepages support for udf · 378b8e1a
      Namjae Jeon authored
      Use mpage_writepages() instead of multiple calls to udf_writepage()
      to make performance higher.
      
      *Write Speed with writepage() =
       RecSize     ReadSpeed    WriteSpeed  RanReadSpeed RanWriteSpeed
      10485760    0.00MB/sec    8.56MB/sec    0.00MB/sec    8.20MB/sec
       1048576    0.00MB/sec    8.57MB/sec    0.00MB/sec    6.42MB/sec
        524288    0.00MB/sec    8.59MB/sec    0.00MB/sec    5.24MB/sec
        262144    0.00MB/sec    8.59MB/sec    0.00MB/sec    4.17MB/sec
        131072    0.00MB/sec    8.53MB/sec    0.00MB/sec    3.32MB/sec
         65536    0.00MB/sec    8.49MB/sec    0.00MB/sec    2.31MB/sec
      
      *Write Speed with writepages()
      RecSize     ReadSpeed    WriteSpeed  RanReadSpeed RanWriteSpeed
      10485760    0.00MB/sec    9.88MB/sec    0.00MB/sec    9.60MB/sec
       1048576    0.00MB/sec    9.95MB/sec    0.00MB/sec    7.52MB/sec
        524288    0.00MB/sec    9.98MB/sec    0.00MB/sec    6.16MB/sec
        262144    0.00MB/sec    9.90MB/sec    0.00MB/sec    4.98MB/sec
        131072    0.00MB/sec    9.89MB/sec    0.00MB/sec    3.78MB/sec
         65536    0.00MB/sec    9.81MB/sec    0.00MB/sec    2.50MB/sec
      
      There is about 1.4MB/sec speed improvement over 8.5MB/sec,
      which comes out around 16% improvement.
      Signed-off-by: default avatarNamjae Jeon <linkinjeon@gmail.com>
      Signed-off-by: default avatarAshish Sangwan <ashish.sangwan2@gmail.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      378b8e1a
    • Eric Sandeen's avatar
      ext3: don't clear orphan list on ro mount with errors · e4230108
      Eric Sandeen authored
      When we have a filesystem with an orphan inode list *and* in error
      state, things behave differently if:
      
      1) e2fsck -p is done prior to mount: e2fsck fixes things and exits
         happily (barring other significant problems)
      
      vs.
      
      2) mount is done first, then e2fsck -p: due to the orphan inode
         list removal, more errors are found and e2fsck exits with
         UNEXPECTED INCONSISTENCY.
      
      The 2nd case above, on the root filesystem, has the tendency to halt
      the boot process, which is unfortunate.
      
      The situation can be improved by not clearing the orphan
      inode list when the fs is mounted readonly.
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      e4230108
    • Sachin Kamat's avatar
      reiserfs: Make reiserfs_xattr_handlers static · da02eb72
      Sachin Kamat authored
      Silences the following sparse warning: fs/reiserfs/xattr.c:899:28: warning:
      symbol 'reiserfs_xattr_handlers' was not declared. Should it be static?
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      da02eb72
    • Jan Kara's avatar
      ext3: Fix fdatasync() for files with only i_size changes · 156bddd8
      Jan Kara authored
      Code tracking when transaction needs to be committed on fdatasync(2) forgets
      to handle a situation when only inode's i_size is changed. Thus in such
      situations fdatasync(2) doesn't force transaction with new i_size to disk
      and that can result in wrong i_size after a crash.
      
      Fix the issue by updating inode's i_datasync_tid whenever its size is
      updated.
      
      CC: <stable@vger.kernel.org> # >= 2.6.32
      Reported-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      156bddd8
  6. 26 Aug, 2012 6 commits
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · c182ae42
      Linus Torvalds authored
      Pull a hwmon fix from Guenter Roeck:
       "Fix sensor readings for Asus M5A78L in asus_atk0110 driver."
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (asus_atk0110) Add quirk for Asus M5A78L
      c182ae42
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream · 89a897fb
      Linus Torvalds authored
      Pull LogFS bugfixes from Prasad Joshi:
      
       - "logfs: query block device for number of pages to send with bio"
      
      	This BUG was found when LogFS was used on KVM. The patch fixes
      	the problem by asking for underlaying block device the number
      	of pages to send with each BIO.
      
       - "logfs: maintain the ordering of meta-inode destruction"
      
      	LogFS maintains file system meta-data in special inodes. These
      	inodes are releated to each other, therefore they must be
      	destroyed in a proper order.
      
       - "logfs: initialize the number of iovecs in bio"
      
      	LogFS used to panic when it was created on an encrypted LVM
      	volume. The patch fixes the problem by properly initializing
      	the BIO.
      
      Plus a couple more:
       - logfs: create a pagecache page if it is not present
       - logfs: destroy the reserved inodes while unmounting
      
      * tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream:
        logfs: query block device for number of pages to send with bio
        logfs: maintain the ordering of meta-inode destruction
        logfs: create a pagecache page if it is not present
        logfs: initialize the number of iovecs in bio
        logfs: destroy the reserved inodes while unmounting
      89a897fb
    • Linus Torvalds's avatar
      Merge tag 'fixes-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 9acb1725
      Linus Torvalds authored
      Pull arm-soc fixes from Arnd Bergmann:
       "Bug fixes for various ARM platforms.  About half of these are for OMAP
        and submitted before but did not make it into v3.6-rc2."
      
      * tag 'fixes-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
        ARM: ux500: don't select LEDS_GPIO for snowball
        ARM: imx: build i.MX6 functions only when needed
        ARM: imx: select CPU_FREQ_TABLE when needed
        ARM: imx: fix ksz9021rn_phy_fixup
        ARM: imx: build pm-imx5 code only when PM is enabled
        ARM: omap: allow building omap44xx without SMP
        ARM: dts: imx51-babbage: fix esdhc cd/wp properties
        ARM: imx6: spin the cpu until hardware takes it down
        ARM: ux500: Ensure probing of Audio devices when Device Tree is enabled
        ARM: ux500: Fix merge error, no matching driver name for 'snd_soc_u8500'
        ARM i.MX6q: Add virtual 1/3.5 dividers in the LDB clock path
        ARM: Kirkwood: fix Makefile.boot
        ARM: Kirkwood: Fix iconnect leds
        ARM: Orion: Set eth packet size csum offload limit
        ARM: mv78xx0: fix win_cfg_base prototype
        ARM: OMAP: dmtimers: Fix locking issue in omap_dm_timer_request*()
        ARM: mmp: fix potential NULL dereference
        ARM: OMAP4: Register the OPP table only for 4430 device
        cpufreq: OMAP: Handle missing frequency table on SMP systems
        ARM: OMAP4: sleep: Save the complete used register stack frame
        ...
      9acb1725
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.6-rc3-tag' of... · 26756087
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull three xen bug-fixes from Konrad Rzeszutek Wilk:
       - Revert the kexec fix which caused on non-kexec shutdowns a race.
       - Reuse existing P2M leafs - instead of requiring to allocate a large
         area of bootup virtual address estate.
       - Fix a one-off error when adding PFNs for balloon pages.
      
      * tag 'stable/for-linus-3.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/setup: Fix one-off error when adding for-balloon PFNs to the P2M.
        xen/p2m: Reuse existing P2M leafs if they are filled with 1:1 PFNs or INVALID.
        Revert "xen PVonHVM: move shared_info to MMIO before kexec"
      26756087
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 4ae46147
      Linus Torvalds authored
      Pull powerpc fixes from Benjamin Herrenschmidt:
       "I meant to sent that earlier but got swamped with other things, so
        here are some powerpc fixes for 3.6.  A few regression fixes and some
        bug fixes that I deemed should still make it.
      
        There's a FSL update from Kumar with a bunch of defconfig updates
        along with a few embedded fixes.
      
        I also reverted my g5_defconfig update that I merged earlier as it was
        completely busted, not too sure what happened there, I'll do a new one
        later."
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        Revert "powerpc: Update g5_defconfig"
        powerpc/perf: Use pmc_overflow() to detect rolled back events
        powerpc: Fix VMX in interrupt check in POWER7 copy loops
        powerpc: POWER7 copy_to_user/copy_from_user patch applied twice
        powerpc: Fix personality handling in ppc64_personality()
        powerpc/dma-iommu: Fix IOMMU window check
        powerpc: Remove unnecessary ifdefs
        powerpc/kgdb: Restore current_thread_info properly
        powerpc/kgdb: Bail out of KGDB when we've been triggered
        powerpc/kgdb: Do not set kgdb_single_step on ppc
        powerpc/mpic_msgr: Add missing includes
        powerpc: Fix null pointer deref in perf hardware breakpoints
        powerpc: Fixup whitespace in xmon
        powerpc: Fix xmon dl command for new printk implementation
        powerpc/fsl: fix "Failed to mount /dev: No such device" errors
        powerpc/fsl: update defconfigs
        booke/wdt: some ioctls do not return values properly
        powerpc/p4080ds: dts - add usb controller version info and port0
        powerpc/85xx: mpc85xx_defconfig - add VIA PATA support for MPC85xxCDS
        powerpc/fsl-pci: Only scan PCI bus if configured as a host
      4ae46147
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 6ec9776c
      Linus Torvalds authored
      Pull kvm fixes from Marcelo Tosatti.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86 emulator: use stack size attribute to mask rsp in stack ops
        KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended
        ppc: e500_tlb memset clears nothing
        KVM: PPC: Add cache flush on page map
        KVM: PPC: Book3S HV: Fix incorrect branch in H_CEDE code
        KVM: x86: update KVM_SAVE_MSRS_BEGIN to correct value
      6ec9776c
  7. 25 Aug, 2012 6 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-v3.6-rc4' of git://oss.sgi.com/xfs/xfs · e1d33a5c
      Linus Torvalds authored
      Pull xfs bugfixes from Ben Myers:
       - fix uninitialised variable in xfs_rtbuf_get()
       - unlock the AGI buffer when looping in xfs_dialloc
       - check for possible overflow in xfs_ioc_trim
      
      * tag 'for-linus-v3.6-rc4' of git://oss.sgi.com/xfs/xfs:
        xfs: check for possible overflow in xfs_ioc_trim
        xfs: unlock the AGI buffer when looping in xfs_dialloc
        xfs: fix uninitialised variable in xfs_rtbuf_get()
      e1d33a5c
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 2432cbe4
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Random fixes across the MIPS tree.  The two hotspots are several bugs
        in the module loader and the ath79 SOC support; also noteworthy is the
        restructuring of the code to synchronize CPU timers across CPUs on
        startup; the old code recently ceased to work due to unrelated
        changes.
      
        All except one of these patches have sat for a significant time in
        linux-next for testing."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: pci-ar724x: avoid data bus error due to a missing PCIe module
        MIPS: Malta: Delete duplicate PCI fixup.
        MIPS: ath79: don't hardcode the unavailability of the DSP ASE
        MIPS: Synchronize MIPS count one CPU at a time
        MIPS: BCM63xx: Fix SPI message control register handling for BCM6338/6348.
        MIPS: Module: Deal with malformed HI16/LO16 relocation sequences.
        MIPS: Fix race condition in module relocation code.
        MIPS: Fix memory leak in error path of HI16/LO16 relocation handling.
        MIPS: MTX-1: Add udelay to mtx1_pci_idsel
        MIPS: ath79: select HAVE_CLK
        MIPS: ath79: Use correct IRQ number for the OHCI controller on AR7240
        MIPS: ath79: Fix number of GPIO lines for AR724[12]
        MIPS: Octeon: Fix broken interrupt controller code.
      2432cbe4
    • Linus Torvalds's avatar
      Merge branch 'for-3.6' of git://linux-nfs.org/~bfields/linux · 8497ae61
      Linus Torvalds authored
      Pull nfsd bugfixes from J. Bruce Fields:
       "Particular thanks to Michael Tokarev, Malahal Naineni, and Jamie
        Heilman for their testing and debugging help."
      
      * 'for-3.6' of git://linux-nfs.org/~bfields/linux:
        svcrpc: fix svc_xprt_enqueue/svc_recv busy-looping
        svcrpc: sends on closed socket should stop immediately
        svcrpc: fix BUG() in svc_tcp_clear_pages
        nfsd4: fix security flavor of NFSv4.0 callback
      8497ae61
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · a7e546f1
      Linus Torvalds authored
      Pull block-related fixes from Jens Axboe:
      
       - Improvements to the buffered and direct write IO plugging from
         Fengguang.
      
       - Abstract out the mapping of a bio in a request, and use that to
         provide a blk_bio_map_sg() helper.  Useful for mapping just a bio
         instead of a full request.
      
       - Regression fix from Hugh, fixing up a patch that went into the
         previous release cycle (and marked stable, too) attempting to prevent
         a loop in __getblk_slow().
      
       - Updates to discard requests, fixing up the sizing and how we align
         them.  Also a change to disallow merging of discard requests, since
         that doesn't really work properly yet.
      
       - A few drbd fixes.
      
       - Documentation updates.
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: replace __getblk_slow misfix by grow_dev_page fix
        drbd: Write all pages of the bitmap after an online resize
        drbd: Finish requests that completed while IO was frozen
        drbd: fix drbd wire compatibility for empty flushes
        Documentation: update tunable options in block/cfq-iosched.txt
        Documentation: update tunable options in block/cfq-iosched.txt
        Documentation: update missing index files in block/00-INDEX
        block: move down direct IO plugging
        block: remove plugging at buffered write time
        block: disable discard request merge temporarily
        bio: Fix potential memory leak in bio_find_or_create_slab()
        block: Don't use static to define "void *p" in show_partition_start()
        block: Add blk_bio_map_sg() helper
        block: Introduce __blk_segment_map_sg() helper
        fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices
        block: split discard into aligned requests
        block: reorganize rounding of max_discard_sectors
      a7e546f1
    • Linus Torvalds's avatar
      Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · da31ce72
      Linus Torvalds authored
      Pull libata fixes from Jeff Garzik:
       - libata-acpi regression fix
       - additional or corrected drive quirks for ata_blacklist
       - Kconfig text tweaking
       - new PCI IDs
       - pata_atiixp: quirk for MSI motherboard
       - export ahci_dev_classify for an ahci_platform driver
      
      * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry
        [libata] new quirk, lift bridge limits for Buffalo DriveStation Quattro
        [libata] Kconfig: Elaborate that SFF is meant for legacy and PATA stuff
        [libata] acpi: call ata_acpi_gtm during ata port init time
        ata_piix: Add Device IDs for Intel Lynx Point-LP PCH
        ahci: Add Device IDs for Intel Lynx Point-LP PCH
        pata_atiixp: override cable detection on MSI E350DM-E33
        ahci: un-staticize ahci_dev_classify
      da31ce72
    • Prarit Bhargava's avatar
      libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry · d17d794c
      Prarit Bhargava authored
      commit d70e551c, Add " 2GB ATA Flash
      Disk"/"ADMA428M" to DMA blacklist, should have added a space before 2GB.
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      d17d794c
  8. 24 Aug, 2012 19 commits