aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-20Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6Linus Torvalds14-22/+269
Pull cifs fixes from Steve French: "Most important fixes in this set include three SMB3 fixes for stable (including fix for possible kernel oops), and a workaround to allow writes to Mac servers (only cifs dialect, not more current SMB2.1, worked to Mac servers). Also fallocate support added, and lease fix from Jeff" * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6: [SMB3] Enable fallocate -z support for SMB3 mounts enable fallocate punch hole ("fallocate -p") for SMB3 Incorrect error returned on setting file compressed on SMB2 CIFS: Fix wrong directory attributes after rename CIFS: Fix SMB2 readdir error handling [CIFS] Possible null ptr deref in SMB2_tcon [CIFS] Workaround MacOS server problem with SMB2.1 write response cifs: handle lease F_UNLCK requests properly Cleanup sparse file support by creating worker function for it Add sparse file support to SMB2/SMB3 mounts Add missing definitions for CIFS File System Attributes cifs: remove unused function cifs_oplock_break_wait
2014-08-20Merge branch 'for_linus' of ↵Linus Torvalds5-25/+60
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull filesystem fixes from Jan Kara: "udf, isofs, and ext3 bug fixes" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext3: Count internal journal as bsddf overhead in ext3_statfs isofs: Fix unbounded recursion when processing relocated directories udf: avoid unneeded up_write when fail to add entry in ->symlink
2014-08-20Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds1-1/+1
Pull x86 platform driver revert from Matthew Garrett: "This clearly shouldn't have been merged. No excuse on my part" * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: Revert "platform/x86/toshiba-apci.c possible bad if test?"
2014-08-20Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds5-21/+21
Pull KVM fixes from Paolo Bonzini: "Reverting a 3.16 patch, fixing two bugs in device assignment (one has a CVE), and fixing some problems introduced during the merge window (the CMA bug came in via Andrew, the x86 ones via yours truly)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: virt/kvm/assigned-dev.c: Set 'dev->irq_source_id' to '-1' after free it Revert "KVM: x86: Increase the number of fixed MTRR regs to 10" KVM: x86: do not check CS.DPL against RPL during task switch KVM: x86: Avoid emulating instructions on #UD mistakenly PC, KVM, CMA: Fix regression caused by wrong get_order() use kvm: iommu: fix the third parameter of kvm_iommu_put_pages (CVE-2014-3601)
2014-08-20Merge tag 'scsi-fixes' of ↵Linus Torvalds1-2/+10
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "These are the two bug fixes I mentioned in the final merge window pull. One is a reversed logic check in the device busy tests which can cause a nasty hang and another crash seen in the new SCSI pool support if the use count ever goes to zero" [ The device busy test already got merged from a patch earlier, so is now duplicated. ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: [SCSI] save command pool address of Scsi_Host [SCSI] fix qemu boot hang problem
2014-08-20Revert "platform/x86/toshiba-apci.c possible bad if test?"Matthew Garrett1-1/+1
This reverts commit bdc3ae7221213963f438faeaa69c8b4a2195f491. Signed-off-by: Matthew Garrett <[email protected]>
2014-08-20mfd: ab8500-core: Use 'ifdef' for config optionsFabio Estevam1-1/+1
The config symbol 'CONFIG_DEBUG_FS' should be protected by a 'ifdef' instead of a plain 'if'. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-08-20mfd: htc-i2cpld: Fix %d confusingly prefixed with 0x in format stringHans Wennborg1-1/+1
Signed-off-by: Hans Wennborg <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-08-20mfd: omap-usb-host: Fix %d confusingly prefixed with 0x in format stringHans Wennborg1-1/+1
Signed-off-by: Hans Wennborg <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-08-20pwm-backlight: Fix bogus request for GPIO#0 when instantiated from DTLothar Waßmann1-0/+1
commit 257462dbf3ed ("pwm-backlight: switch to gpiod interface") introduced a regression leading to acquiring a bogus GPIO-0 when configured from DT without an 'enable-gpios' property. The driver will happily accept the 0 initialized 'enable_gpio' member of the struct platform_pwm_backlight_data as valid gpio number, and request this GPIO as enable pin. In case of multiple driver instances, the second will fail to register with the error message: pwm-backlight backlight1.23: failed to request GPIO#0: -16 Fix this by setting enable_gpio in the pdata struct to -EINVAL. Signed-off-by: Lothar Waßmann <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-08-20perf: Handle compat ioctlPawel Moll1-1/+22
When running a 32-bit userspace on a 64-bit kernel (eg. i386 application on x86_64 kernel or 32-bit arm userspace on arm64 kernel) some of the perf ioctls must be treated with special care, as they have a pointer size encoded in the command. For example, PERF_EVENT_IOC_ID in 32-bit world will be encoded as 0x80042407, but 64-bit kernel will expect 0x80082407. In result the ioctl will fail returning -ENOTTY. This patch solves the problem by adding code fixing up the size as compat_ioctl file operation. Reported-by: Drew Richardson <[email protected]> Signed-off-by: Pawel Moll <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-08-19ext3: Count internal journal as bsddf overhead in ext3_statfsChin-Tsung Cheng1-2/+3
The journal blocks of external journal device should not be counted as overhead. Signed-off-by: Chin-Tsung Cheng <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2014-08-19ARM: dts: ODROID i2c improvementsDaniel Drake1-0/+2
Increase max i2c bus frequency beyond the default for faster data transfers. According to the manual, these faster speeds are only available when the board is wired up the right way. In this case, the vendor kernel has run at this speed for a long time. sda-delay is needed for talking to RTC on PMIC, otherwise the i2c controller never sees an ACK. Strangely the other PMIC i2c slave (the main one) works fine even without this delay. I Chose value 100 to match the vendor kernel. Signed-off-by: Daniel Drake <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Tested-by: Tomeu Vizoso <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2014-08-19ARM: dts: Enable PMIC interrupts on ODROIDDaniel Drake1-0/+11
The ODROID kernel shows that the PMIC interrupt line is hooked up to pin GPX3-2. This is needed for the max77686-irq driver to create the PMIC IRQ domain, which is needed by max77686-rtc. Signed-off-by: Daniel Drake <[email protected]> Tested-by: Tomeu Vizoso <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2014-08-19Revert "arm64: Do not invoke audit_syscall_* functions if !CONFIG_AUDIT_SYSCALL"Will Deacon1-4/+0
For some reason, the audit patches didn't make it out of -next this merge window, so revert our temporary hack and let the audit guys deal with fixing up -next. This reverts commit 2a8f45b040bcb9b2ad2845f061499d1b6f41cc7b. Signed-off-by: Will Deacon <[email protected]>
2014-08-19Merge tag 'imx-fixes-3.17' of ↵Olof Johansson8-20/+29
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Merge "ARM: imx: fixes for 3.17" from Shawn Guo: The i.MX fixes for 3.17: - A correction on imx6dl gpu axi clock setting - Fix a compilation error which comes after ARMv6K SMP build is allowed - Fix a typo with pinctrl_esdhc1 in vf610-twr dts - Correct i.MX6SX pad setting for UART in dts - Fix i.MX53 VPU clock settings in dts - Fix a suspend/resume failure seen on Cubox-i board, which is caused by TLB missing of IOMUXC base address during suspend - ARCH_HAS_OPP has been removed by commit 78c5e0bb145d (PM / OPP: Remove ARCH_HAS_OPP), so we need to kill it for IMX - A small fix on enet reset pin of edmqmx6 board * tag 'imx-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6sx: fix the pad setting for uart CTS_B ARM: dts: i.MX53: fix apparent bug in VPU clks ARM: imx: correct gpu2d_axi and gpu3d_axi clock setting ARM: dts: imx6: edmqmx6: change enet reset pin ARM: dts: vf610-twr: Fix pinctrl_esdhc1 pin definitions. ARM: imx: remove unnecessary ARCH_HAS_OPP select ARM: imx: fix TLB missing of IOMUXC base address during suspend ARM: imx6: fix SMP compilation again Signed-off-by: Olof Johansson <[email protected]>
2014-08-19arm64: mm: update max pa bits to 48Ganapatrao Kulkarni1-1/+1
Now that we support 48-bit physical addressing, update MAX_PHYSMEM_BITS accordingly. Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Ganapatrao Kulkarni <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2014-08-19arm64: ignore DT memreserve entries when booting in UEFI modeLeif Lindholm2-1/+5
UEFI provides its own method for marking regions to reserve, via the memory map which is also used to initialise memblock. So when using the UEFI memory map, ignore any memreserve entries present in the DT. Reported-by: Mark Rutland <[email protected]> Reviewed-by: Mark Rutland <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Leif Lindholm <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2014-08-19arm64: configs: Enable X-Gene SATA and ethernet in defconfigMark Brown1-0/+3
Currently when run on an APM platform the ARMv8 defconfig has no viable options for rootfs other than ramdisk which is rather limiting. Since we already have both SATA and the bits needed for NFS root enabled we just need to enable the relevant drivers so do that, helping enable direct testing of upstream. If the configuration ends up becoming too big we can consider modularising some of the drivers and asking people to use an initramfs but for now this is not an issue. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2014-08-19arm64: align randomized TEXT_OFFSET on 4 kB boundaryArd Biesheuvel2-5/+5
When booting via UEFI, the kernel Image is loaded at a 4 kB boundary and the embedded EFI stub is executed in place. The EFI stub relocates the Image to reside TEXT_OFFSET bytes above a 2 MB boundary, and jumps into the kernel proper. In AArch64, PC relative symbol references are emitted using adrp/add or adrp/ldr pairs, where the offset into a 4 kB page is resolved using a separate :lo12: relocation. This implicitly assumes that the code will always be executed at the same relative offset with respect to a 4 kB boundary, or the references will point to the wrong address. This means we should link the kernel at a 4 kB aligned base address in order to remain compatible with the base address the UEFI loader uses when doing the initial load of Image. So update the code that generates TEXT_OFFSET to choose a multiple of 4 kB. At the same time, update the code so it chooses from the interval [0..2MB) as the author originally intended. Reviewed-by: Mark Rutland <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2014-08-19tipc: Fix build.David S. Miller1-1/+2
Missing semicolon in range check fix. Signed-off-by: David S. Miller <[email protected]>
2014-08-19Merge branch 'cbq-fixes'David S. Miller1-34/+14
Vasily Averin says: ==================== cbq: incorrectly low bandwidth blocks limited traffic v2: patch description changes Fixes: f0f6ee1f70c4 ("cbq: incorrect processing of high limits") Mainstream commit f0f6ee1f70c4 ("cbq: incorrect processing of high limits") have side effect: if cbq bandwidth setting is less than real interface throughput non-limited traffic can delay limited traffic for a very long time. This happen because of q->now changes incorrectly in cbq_dequeue(): in described scenario L2T is much greater than real time delay, and q->now gets an extra boost for each transmitted packet. Accumulated boost prevents update q->now, and blocked class can wait very long time until (q->now >= cl->undertime) will be true again. More detailed problem description can be found here: http://www.spinics.net/lists/netdev/msg292493.html Following patches should fix the problem. ==================== Signed-off-by: David S. Miller <[email protected]>
2014-08-19cbq: now_rt removalVasily Averin1-10/+1
Now q->now_rt is identical to q->now and is not required anymore. Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-19cbq: incorrectly low bandwidth setting blocks limited trafficVasily Averin1-24/+13
Mainstream commit f0f6ee1f70c4 ("cbq: incorrect processing of high limits") have side effect: if cbq bandwidth setting is less than real interface throughput non-limited traffic can delay limited traffic for a very long time. This happen because of q->now changes incorrectly in cbq_dequeue(): in described scenario L2T is much greater than real time delay, and q->now gets an extra boost for each transmitted packet. Accumulated boost prevents update q->now, and blocked class can wait very long time until (q->now >= cl->undertime) will be true again. To fix the problem the patch updates q->now on each cbq_update() call. L2T-related pre-modification q->now was moved to cbq_update(). My testing confirmed that it fixes the problem and did not discover any side-effects Fixes: f0f6ee1f70c4 ("cbq: incorrect processing of high limits") Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-19scsi: Fix qemu boot hang problemGuenter Roeck1-1/+1
The latest kernel fails to boot qemu arm images when using scsi for disk access. Boot gets stuck after the following messages. brd: module loaded sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103) sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93 sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking sym0: SCSI BUS has been reset. scsi host0: sym-2.2.3 Bisect points to commit 71e75c97f97a ("scsi: convert device_busy to atomic_t"). Code inspection shows the following suspicious change in scsi_request_fn. out_delay: - if (sdev->device_busy == 0 && !scsi_device_blocked(sdev)) + if (atomic_read(&sdev->device_busy) && !scsi_device_blocked(sdev)) blk_delay_queue(q, SCSI_QUEUE_DELAY); } 'sdev->device_busy == 0' was replaced with 'atomic_read(&sdev->device_busy)', meaning the logic was reversed. Changing this expression to '!atomic_read(&sdev->device_busy)' fixes the problem. Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Acked-by: Jens Axboe <[email protected]> Reviewed-by: Venkatesh Srinivas <[email protected]> Reviewed-by: Webb Scales <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-08-19isofs: Fix unbounded recursion when processing relocated directoriesJan Kara3-22/+55
We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow or deadlocks (if there is a loop created from CL entries). Fix the problem by not allowing CL entry to point to a directory entry with CL entry (such use makes no good sense anyway) and by checking whether CL entry doesn't point to itself. CC: [email protected] Reported-by: Chris Evans <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2014-08-19udf: avoid unneeded up_write when fail to add entry in ->symlinkChao Yu1-1/+2
We have released the ->i_data_sem before invoking udf_add_entry(), so in following error path, we should not release this lock again. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2014-08-19MIPS: OCTEON: make get_system_type() thread-safeAaro Koskinen1-5/+13
get_system_type() is not thread-safe on OCTEON. It uses static data, also more dangerous issue is that it's calling cvmx_fuse_read_byte() every time without any synchronization. Currently it's possible to get processes stuck looping forever in kernel simply by launching multiple readers of /proc/cpuinfo: (while true; do cat /proc/cpuinfo > /dev/null; done) & (while true; do cat /proc/cpuinfo > /dev/null; done) & ... Fix by initializing the system type string only once during the early boot. Signed-off-by: Aaro Koskinen <[email protected]> Cc: [email protected] Reviewed-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7437/ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: CPS: Initialize EVA before bringing up VPEs from secondary coresMarkos Chandras1-0/+4
The CPS code is doing several memory loads when configuring the VPEs from secondary cores, so the segmentation control registers must be initialized in time otherwise the kernel will crash with strange TLB exceptions. Reviewed-by: Paul Burton <[email protected]> Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7424/ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init'Markos Chandras1-6/+16
Rename 'eva_entry' to 'platform_eva_init' as required by the new 'eva_init' macro in the eva.h header. Since this macro is now used in a platform dependent way, it must not depend on its caller so move the t1 register initialization inside this macro. Also set the .reorder assembler option in case the caller may have previously set .noreorder. This may allow a few assembler optimizations. Finally include missing headers and document the register usage for this macro. Reviewed-by: Paul Burton <[email protected]> Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7423/ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: EVA: Add new EVA headerMarkos Chandras1-0/+43
Generic code may need to perform certain operations when EVA is enabled, for example, configure the segmentation registers during boot. In order to avoid using more CONFIG_EVA ifdefs in the arch code, such functions will be added in this header instead. Initially this header contains a macro which will be used by generic code later on during VPEs configuration on secondary cores. All it does is to call the platform specific EVA init code in case EVA is enabled. Reviewed-by: Paul Burton <[email protected]> Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7422/ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: scall64-o32: Fix indirect syscall detectionMarkos Chandras1-4/+8
Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32)) added indirect syscall detection for O32 processes running on MIPS64 but it did not work as expected. The reason is the the scall64-o32 implementation differs compared to scall32-o32. In the former, the v0 (syscall number) register contains the absolute syscall number (4000 + X) whereas in the latter it contains the relative syscall number (X). Fix the code to avoid doing an extra addition, and load the v0 register directly to the first argument for syscall_trace_enter. Moreover, set the .reorder assembler option in order to have better control on this part of the assembly code. Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7481/ Cc: <[email protected]> # v3.15+ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: syscall: Fix AUDIT value for O32 processes on MIPS64Markos Chandras1-3/+5
On MIPS64, O32 processes set both TIF_32BIT_ADDR and TIF_32BIT_REGS so the previous condition treated O32 applications as N32 when evaluating seccomp filters. Fix the condition to check both TIF_32BIT_{REGS, ADDR} for the N32 AUDIT flag. Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7480/ Cc: <[email protected]> # v3.15+ Signed-off-by: James Hogan <[email protected]>
2014-08-19MIPS: Loongson: Fix COP2 usage for preemptible kernelHuacai Chen1-4/+4
In preemptible kernel, only TIF_USEDFPU flag is reliable to distinguish whether _init_fpu()/_restore_fp() is needed. Because the value of the CP0_Status.CU1 isn't changed during preemption. V2: Fix coding style. Signed-off-by: Huacai Chen <[email protected]> Cc: John Crispin <[email protected]> Cc: Steven J. Hill <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Cc: Fuxin Zhang <[email protected]> Cc: Zhangjin Wu <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/7515/ Signed-off-by: Ralf Baechle <[email protected]>
2014-08-19Revert "drm/radeon: Use write-combined CPU mappings of ring buffers with PCIe"Alex Deucher1-3/+1
This reverts commit 1490434f0da63afc6006411c8829c6a7935a4e7e. Several people have reported regressions with this patch on kabini.
2014-08-19drm/radeon: fix active_cu mask on SI and CIK after re-init (v3)Alex Deucher2-0/+2
Need to initialize the mask to 0 on init, otherwise it keeps increasing. bug: https://bugzilla.kernel.org/show_bug.cgi?id=82581 v2: also fix cu count v3: split count fix into separate patch Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Cc: [email protected]
2014-08-19drm/radeon: fix active cu count for SI and CIKAlex Deucher2-10/+6
This fixes the CU count reported to userspace for OpenCL. bug: https://bugzilla.kernel.org/show_bug.cgi?id=82581 Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Cc: [email protected]
2014-08-19Btrfs: don't consider the missing device when allocating new chunksMiao Xie1-14/+2
The original code allocated new chunks by the number of the writable devices and missing devices to make sure that any RAID levels on a degraded FS continue to be honored, but it introduced a problem that it stopped us to allocating new chunks, the steps to reproduce is following: # mkfs.btrfs -m raid1 -d raid1 -f <dev0> <dev1> # mkfs.btrfs -f <dev1> //Removing <dev1> from the original fs # mount -o degraded <dev0> <mnt> # dd if=/dev/null of=<mnt>/tmpfile bs=1M It is because we allocate new chunks only on the writable devices, if we take the number of missing devices into account, and want to allocate new chunks with higher RAID level, we will fail becaue we don't have enough writable device. Fix it by ignoring the number of missing devices when allocating new chunks. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: Fix wrong device size when we are resizing the deviceMiao Xie2-2/+3
total_bytes of device is just a in-memory variant which is used to record the size of the device, and it might be changed before we resize a device, if the resize operation fails, it will be fallbacked. But some code used it to update on-disk metadata of the device, it would cause the problem that on-disk metadata of the devices was not consistent. We should use the other variant named disk_total_bytes to update the on-disk metadata of device, because that variant is updated only when the resize operation is successful. Fix it. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: don't write any data into a readonly device when scrubMiao Xie1-0/+11
We should not write data into a readonly device especially seed device when doing scrub, skip those devices. Signed-off-by: Miao Xie <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: Fix the problem that the replace destroys the seed filesystemMiao Xie1-2/+6
The seed filesystem was destroyed by the device replace, the reproduce method is: # mkfs.btrfs -f <dev0> # btrfstune -S 1 <dev0> # mount <dev0> <mnt> # btrfs device add <dev1> <mnt> # umount <mnt> # mount <dev1> <mnt> # btrfs replace start -f <dev0> <dev2> <mnt> # umount <mnt> # mount <dev0> <mnt> It is because we erase the super block on the seed device. It is wrong, we should not change anything on the seed device. Signed-off-by: Miao Xie <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19btrfs: Return right extent when fiemap gives unaligned offset and len.Qu Wenruo1-2/+2
When page aligned start and len passed to extent_fiemap(), the result is good, but when start and len is not aligned, e.g. start = 1 and len = 4095 is passed to extent_fiemap(), it returns no extent. The problem is that start and len is all rounded down which causes the problem. This patch will round down start and round up (start + len) to return right extent. Reported-by: Chandan Rajendra <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: fix wrong extent mapping for DirectIOWang Shilong1-0/+2
btrfs_next_leaf() will use current leaf's last key to search and then return a bigger one. So it may still return a file extent item that is smaller than expected value and we will get an overflow here for @em->len. This is easy to reproduce for Btrfs Direct writting, it did not cause any problem, because writting will re-insert right mapping later. However, by hacking code to make DIO support compression, wrong extent mapping is kept and it encounter merging failure(EEXIST) quickly. Fix this problem by looping to find next file extent item that is bigger than @start or we could not find anything more. Signed-off-by: Wang Shilong <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: fix wrong write range for filemap_fdatawrite_range()Wang Shilong1-1/+2
filemap_fdatawrite_range() expect the third arg to be @end not @len, fix it. Signed-off-by: Wang Shilong <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19Btrfs: fix wrong missing device counter decreaseMiao Xie1-1/+1
The missing devices are accounted by its own fs device, for example the missing devices in seed filesystem will be accounted by the fs device of the seed filesystem, not by the new filesystem which is based on the seed filesystem, so when we remove the missing device in the seed filesystem, we should decrease the counter of its own fs device. Fix it. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19MIPS: NL: Fix nlm_xlp_defconfig build errorGuenter Roeck1-7/+0
The nlm_xlp_defconfig build fails with ./arch/mips/include/asm/mach-netlogic/topology.h:15:0: error: "topology_core_id" redefined [-Werror] In file included from include/linux/smp.h:59:0, [ ...] from arch/mips/mm/dma-default.c:12: ./arch/mips/include/asm/smp.h:41:0: note: this is the location of the previous definition and similar errors. This is caused by commit bda4584cd943d7 ("MIPS: Support CPU topology files in sysfs") which adds the defines to arch/mips/include/asm/smp.h. Remove the defines from arch/mips/include/asm/mach-netlogic/topology.h as no longer necessary. Signed-off-by: Guenter Roeck <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Andreas Herrmann <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/7513/ Signed-off-by: Ralf Baechle <[email protected]>
2014-08-19drm/radeon: re-enable selective GPUVM flushingAlex Deucher1-3/+1
Now that the PFP and ME synchronization is fixed, we can enable this again reliably. Signed-off-by: Alex Deucher <[email protected]> Tested-by: Michel Dänzer <[email protected]>
2014-08-19drm/radeon: Sync ME and PFP after CP semaphore waits v4Christian König3-0/+36
Fixes lockups due to CP read GPUVM faults when running piglit on Cape Verde. v2 (chk): apply the fix to R600+ as well, on CIK only the GFX CP has a PFP, add more comments to R600 code, enable flushing again v3: (agd5f): only apply to 7xx+. r6xx does not have the packet. v4: (agd5f): split flush change into a separate patch, fix formatting Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Tested-by: Michel Dänzer <[email protected]>
2014-08-19Btrfs: fix unzeroed members in fs_devices when creating a fs from seed fsMiao Xie1-0/+3
We forgot to zero some members in fs_devices when we create new fs_devices from the one of the seed fs. It would cause the problem that we got wrong chunk profile when allocating chunks. Fix it. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-08-19btrfs: check generation as replace duplicates devid+uuidAnand Jain1-1/+21
When FS in unmounted we need to check generation number as well since devid+uuid combination could match with the missing replaced disk when it reappears, and without this patch it might pair with the replaced disk again. device_list_add() function is called in the following threads, mount device option mount argument ioctl BTRFS_IOC_SCAN_DEV (btrfs dev scan) ioctl BTRFS_IOC_DEVICES_READY (btrfs dev ready <dev>) they have been unit tested to work fine with this patch. If the user knows what he is doing and really want to pair with replaced disk (which is not a standard operation), then he should first clear the kernel btrfs device list in the memory by doing the module unload/load and followed with the mount -o device option. Signed-off-by: Anand Jain <[email protected]> Signed-off-by: Wang Shilong <[email protected]> Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>