summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fix-dss-mux' into fixesTony Lindgren2012-03-291-4/+4
|\
| * ARM: OMAP2+: Remove __init from DSI mux functionsTomi Valkeinen2012-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d1589f0912533e6cb2ac8fd6f1feb3d5989fe8cb (ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init) changed DSI muxing functions to __init. This doesn't work, as the muxing functions are used every time a DSI display is enabled or disabled. This patch removes the __inits from DSI mux functions that were accidentally marked as __init, and makes omap4_hdmi_mux_pads __init like it should be. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> [tony@atomide.com: update comments, mark omap4_hdmi_mux_pads __init] Signed-off-by: Tony Lindgren <tony@atomide.com>
* | ARM: OMAP: pm: fix compilation breakGovindraj.R2012-03-292-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the compilation break observed on latest mainline caused by 9f97da78 (Disintegrate asm/system.h for ARM): arch/arm/mach-omap1/pm.c: In function 'omap_pm_prepare': arch/arm/mach-omap1/pm.c:587: error: implicit declaration of function 'disable_hlt' arch/arm/mach-omap1/pm.c: In function 'omap_pm_finish': arch/arm/mach-omap1/pm.c:624: error: implicit declaration of function 'enable_hlt' arch/arm/mach-omap1/pm.c: In function 'omap_pm_init': arch/arm/mach-omap1/pm.c:681: error: 'arm_pm_idle' undeclared (first use in this function) ... arch/arm/mach-omap2/pm.c: In function 'omap_pm_begin': arch/arm/mach-omap2/pm.c:239: error: implicit declaration of function 'disable_hlt' arch/arm/mach-omap2/pm.c: In function 'omap_pm_end': arch/arm/mach-omap2/pm.c:247: error: implicit declaration of function 'enable_hlt' Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> [tony@atomide.com: updated to fix omap1 too] Signed-off-by: Tony Lindgren <tony@atomide.com>
* | Merge tag 'split-asm_system_h-for-linus-20120328' of ↵Linus Torvalds2012-03-291603-7090/+6973Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system Pull "Disintegrate and delete asm/system.h" from David Howells: "Here are a bunch of patches to disintegrate asm/system.h into a set of separate bits to relieve the problem of circular inclusion dependencies. I've built all the working defconfigs from all the arches that I can and made sure that they don't break. The reason for these patches is that I recently encountered a circular dependency problem that came about when I produced some patches to optimise get_order() by rewriting it to use ilog2(). This uses bitops - and on the SH arch asm/bitops.h drags in asm-generic/get_order.h by a circuituous route involving asm/system.h. The main difficulty seems to be asm/system.h. It holds a number of low level bits with no/few dependencies that are commonly used (eg. memory barriers) and a number of bits with more dependencies that aren't used in many places (eg. switch_to()). These patches break asm/system.h up into the following core pieces: (1) asm/barrier.h Move memory barriers here. This already done for MIPS and Alpha. (2) asm/switch_to.h Move switch_to() and related stuff here. (3) asm/exec.h Move arch_align_stack() here. Other process execution related bits could perhaps go here from asm/processor.h. (4) asm/cmpxchg.h Move xchg() and cmpxchg() here as they're full word atomic ops and frequently used by atomic_xchg() and atomic_cmpxchg(). (5) asm/bug.h Move die() and related bits. (6) asm/auxvec.h Move AT_VECTOR_SIZE_ARCH here. Other arch headers are created as needed on a per-arch basis." Fixed up some conflicts from other header file cleanups and moving code around that has happened in the meantime, so David's testing is somewhat weakened by that. We'll find out anything that got broken and fix it.. * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits) Delete all instances of asm/system.h Remove all #inclusions of asm/system.h Add #includes needed to permit the removal of asm/system.h Move all declarations of free_initmem() to linux/mm.h Disintegrate asm/system.h for OpenRISC Split arch_align_stack() out from asm-generic/system.h Split the switch_to() wrapper out of asm-generic/system.h Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h Create asm-generic/barrier.h Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h Disintegrate asm/system.h for Xtensa Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] Disintegrate asm/system.h for Tile Disintegrate asm/system.h for Sparc Disintegrate asm/system.h for SH Disintegrate asm/system.h for Score Disintegrate asm/system.h for S390 Disintegrate asm/system.h for PowerPC Disintegrate asm/system.h for PA-RISC Disintegrate asm/system.h for MN10300 ...
| * | Delete all instances of asm/system.hDavid Howells2012-03-2826-140/+0Star
| | | | | | | | | | | | | | | | | | | | | Delete all instances of asm/system.h as they should be redundant by this point. Signed-off-by: David Howells <dhowells@redhat.com>
| * | Remove all #inclusions of asm/system.hDavid Howells2012-03-28510-512/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
| * | Add #includes needed to permit the removal of asm/system.hDavid Howells2012-03-2810-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asm/system.h is a cause of circular dependency problems because it contains commonly used primitive stuff like barrier definitions and uncommonly used stuff like switch_to() that might require MMU definitions. asm/system.h has been disintegrated by this point on all arches into the following common segments: (1) asm/barrier.h Moved memory barrier definitions here. (2) asm/cmpxchg.h Moved xchg() and cmpxchg() here. #included in asm/atomic.h. (3) asm/bug.h Moved die() and similar here. (4) asm/exec.h Moved arch_align_stack() here. (5) asm/elf.h Moved AT_VECTOR_SIZE_ARCH here. (6) asm/switch_to.h Moved switch_to() here. Signed-off-by: David Howells <dhowells@redhat.com>
| * | Move all declarations of free_initmem() to linux/mm.hDavid Howells2012-03-288-9/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all declarations of free_initmem() to linux/mm.h so that there's only one and it's used by everything. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-c6x-dev@linux-c6x.org cc: microblaze-uclinux@itee.uq.edu.au cc: linux-sh@vger.kernel.org cc: sparclinux@vger.kernel.org cc: x86@kernel.org cc: linux-mm@kvack.org
| * | Disintegrate asm/system.h for OpenRISCDavid Howells2012-03-2810-43/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for OpenRISC. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> cc: linux@lists.openrisc.net
| * | Split arch_align_stack() out from asm-generic/system.hDavid Howells2012-03-282-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | Split arch_align_stack() out from asm-generic/system.h into its own header of asm-generic/exec.h as part of the asm/system.h disintegration. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | Split the switch_to() wrapper out of asm-generic/system.hDavid Howells2012-03-282-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | Split the switch_to() wrapper out of asm-generic/system.h into its own asm-generic/system.h as part of the asm/system.h disintegration. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.hDavid Howells2012-03-282-77/+80
| | | | | | | | | | | | | | | | | | | | | | | | Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h to simplify disintegration of asm/system.h. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | Create asm-generic/barrier.hDavid Howells2012-03-282-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | Create asm-generic/barrier.h and move the barrier definitions from asm-generic/system.h to it. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.hDavid Howells2012-03-283-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h as all arch files that #include the former also #include the latter. See: grep -rl asm-generic/cmpxchg-local[.]h arch/ | sort > b grep -rl asm-generic/cmpxchg[.]h arch/ | sort > a comm a b This simplifies the disintegration of asm-generic/system.h for arches that don't have their own. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | Disintegrate asm/system.h for XtensaDavid Howells2012-03-2815-191/+225
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Xtensa. Signed-off-by: David Howells <dhowells@redhat.com> cc: Chris Zankel <chris@zankel.net>
| * | Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]Guan Xuetao2012-03-2822-173/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Unicore32. (Compilation successful) The implementation details are not changed, but only splitted. BTW, some codestyles are adjusted. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
| * | Disintegrate asm/system.h for TileDavid Howells2012-03-2826-273/+309
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Tile. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
| * | Disintegrate asm/system.h for SparcDavid Howells2012-03-2884-669/+684
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Sparc. Signed-off-by: David Howells <dhowells@redhat.com> cc: sparclinux@vger.kernel.org
| * | Disintegrate asm/system.h for SHDavid Howells2012-03-2856-396/+503
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for SH. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-sh@vger.kernel.org
| * | Disintegrate asm/system.h for ScoreDavid Howells2012-03-288-91/+101
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Score. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> cc: Chen Liqin <liqin.chen@sunplusct.com>
| * | Disintegrate asm/system.h for S390David Howells2012-03-2839-335/+369
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for S390. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-s390@vger.kernel.org
| * | Disintegrate asm/system.h for PowerPCDavid Howells2012-03-28133-701/+687Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for PowerPC. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: linuxppc-dev@lists.ozlabs.org
| * | Disintegrate asm/system.h for PA-RISCDavid Howells2012-03-2822-179/+191
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for PA-RISC. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-parisc@vger.kernel.org
| * | Disintegrate asm/system.h for MN10300David Howells2012-03-2827-229/+226Star
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for MN10300. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-am33-list@redhat.com
| * | Disintegrate asm/system.h for MIPSDavid Howells2012-03-2890-309/+262Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for MIPS. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> cc: linux-mips@linux-mips.org
| * | Disintegrate asm/system.h for MicroblazeDavid Howells2012-03-2817-107/+129
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Microblaze. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> cc: microblaze-uclinux@itee.uq.edu.au
| * | Disintegrate asm/system.h for M68KDavid Howells2012-03-2846-246/+214Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for M68K. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@uclinux.org> cc: linux-m68k@lists.linux-m68k.org
| * | m68k: Fix xchg/cmpxchg to fail to link if given an inappropriate pointerDavid Howells2012-03-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the m68k versions of xchg() and cmpxchg() to fail to link if given an inappropriately sized pointer rather than BUG()'ing at runtime. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@uclinux.org> cc: linux-m68k@lists.linux-m68k.org
| * | Disintegrate asm/system.h for M32RDavid Howells2012-03-2822-382/+420
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for M32R. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-m32r@ml.linux-m32r.org
| * | Disintegrate asm/system.h for IA64David Howells2012-03-2861-249/+233Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for IA64. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Tony Luck <tony.luck@intel.com> cc: linux-ia64@vger.kernel.org
| * | Disintegrate asm/system.h for HexagonDavid Howells2012-03-2810-130/+199
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Hexagon. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Richard Kuo <rkuo@codeaurora.org> cc: linux-hexagon@vger.kernel.org
| * | Disintegrate asm/system.h for H8300David Howells2012-03-2817-152/+158
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for H8300. Signed-off-by: David Howells <dhowells@redhat.com> cc: Yoshinori Sato <ysato@users.sourceforge.jp>
| * | Disintegrate asm/system.h for FRVDavid Howells2012-03-2820-226/+261
| | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for FRV. Signed-off-by: David Howells <dhowells@redhat.com>
| * | Disintegrate asm/system.h for CRISDavid Howells2012-03-2839-119/+127
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for CRIS. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> cc: linux-cris-kernel@axis.com
| * | Disintegrate asm/system.h for C6XDavid Howells2012-03-2817-170/+241
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for C6X. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Mark Salter <msalter@redhat.com> cc: linux-c6x-dev@linux-c6x.org
| * | Disintegrate asm/system.h for AVR32David Howells2012-03-2811-182/+228
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for AVR32. This has not been compiled at all. Signed-off-by: David Howells <dhowells@redhat.com> cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
| * | Disintegrate asm/system.h for ARMDavid Howells2012-03-28170-565/+592
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for ARM. Signed-off-by: David Howells <dhowells@redhat.com> cc: Russell King <linux@arm.linux.org.uk> cc: linux-arm-kernel@lists.infradead.org
| * | ARM: move CP15 definitions to separate header fileRussell King2012-03-2818-84/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid namespace conflicts with drivers over the CP15 definitions by moving CP15 related prototypes and definitions to a private header file. Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> [Tegra] Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com> [EP93xx] Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com>
| * | Disintegrate asm/system.h for AlphaDavid Howells2012-03-2865-402/+388Star
| | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for Alpha. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-alpha@vger.kernel.org
| * | Disintegrate asm/system.h for X86David Howells2012-03-2850-562/+554Star
| | | | | | | | | | | | | | | | | | | | | | | | Disintegrate asm/system.h for X86. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com> cc: x86@kernel.org
| * | SELinux: selinux/xfrm.h needs net/flow.hDavid Howells2012-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | selinux/xfrm.h needs to #include net/flow.h or else suffer: In file included from security/selinux/ss/services.c:69:0: security/selinux/include/xfrm.h: In function 'selinux_xfrm_notify_policyload': security/selinux/include/xfrm.h:53:14: error: 'flow_cache_genid' undeclared (first use in this function) security/selinux/include/xfrm.h:53:14: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: David Howells <dhowells@redhat.com>
| * | ARM: Fix missing linux/types.h #inclusion in asm/hardware/iop3xx.hDavid Howells2012-03-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/arm/include/asm/hardware/iop3xx.h needs to include linux/types.h to avoid the following errors: In file included from arch/arm/plat-iop/restart.c:10:0: /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:239:1: error: unknown type name 'u32' /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h: In function 'read_tmr0': /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:241:2: error: unknown type name 'u32' /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h: At top level: /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:246:31: error: unknown type name 'u32' ... Signed-off-by: David Howells <dhowells@redhat.com>
* | | Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds2012-03-2917-76/+317
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull XFS update (part 2) from Ben Myers: "Fixes for tracing of xfs_name strings, flag handling in open_by_handle, a log space hang with freeze/unfreeze, fstrim offset calculations, a section mismatch with xfs_qm_exit, an oops in xlog_recover_process_iunlinks, and a deadlock in xfs_rtfree_extent. There are also additional trace points for attributes, and the addition of a workqueue for allocation to work around kernel stack size limitations." * 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: add lots of attribute trace points xfs: Fix oops on IO error during xlog_recover_process_iunlinks() xfs: fix fstrim offset calculations xfs: Account log unmount transaction correctly xfs: don't cache inodes read through bulkstat xfs: trace xfs_name strings correctly xfs: introduce an allocation workqueue xfs: Fix open flag handling in open_by_handle code xfs: fix deadlock in xfs_rtfree_extent fs: xfs: fix section mismatch in linux-next
| * | | xfs: add lots of attribute trace pointsDave Chinner2012-03-284-6/+144
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: Fix oops on IO error during xlog_recover_process_iunlinks()Jan Kara2012-03-271-22/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an IO error happens during inode deletion run from xlog_recover_process_iunlinks() filesystem gets shutdown. Thus any subsequent attempt to read buffers fails. Code in xlog_recover_process_iunlinks() does not count with the fact that read of a buffer which was read a while ago can really fail which results in the oops on agi = XFS_BUF_TO_AGI(agibp); Fix the problem by cleaning up the buffer handling in xlog_recover_process_iunlinks() as suggested by Dave Chinner. We release buffer lock but keep buffer reference to AG buffer. That is enough for buffer to stay pinned in memory and we don't have to call xfs_read_agi() all the time. CC: stable@kernel.org Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: fix fstrim offset calculationsDave Chinner2012-03-273-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xfs_ioc_fstrim() doesn't treat the incoming offset and length correctly. It treats them as a filesystem block address, rather than a disk address. This is wrong because the range passed in is a linear representation, while the filesystem block address notation is a sparse representation. Hence we cannot convert the range direct to filesystem block units and then use that for calculating the range to trim. While this sounds dangerous, the problem is limited to calculating what AGs need to be trimmed. The code that calcuates the actual ranges to trim gets the right result (i.e. only ever discards free space), even though it uses the wrong ranges to limit what is trimmed. Hence this is not a bug that endangers user data. Fix this by treating the range as a disk address range and use the appropriate functions to convert the range into the desired formats for calculations. Further, fix the first free extent lookup (the longest) to actually find the largest free extent. Currently this lookup uses a <= lookup, which results in finding the extent to the left of the largest because we can never get an exact match on the largest extent. This is due to the fact that while we know it's size, we don't know it's location and so the exact match fails and we move one record to the left to get the next largest extent. Instead, use a >= search so that the lookup returns the largest extent regardless of the fact we don't get an exact match on it. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: Account log unmount transaction correctlyDave Chinner2012-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been a few reports of this warning appearing recently: XFS (dm-4): xlog_space_left: head behind tail tail_cycle = 129, tail_bytes = 20163072 GH cycle = 129, GH bytes = 20162880 The common cause appears to be lots of freeze and unfreeze cycles, and the output from the warnings indicates that we are leaking around 8 bytes of log space per freeze/unfreeze cycle. When we freeze the filesystem, we write an unmount record and that uses xlog_write directly - a special type of transaction, effectively. What it doesn't do, however, is correctly account for the log space it uses. The unmount record writes an 8 byte structure with a special magic number into the log, and the space this consumes is not accounted for in the log ticket tracking the operation. Hence we leak 8 bytes every unmount record that is written. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: don't cache inodes read through bulkstatDave Chinner2012-03-274-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we read inodes via bulkstat, we generally only read them once and then throw them away - they never get used again. If we retain them in cache, then it simply causes the working set of inodes and other cached items to be reclaimed just so the inode cache can grow. Avoid this problem by marking inodes read by bulkstat not to be cached and check this flag in .drop_inode to determine whether the inode should be added to the VFS LRU or not. If the inode lookup hits an already cached inode, then don't set the flag. If the inode lookup hits an inode marked with no cache flag, remove the flag and allow it to be cached once the current reference goes away. Inodes marked as not cached will get cleaned up by the background inode reclaim or via memory pressure, so they will still generate some short term cache pressure. They will, however, be reclaimed much sooner and in preference to cache hot inodes. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: trace xfs_name strings correctlyChristoph Hellwig2012-03-261-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strings store in an xfs_name structure are often not NUL terminated, print them using the correct printf specifiers that make use of the string length store in the xfs_name structure. Reported-by: Brian Candler <B.Candler@pobox.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
| * | | xfs: introduce an allocation workqueueDave Chinner2012-03-223-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have significant issues with the amount of stack that allocation in XFS uses, especially in the writeback path. We can easily consume 4k of stack between mapping the page, manipulating the bmap btree and allocating blocks from the free list. Not to mention btree block readahead and other functionality that issues IO in the allocation path. As a result, we can no longer fit allocation in the writeback path in the stack space provided on x86_64. To alleviate this problem, introduce an allocation workqueue and move all allocations to a seperate context. This can be easily added as an interposing layer into xfs_alloc_vextent(), which takes a single argument structure and does not return until the allocation is complete or has failed. To do this, add a work structure and a completion to the allocation args structure. This allows xfs_alloc_vextent to queue the args onto the workqueue and wait for it to be completed by the worker. This can be done completely transparently to the caller. The worker function needs to ensure that it sets and clears the PF_TRANS flag appropriately as it is being run in an active transaction context. Work can also be queued in a memory reclaim context, so a rescuer is needed for the workqueue. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>