aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/moxa-smartio (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-26ide: fix host drivers depending on ide_generic to probe for interfaces (take 2)Bartlomiej Zolnierkiewicz13-16/+70
* Add mpc8xx_ide_probe() to mpc8xx.c and call it from probe_for_hwifs(). * Convert ide_arm, ide-cris, ide-h8300, ide-pnp, buddha, falconide, gayle, macide, q40ide, cmd640 and mpc8xx host drivers to use ide_device_add(). This removes dependency on ide_generic for these drivers so update ide/Kconfig accordingly. v2: * ide_arm build fix (s/ide_device_idx/ide_device_add/) (Thanks to Christoph Lameter <clameter@sgi.com> for reporting the problem). Cc: Mikael Starvik <starvik@axis.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26cmd640: fix dependency on IDE_GENERICBartlomiej Zolnierkiewicz1-0/+1
Make BLK_DEV_CMD640 select IDE_GENERIC. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: move ide_arm_init() call from init_ide_data() to ide_init()Bartlomiej Zolnierkiewicz2-4/+3
* Remove ide_init_port_data() call from ide_arm_init() and move ide_arm_init() call from init_ide_data() to ide_init(). This patch is a preparation for the future changes (and as a side-effect makes obsolete "idex=io[,ctl[,irq]]" kernel parameters work for ide_arm). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: drop 'initializing' argument from ide_register_hw()Bartlomiej Zolnierkiewicz15-67/+86
* Rename init_hwif_data() to ide_init_port_data() and export it. * For all users of ide_register_hw() with 'initializing' argument set hwif->present and hwif->hold are always zero so convert these host drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw() instead (also no need for init_hwif_default() call since the setup done by it gets over-ridden by ide_init_port_hw() call). * Drop 'initializing' argument from ide_register_hw(). Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: add ide_init_port_hw() helperBartlomiej Zolnierkiewicz6-66/+81
* Add ide_init_port_hw() helper. * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports() and use ide_init_port_hw(). * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports() and use ide_init_port_hw(). * sgiioc4.c: use ide_init_port_hw(). * pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(), setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw() in pmac_ide_setup_device(). This patch is a preparation for the future changes in the IDE probing code. There should be no functionality changes caused by this patch. Cc: Russell King <rmk@arm.linux.org.uk> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Jeremy Higdon <jeremy@sgi.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26sgiioc4: always init hwif->io_portsBartlomiej Zolnierkiewicz1-9/+6
'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true. Cc: Jeremy Higdon <jeremy@sgi.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: Fix build break caused by "ide: remove ideprobe_init()"Olof Johansson2-2/+2
Fix build break of powerpc holly_defconfig: In file included from arch/powerpc/platforms/embedded6xx/holly.c:24: include/linux/ide.h:1206: error: 'CONFIG_IDE_MAX_HWIFS' undeclared here (not in a function) There's no need to have a sized array in the prototype, might as well turn it into a pointer. It could probably be argued that large parts of the include file can be covered under #ifdef CONFIG_IDE, but that's a larger undertaking. Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: remove ideprobe_init()Bartlomiej Zolnierkiewicz3-41/+24
* Rename ide_device_add() to ide_device_add_all() and make it accept 'u8 idx[MAX_HWIFS]' instead of 'u8 idx[4]' as an argument. * Add ide_device_add() wrapper for ide_device_add_all(). * Convert ide_generic_init() to use ide_device_add_all(). * Remove no longer needed ideprobe_init(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: add hwif->chipset fixup to ide_device_add()Bartlomiej Zolnierkiewicz1-1/+5
Add hwif->chipset fixup identical to the one in ideprobe_init() to ide_device_add(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26swarm: set hwif->chipsetBartlomiej Zolnierkiewicz1-0/+1
hwif->chipset should be set if the hwif is claimed by host driver. Cc: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26rapide: set hwif->chipsetBartlomiej Zolnierkiewicz1-0/+1
hwif->chipset should be set if the hwif is claimed by host driver. Cc: Russell King <rmk@arm.linux.org.uk> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: fix probing for hosts with serialized or IRQ sharing interfacesBartlomiej Zolnierkiewicz1-2/+14
After hwif_register_devices() IDE devices are ready to be used so the way in which ide_device_add() works currently is racy for hosts with serialized / IRQ sharing interfaces. Fix ide_device_add() by looping over interfaces for probe_hwif(), hwif_init() and hwif_register_devices() operations. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: kill probe_hwif_init()Bartlomiej Zolnierkiewicz1-21/+17
There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: don't try to unregister interfaces if 'initializing' in ide_register_hw()Bartlomiej Zolnierkiewicz1-2/+10
Host drivers using ide_register_hw() and 'initializing == 1': * ide-pnp - depends on ISA * ide_arm - ARM arch specific - initialized before all other host drivers * ide-cris - CRIS arch specific => IDE_ARCH_OBSOLETE_INIT is not defined - broken * ide-h8300 - H8300 arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI * buddha/q40/gayle/macide/falconide - M68K arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI Since the only host drivers which probe interfaces before the above ones are: * ali14xx/dtc2278/ht6560b/qd65xx/umc8672 - depend on ISA - require IDE_ARCH_OBSOLETE_INIT=y to work * PCI ones - depend on PCI don't try to unregister interfaces if 'initializing == 1' in ide_register_hw() (it is possible that built-in host drivers will claim all IDE interfaces but later ide-pnp host driver will try to unregister them - this change fixes it). Also skip hwif->hold check if 'initializing == 1' since it is set only by: * pmac - PPC && PMAC specific => no ISA * au1xxx-ide - MIPS && SOC_AU1200 specific => no ISA and use ide_find_port() helper to find free ide_hwifs[] slot. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: merge ->fixup and ->quirkproc methodsBartlomiej Zolnierkiewicz9-68/+57
* Assign drive->quirk_list in ->quirkproc implementations: - hpt366.c::hpt3xx_quirkproc() - pdc202xx_new.c::pdcnew_quirkproc() - pdc202xx_old.c::pdc202xx_quirkproc() * Make ->quirkproc void. * Move calling ->quirkproc from do_identify() to probe_hwif(). * Convert it821x_fixups() to it821x_quirkproc() in it821x.c. * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove no longer needed drive->present check from is_dev_seagate_sata(). * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif' as an argument. Then convert ide_register_hw() to accept 'quirkproc' argument instead of 'fixup' one. * Remove no longer needed ->fixup method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined)Bartlomiej Zolnierkiewicz2-6/+5
* Dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined). * Remove no longer needed DEBUG code from __ide_do_rw_disk(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: merge ->dma_host_{on,off} methods into ->dma_host_set methodBartlomiej Zolnierkiewicz14-105/+44
Merge ->dma_host_{on,off} methods into ->dma_host_set method which takes 'int on' argument. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: move drive->using_dma check to callers of ->dma_host_on methodBartlomiej Zolnierkiewicz4-5/+5
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26atiixp: remove ->dma_host_on and ->dma_host_off methodsBartlomiej Zolnierkiewicz1-53/+18
* Enable/disable UDMA in atiixp_set_dma_mode(). * Remove no longer needed atiixp_dma_host_{on,off}() and save_mdma_mode[]. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide-cris: fix DMA methodsBartlomiej Zolnierkiewicz1-11/+7
* Rename cris_dma_{on,off}() to cris_dma_host_{on,off}(). * Remove no longer needed ->dma_off_quietly (IDE core has the needed code now). * Make cris_dma_host_on() void. I left fixing ide-cris after "kill dma_on/dma_off_quietly() methods" patch because: * Currently this driver is broken: cris_dma_on() (returns 'int') is assigned to hwif->dma_host_on (returns 'void') so the driver won't build. * ->ide_dma_on method was missing so the driver OOPS-es on attempt to enable DMA. * drive->using_dma was never set/cleared so DMA wouldn't be used anyway. Unfortunately it seems that ide-cris stays broken even after this patch: * V10: <asm/arch-v10/ide.h> needs fixing - ide_init_default_hwifs() should be removed (IDE core no longer uses it) - same for ide_init_hwif_ports() and ide_default_{irq,io_base}() (they shouldn't be needed for ide-cris host driver) * V32: I'm unable to find a place which defines ETRAX_ARCH_V32 but I'm leaving fixing this to CRIS gurus. :) Cc: Mikael Starvik <starvik@axis.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: remove ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_tBartlomiej Zolnierkiewicz11-86/+28
* Make ide_dma_off_quietly() and __ide_dma_on() always available. * Drop "__" prefix from __ide_dma_on(). * Check for presence of ->dma_host_on instead of ->ide_dma_on. * Convert all users of ->ide_dma_on and ->dma_off_quietly methods to use ide_dma_on() and ide_dma_off_quietly() instead. * Remove no longer needed ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t. * Make ide_dma_on() void. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26au1xxx-ide: add ide_toggle_bounce() callsBartlomiej Zolnierkiewicz1-0/+2
Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Since there is no PCI device there should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26icside: add ide_toggle_bounce() callsBartlomiej Zolnierkiewicz1-0/+2
Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Since there is no PCI device there should be no functionality changes caused by this patch. Cc: Russell King <rmk@arm.linux.org.uk> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26sgiioc4: add ide_toggle_bounce() callsBartlomiej Zolnierkiewicz1-0/+2
Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Tested on Altix by Jeremy. Acked-by: Jeremy Higdon <jeremy@sgi.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26cy82c693: add ->set_dma_mode methodBartlomiej Zolnierkiewicz3-57/+24
* Fix SWDMA/MWDMA masks in cy82c693_chipset. * Add IDE_HFLAG_CY82C693 host flag and use it in ide_tune_dma() to check whether the DMA should be enabled even if ide_max_dma_mode() fails. * Convert cy82c693_dma_enable() to become cy82c693_set_dma_mode() and remove no longer needed cy82c693_ide_dma_on(). Then set IDE_HFLAG_CY82C693 instead of IDE_HFLAG_TRUST_BIOS_FOR_DMA in cy82c693_chipset. * Bump driver version. As a result of this patch cy82c693 driver will configure and use DMA on all SWDMA0-2 and MWDMA0-2 capable ATA devices instead of relying on BIOS. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26cy82c693: correct DMA modes clippingBartlomiej Zolnierkiewicz1-6/+6
* Mask device DMA masks by ATA_{S,M}WDMA2 in cy82c693_ide_dma_on(). * Remove clipping of DMA modes by id->tDMA in cy82c693_dma_enable(): - id->tDMA may not be defined on newer devices - id->vendor6/id->tDMA word is in LE endianness (cy82c693 seems to be Alpha specific though) * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: (hopefully) fix VDMA for CS5520Bartlomiej Zolnierkiewicz3-16/+25
* Set the correct hwif->dma_base for the second channel in ide_get_or_set_dma_base(). * Remove DMA enable code from cs5520_set_pio_mode(), this can be handled by the generic ->dma_host_on method now. * Add VDMA check to ide_config_drive_speed(). * drive->using_dma was never enabled since cs5520 host driver's ->ide_dma_on method overrided the generic ->ide_dma_on (so __ide_dma_on() was never called, drive->using_dma was never set and VDMA was never used since it depends on drive->using_dma). Fix it by using ->dma_host_on method instead of ->ide_dma_on (also add matching ->dma_host_off method). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide-disk: add idedisk_set_doorlock() helperBartlomiej Zolnierkiewicz1-10/+13
There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26serverworks: cleanup ->set_dma_mode methodBartlomiej Zolnierkiewicz1-19/+6
IDE core guarantees that ->set_dma_mode will be called only for DMA modes set in SWDMA/MWDMA/UDMA masks. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26sl82c105: remove no longer needed ->selectproc methodBartlomiej Zolnierkiewicz1-31/+3
* Program register 0x40 in sl82c105_resetproc(). * Remove no longer needed sl82c105_selectproc() and pci_set_drvdata() calls. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26sl82c105: program DMA/PIO timings in ->dma_start/->ide_dma_endBartlomiej Zolnierkiewicz1-40/+15
* Program DMA timings in sl82c105_dma_start() (->dma_start method) before starting DMA transfer. * Add sl82c105_dma_end() (->ide_dma_end method) to switch back to PIO timings when DMA transfer is complete. * In sl82c105_set_pio_mode() program timings regardless of ->using_dma setting and in sl82c105_set_dma_mode() only cache the new timings. * Remove no longer needed sl82c105_{ide_dma_on,off_quietly}(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ocfs2: clean up bh null checksMark Fasheh2-15/+8
If we know a buffer_head is non-null, then brelse() is unnecessary and put_bh() can be used instead. Also, an explicit check for NULL is unnecessary when using brelse(). This patch only covers buffer_head_io.c and resize.c, which have recently added code which exhibits this problem. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: document access rules for blocked_lock_listMark Fasheh1-0/+6
ocfs2_super->blocked_lock_list and ocfs2_super->blocked_lock_count have some usage restrictions which aren't immediately obvious to anyone reading the code. It's a good idea to document this so that we avoid making costly mistakes in the future. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25configfs: file.c fix possible recursive lockingJoonwoo Park1-1/+1
configfs_register_subsystem() with default_groups triggers recursive locking. it seems that mutex_lock_nested is needed. ============================================= [ INFO: possible recursive locking detected ] 2.6.24-rc6 #145 --------------------------------------------- swapper/1 is trying to acquire lock: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40c9a9e>] configfs_add_file+0x2e/0x70 but task is already holding lock: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca985>] configfs_register_subsystem+0x55/0x130 other info that might help us debug this: 1 lock held by swapper/1: #0: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca985>] configfs_register_subsystem+0x55/0x130 stack backtrace: Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #145 [<c40053ba>] show_trace_log_lvl+0x1a/0x30 [<c4005e82>] show_trace+0x12/0x20 [<c400687e>] dump_stack+0x6e/0x80 [<c404ec72>] __lock_acquire+0xe62/0x1120 [<c404efb2>] lock_acquire+0x82/0xa0 [<c43fda88>] mutex_lock_nested+0x98/0x2e0 [<c40c9a9e>] configfs_add_file+0x2e/0x70 [<c40c9b0c>] configfs_create_file+0x2c/0x40 [<c40ca639>] configfs_attach_item+0x139/0x220 [<c40ca734>] configfs_attach_group+0x14/0x140 [<c40ca7e9>] configfs_attach_group+0xc9/0x140 [<c40ca9f6>] configfs_register_subsystem+0xc6/0x130 [<c45c8186>] init_netconsole+0x2b6/0x300 [<c45a75f2>] kernel_init+0x142/0x320 [<c4004fb3>] kernel_thread_helper+0x7/0x14 ======================= Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25configfs: dir.c fix possible recursive lockingJoonwoo Park1-2/+3
configfs_register_subsystem() with default_groups triggers recursive locking. it seems that mutex_lock_nested is needed. ============================================= [ INFO: possible recursive locking detected ] 2.6.24-rc6 #141 --------------------------------------------- swapper/1 is trying to acquire lock: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca76f>] configfs_attach_group+0x4f/0x190 but task is already holding lock: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca9d5>] configfs_register_subsystem+0x55/0x130 other info that might help us debug this: 1 lock held by swapper/1: #0: (&sb->s_type->i_mutex_key#3){--..}, at: [<c40ca9d5>] configfs_register_subsystem+0x55/0x130 stack backtrace: Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #141 [<c40053ba>] show_trace_log_lvl+0x1a/0x30 [<c4005e82>] show_trace+0x12/0x20 [<c400687e>] dump_stack+0x6e/0x80 [<c404ec72>] __lock_acquire+0xe62/0x1120 [<c404efb2>] lock_acquire+0x82/0xa0 [<c43fdad8>] mutex_lock_nested+0x98/0x2e0 [<c40ca76f>] configfs_attach_group+0x4f/0x190 [<c40caa46>] configfs_register_subsystem+0xc6/0x130 [<c45c8186>] init_netconsole+0x2b6/0x300 [<c45a75f2>] kernel_init+0x142/0x320 [<c4004fb3>] kernel_thread_helper+0x7/0x14 ======================= Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25configfs: Remove EXPERIMENTALJoel Becker1-2/+2
configfs has been alive and kicking for a while now. It underpins some non-EXPERIMENTAL subsystems, such as OCFS2's cluster stack. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: bump version numberMark Fasheh4-4/+4
Bump the printed version to 1.5.0. This helps us quickly identify which version of Ocfs2 a bug filer is running. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2/dlm: Clear joining_node on hearbeat node downTao Ma1-6/+6
Currently the process of dlm join contains 2 steps: query join and assert join. After query join, the joined node will set its joining_node. So if the joining node happens to panic before the 2nd step, the joined node will fail to clear its joining_node flag because that node isn't in the domain map. It at least cause 2 problems. 1. All the new join request will fail. So no new node can mount the volume. 2. The joined node can't umount the volume since during the umount process it has to wait for the joining_node to be unknown. So the umount will be hanged. The solution is to clear the joining_node before we check the domain map. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: convert byte order of constant instead of variableMarcin Slusarz2-6/+1
Convert byte order of constant instead of variable it will be done at compile time vs run time. Remove unused le32_and_cpu. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Update default cluster timeoutsSunil Mushran2-3/+3
Lots of people are having trouble with the default timeouts, which are too low. These new values are derived from an informal survey taken on ocfs2-users, as well as data from bug reports. This should reduce the amount of cluster disconnects and subsequent fencing seen during normal workloads. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: printf fixesJan Kara1-2/+2
Explicitely convert loff_t to long long in printf. Just for sure... Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Use generic_file_llseekJan Kara1-0/+2
We should use generic_file_llseek() and not default_llseek() so that s_maxbytes gets properly checked when seeking. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Safer read_inline_data()Jan Kara1-3/+4
In ocfs2_read_inline_data() we should store file size in loff_t. Although the file size should fit in 32 bits we cannot be sure in case filesystem is corrupted. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Silence false lockdep warningsJan Kara7-11/+20
Create separate lockdep lock classes for system file's i_mutexes. They are used to guard allocations and similar things and thus rank differently than i_mutex of a regular file or directory. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25[PATCH 2/2] ocfs2: cluster aware flock()Mark Fasheh7-1/+237
Hook up ocfs2_flock(), using the new flock lock type in dlmglue.c. A new mount option, "localflocks" is added so that users can revert to old functionality as need be. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25[PATCH 1/2] ocfs2: add flock lock typeMark Fasheh5-0/+284
This adds a new dlmglue lock type which is intended to back flock() requests. Since these locks are driven from userspace, usage rules are much more liberal than the typical Ocfs2 internal cluster lock. As a result, we can't make use of most dlmglue features - lock caching and lock level optimizations in particular. Additionally, userspace is free to deadlock itself, so we have to deal with that in the same way as the rest of the kernel - by allowing a signal to abort a lock request. In order to keep ocfs2_cluster_lock() complexity down, ocfs2_file_lock() does it's own dlm coordination. We still use the same helper functions though, so duplicated code is kept to a minimum. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Local alloc window size changeable via mount optionSunil Mushran6-14/+62
Local alloc is a performance optimization in ocfs2 in which a node takes a window of bits from the global bitmap and then uses that for all small local allocations. This window size is fixed to 8MB currently. This patch allows users to specify the window size in MB including disabling it by passing in 0. If the number specified is too large, the fs will use the default value of 8MB. mount -o localalloc=X /dev/sdX /mntpoint Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Support commit= mount optionMark Fasheh4-2/+41
Mostly taken from ext3. This allows the user to set the jbd commit interval, in seconds. The default of 5 seconds stays the same, but now users can easily increase the commit interval. Typically, this would be increased in order to benefit performance at the expense of data-safety. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25ocfs2: Add missing permission checksMark Fasheh1-0/+6
Check that an online resize is being driven by a user with permission to change system resource limits. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2008-01-25[PATCH 2/2] ocfs2: Implement group add for online resizeTao Ma5-1/+269
This patch adds the ability for a userspace program to request that a properly formatted cluster group be added to the main allocation bitmap for an Ocfs2 file system. The request is made via an ioctl, OCFS2_IOC_GROUP_ADD. On a high level, this is similar to ext3, but we use a different ioctl as the structure which has to be passed through is different. During an online resize, tunefs.ocfs2 will format any new cluster groups which must be added to complete the resize, and call OCFS2_IOC_GROUP_ADD on each one. Kernel verifies that the core cluster group information is valid and then does the work of linking it into the global allocation bitmap. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>