aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-25[GFS2] Add writepages for GFS2 jdataSteven Whitehouse2-9/+206
This patch resolves a lock ordering issue where we had been getting a transaction lock in the wrong order with respect to the page lock. By using writepages rather than just writepage, it is then possible to start a transaction before locking the page, and thus matching the locking order elsewhere in the code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Split gfs2_writepage into three casesSteven Whitehouse2-28/+101
This patch splits gfs2_writepage into separate functions for each of the three cases: writeback, ordered and journalled. As a result it becomes a lot easier to see what each one is doing. The common code is moved into gfs2_writepage_common. This fixes a performance bug where we were doing more work than strictly required in the ordered write case. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Introduce gfs2_set_aops()Steven Whitehouse5-31/+72
Just like ext3 we now have three sets of address space operations to cover the cases of writeback, ordered and journalled data writes. This means that the individual operations can now become less complicated as we are able to remove some of the tests for file data mode from the code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Add gfs2_is_writeback()Steven Whitehouse4-11/+13
This adds a function "gfs2_is_writeback()" along the lines of the existing "gfs2_is_jdata()" in order to clean up the code and make the various tests for the inode mode more obvious. It also fixes the PageChecked() logic where we were resetting the flag too early in the case of an error path. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Remove unused field in struct gfs2_inodeSteven Whitehouse2-2/+0
Removes a field that is not used. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Remove useless i_cache from inodesSteven Whitehouse10-110/+19
The i_cache was designed to keep references to the indirect blocks used during block mapping so that they didn't have to be looked up continually. The idea failed because there are too many places where the i_cache needs to be freed, and this has in the past been the cause of many bugs. In addition there was no performance benefit being gained since the disk blocks in question were cached anyway. So this patch removes it in order to simplify the code to prepare for other changes which would otherwise have had to add further support for this feature. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Use ->page_mkwrite() for mmap()Steven Whitehouse7-251/+131
This cleans up the mmap() code path for GFS2 by implementing the page_mkwrite function for GFS2. We are thus able to use the generic filemap_fault function for our ->fault() implementation. This now means that shared writable mappings will be much more efficiently shared across the cluster if there is a reasonable proportion of read activity (the greater proportion, the better). As a side effect, it also reduces the size of the code, removes special cases from readpage and readpages, and makes the code path easier to follow. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[GFS2] Clean up internal read functionSteven Whitehouse8-126/+111
As requested by Christoph, this patch cleans up GFS2's internal read function so that it no longer uses the do_generic_mapping_read function. This function is obsolete and GFS2 is the last user of it. As a side effect the internal read code gets smaller and easier to read and gfs2_readpage is split into two. One function has the locking and the other function has the rest of the logic. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Christoph Hellwig <hch@infradead.org>
2008-01-25[GFS2] Handle multiple glock demote requestsWendy Cheng2-1/+16
Fix a race condition where multiple glock demote requests are sent to a node back-to-back. This patch does a check inside handle_callback() to see whether a demote request is in progress. If true, it sets a flag to make sure run_queue() will loop again to handle the new request, instead of erronously setting gl_demote_state to a different state. Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25[AVR32] extint: Set initial irq type to low levelHaavard Skinnemoen1-3/+3
David Brownell pointed out a mismatch in the avr32 extint code: > I noticed a small glitch that's not fixed by this patch: the > initial type is falling edge, but IRQ_TYPE_NONE is mapped to > IRQ_TYPE_LEVEL_LOW. Potentially surprising. Fix it by setting the initial type (and handler) to low level, matching the meaning of IRQ_TYPE_NONE. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] extint: change set_irq_type() handlingDavid Brownell1-11/+7
Update the AVR32 EIC code to use the new __set_irq_handler_unlocked() call, getting rid of one more instance of this widespread problem. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] NMI debuggingHaavard Skinnemoen10-10/+166
Change the NMI handler to use the die notifier chain to signal anyone who cares. Add a simple "nmi debugger" which hooks into this chain and that may dump registers, task state, etc. when it happens. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] constify function pointer tablesJan Engelhardt2-2/+2
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] ATNGW100: Update defconfigHaavard Skinnemoen1-151/+262
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] ATSTK1002: Update defconfigHaavard Skinnemoen1-150/+483
Turn off a few useless options, enable a few useful ones and enable quite a few new drivers. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Kconfig: Choose daughterboard instead of CPUHaavard Skinnemoen2-24/+28
Remove the CPU selection menu and instead let it be selected by the board or daughterboard option. Add daughterboard selection for ATSTK1000 (this was previously determined based on CPU type.) Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Add support for ATSTK1003 and ATSTK1004Haavard Skinnemoen8-20/+1975
ATSTK1003 and ATSTK1004 are CPU daughterboards for ATSTK1000 featuring the AT32AP7001 and AT32AP7002 CPUs, respectively. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Clean up external DAC setup codeHaavard Skinnemoen2-16/+17
Reduce the ridiculous amount of #ifdef clutter in atstk1002.c a bit by moving all the extdac stuff into its own function and providing an empty stub for the case when it isn't wanted. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] ATSTK1000: Move gpio-leds setup to setup.cHaavard Skinnemoen4-66/+72
There may be other boards than STK1002 that want to use the leds on STK1000. Move it to stk1000 common code to make it easier to reuse. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Add support for AT32AP7001 and AT32AP7002Haavard Skinnemoen12-28/+58
These are derivatives of the AT32AP7000 chip, which means that most of the code stays the same. Rename a few files, functions, definitions and config symbols to reflect that they apply to all AP700x chips, and exclude some platform devices from chips where they aren't present. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Provide more CPU information in /proc/cpuinfo and dmesgHaavard Skinnemoen2-26/+82
Add the following fields to /proc/cpuinfo: * chip type and revision (from the JTAG chip id) * cpu MHz (from clk_get_rate()) * features (from the CONFIG0 register) Also rename "cpu family" to "cpu arch" and "cpu type" to "cpu core" to remove some ambiguity. Show chip type and revision at bootup, and clarify that the other kinds of IDs that we're already printing are for the cpu core and architecture. Rename "AP7000" to "AP7" since that's the name of the core. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Oprofile supportHaavard Skinnemoen4-0/+247
This adds the necessary architecture code to run oprofile on AVR32 using the performance counters documented by the AVR32 Architecture Manual. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Philippe Elie <phil.el@wanadoo.fr>
2008-01-25[AVR32] Include instrumentation menuHaavard Skinnemoen2-10/+2
Remove KPROBES option from Kconfig.debug and include kernel/Kconfig.instrumentation. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25Disable VGA text console for AVR32 architectureHans-Christian Egtvedt1-1/+1
This patch disables the VGA text console for AVR32 architecture since it does not provide the vga.h include file. AVR32 users should use framebuffer console instead if they need a console on an attached display. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Enable debugging only when neededHaavard Skinnemoen8-13/+186
Keep track of processes being debugged (including the kernel itself) and turn the OCD system on and off as appropriate. Since enabling debugging turns off some optimizations in the CPU core, this fixes the issue that enabling KProbes support or simply running a program under gdbserver will reduce system performance significantly until the next reboot. The CPU performance will still be reduced for all processes while a process is being debugged, but this is a lot better than reducing the performance forever. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25ptrace: Call arch_ptrace_attach() when request=PTRACE_TRACEMEHaavard Skinnemoen1-0/+2
arch_ptrace_attach() is a hook that allows the architecture to do book-keeping after a ptrace attach. This patch adds a call to this hook when handling a PTRACE_TRACEME request as well. Currently only one architecture, m32r, implements this hook. When called, it initializes a number of debug trap slots in the ptraced task's thread struct, and it looks to me like this is the right thing to do after a PTRACE_TRACEME request as well, not only after PTRACE_ATTACH. Please correct me if I'm wrong. I want to use this hook on AVR32 to turn the debugging hardware on when a process is actually being debugged and keep it off otherwise. To be able to do this, I need to intercept PTRACE_TRACEME and PTRACE_ATTACH, as well as PTRACE_DETACH and thread exit. The latter two can be handled by existing hooks. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Remove redundant try_to_freeze() call from do_signal()Haavard Skinnemoen1-7/+0
get_signal_to_deliver() will call try_to_freeze(), so there's no point in do_signal() doing it as well. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Drop GFP_COMP for DMA memory allocationsHaavard Skinnemoen1-0/+7
dma_alloc_coherent wants to split pages after allocation in order to reduce the memory footprint. This does not work well with GFP_COMP pages, so drop this flag before allocation. This patch was forward-ported from BSP 2.0 Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-24Driver core: coding style fixesGreg Kroah-Hartman8-583/+545
Fix up a number of coding style issues in the drivers/base/ directory that have annoyed me over the years. checkpatch.pl is now very happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: fix coding style issues in kobject c filesGreg Kroah-Hartman2-79/+67
Clean up the kobject.c and kobject_uevent.c files to follow the proper coding style rules. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: fix coding style issues in kobject.hGreg Kroah-Hartman1-33/+34
Finally clean up the odd spaces and other mess in kobject.h Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver core: fix coding style issues in device.hGreg Kroah-Hartman1-138/+145
Finally clean up the odd spaces and other mess in device.h Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24spi: use class iteration apiDave Young1-11/+15
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24scsi: use class iteration apiDave Young1-11/+13
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24rtc: use class iteration apiDave Young1-10/+12
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24power supply : use class iteration apiDave Young2-83/+107
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24ieee1394: use class iteration apiDave Young1-138/+176
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver Core: add class iteration apiDave Young2-2/+140
Add the following class iteration functions for driver use: class_for_each_device class_find_device class_for_each_child class_find_child Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver core: Cleanup get_device_parent() in device_add() and device_move()Cornelia Huck1-15/+14
Make setup_parent() void as get_device_parent() will always return either a valid kobject or NULL. Introduce cleanup_glue_dir() to drop reference grabbed on "glue" directory by get_device_parent(). Use it for cleanup in device_move() and device_add() on errors. This should fix the refcounting problem reported in http://marc.info/?l=linux-kernel&m=120052487909200&w=2 Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Dave Young <hidave.darkstar@gmail.com> Cc: Gabor Gombas <gombasg@sztaki.hu> Cc: Tejun Heo <htejun@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: David Miller <davem@davemloft.net> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24UIO: constify function pointer tablesJan Engelhardt1-2/+2
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver Core: constify the name passed to platform_device_register_simpleStephen Rothwell2-2/+2
This name is just passed to platform_device_alloc which has its parameter declared const. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24driver core: fix build with SYSFS=nRandy Dunlap2-1/+3
When SYSFS=n and MODULES=y, build ends with: linux-2.6.24-rc6-mm1/drivers/base/module.c: In function 'module_add_driver': linux-2.6.24-rc6-mm1/drivers/base/module.c:49: error: 'module_kset' undeclared (first use in this function) make[3]: *** [drivers/base/module.o] Error 1 Below is one possible fix. Build-tested with all 4 config combinations of SYSFS & MODULES. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24sysfs: make SYSFS_DEPRECATED depend on SYSFSRandy Dunlap1-0/+1
Make SYSFS_DEPRECATED depend on SYSFS since files that check CONFIG_SYSFS_DEPRECATED don't check for CONFIG_SYSFS first. Also don't prompt user about SYSFS_DEPRECATED if SYSFS=n. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __initDenis Cheng3-10/+1
LIST_HEAD has been widely used, so switch to this simpler method. Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: add sample code for how to use ksets/ktypes/kobjectsGreg Kroah-Hartman2-1/+279
This is a more complex example showing how to create a kset and a ktype and some default attributes for a group of kobjects. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: add sample code for how to use kobjects in a simple manner.Greg Kroah-Hartman4-1/+149
This is a simple kobject module, showing how to use kobj_attributes in basic and more complex ways. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>