07 May, 2007

8 commits

  • Change NLM internal interface to pass more information for test lock; we
    need this to make sure the cookie information is pushed down to the place
    where we do request deferral, which is handled for testlock by the
    following patch.

    Signed-off-by: Marc Eshel
    Signed-off-by: J. Bruce Fields

    Marc Eshel
     
  • We need to keep some state for a pending asynchronous lock request, so this
    patch adds that state to struct nlm_block.

    This also adds a function which defers the request, by calling
    rqstp->rq_chandle.defer and storing the resulting deferred request in a
    nlm_block structure which we insert into lockd's global block list. That
    new function isn't called yet, so it's dead code until a later patch.

    Signed-off-by: Marc Eshel
    Signed-off-by: J. Bruce Fields

    Marc Eshel
     
  • Acquiring a lock on a cluster filesystem may require communication with
    remote hosts, and to avoid blocking lockd or nfsd threads during such
    communication, we allow the results to be returned asynchronously.

    When a ->lock() call needs to block, the file system will return
    -EINPROGRESS, and then later return the results with a call to the
    routine in the fl_grant field of the lock_manager_operations struct.

    This differs from the case when ->lock returns -EAGAIN to a blocking
    lock request; in that case, the filesystem calls fl_notify when the lock
    is granted, and the caller retries the original lock. So while
    fl_notify is merely a hint to the caller that it should retry, fl_grant
    actually communicates the final result of the lock operation (with the
    lock already acquired in the succesful case).

    Therefore fl_grant takes a lock, a status and, for the test lock case, a
    conflicting lock. We also allow fl_grant to return an error to the
    filesystem, to handle the case where the fl_grant requests arrives after
    the lock manager has already given up waiting for it.

    Signed-off-by: Marc Eshel
    Signed-off-by: J. Bruce Fields

    Marc Eshel
     
  • Lock managers need to be able to cancel pending lock requests. In the case
    where the exported filesystem manages its own locks, it's not sufficient just
    to call posix_unblock_lock(); we need to let the filesystem know what's
    happening too.

    We do this by adding a new fcntl lock command: FL_CANCELLK. Some day this
    might also be made available to userspace applications that could benefit from
    an asynchronous locking api.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • The nfsv4 protocol's lock operation, in the case of a conflict, returns
    information about the conflicting lock.

    It's unclear how clients can use this, so for now we're not going so far as to
    add a filesystem method that can return a conflicting lock, but we may as well
    return something in the local case when it's easy to.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • Factor out the code that switches between generic and filesystem-specific lock
    methods; eventually we want to call this from lock managers (lockd and nfsd)
    too; currently they only call the generic methods.

    This patch does that for all the setlk code.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     
  • Factor out the code that switches between generic and filesystem-specific lock
    methods; eventually we want to call this from lock managers (lockd and nfsd)
    too; currently they only call the generic methods.

    This patch does that for test_lock.

    Note that this hasn't been necessary until recently, because the few
    filesystems that define ->lock() (nfs, cifs...) aren't exportable via NFS.
    However GFS (and, in the future, other cluster filesystems) need to implement
    their own locking to get cluster-coherent locking, and also want to be able to
    export locking to NFS (lockd and NFSv4).

    So we accomplish this by factoring out code such as this and exporting it for
    the use of lockd and nfsd.

    Signed-off-by: "J. Bruce Fields"

    J. Bruce Fields
     
  • posix_test_lock() and ->lock() do the same job but have gratuitously
    different interfaces. Modify posix_test_lock() so the two agree,
    simplifying some code in the process.

    Signed-off-by: Marc Eshel
    Signed-off-by: "J. Bruce Fields"

    Marc Eshel
     

15 Apr, 2007

1 commit

  • If the writebacks are cancelled via nfs_cancel_dirty_list, or due to the
    memory allocation failing in nfs_flush_one/nfs_flush_multi, then we must
    ensure that the PG_writeback flag is cleared.

    Also ensure that we actually own the PG_writeback flag whenever we
    schedule a new writeback by making nfs_set_page_writeback() return the
    value of test_set_page_writeback().
    The PG_writeback page flag ends up replacing the functionality of the
    PG_FLUSHING nfs_page flag, so we rip that out too.

    Signed-off-by: Trond Myklebust
    Cc: Peter Zijlstra
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

11 Apr, 2007

3 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide: add "optical" to sysfs "media" attribute
    ide: ugly messages trying to open CD drive with no media present
    ide: correctly prevent IDE timer expiry function to run if request was already handled

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] SGI Altix : fix pcibr_dmamap_ate32() bug
    [IA64] Fix CPU freq displayed in /proc/cpuinfo
    [IA64] Fix wrong assumption about irq and vector in msi_ia64.c
    [IA64] BTE error timer fix

    Linus Torvalds
     
  • It is possible for the timer expiry function to run even though the
    request has already been handled: ide_timer_expiry() only checks that
    the handler is not NULL, but it is possible that we have handled a
    request (thus clearing the handler) and then started a new request
    (thus starting the timer again, and setting a handler).

    A simple way to exhibit this is to set the DMA timeout to 1 jiffy and
    run dd: The kernel will panic after a few minutes because
    ide_timer_expiry() tries to add a timer when it's already active.

    To fix this, we simply add a request generation count that gets
    incremented at every interrupt, and check in ide_timer_expiry() that
    we have not already handled a new interrupt before running the expiry
    function.

    Signed-off-by: Suleiman Souhlal
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Suleiman Souhlal
     

09 Apr, 2007

1 commit

  • Since lazy MMU batching mode still allows interrupts to enter, it is
    possible for interrupt handlers to try to use kmap_atomic, which fails when
    lazy mode is active, since the PTE update to highmem will be delayed. The
    best workaround is to issue an explicit flush in kmap_atomic_functions
    case; this is the only way nested PTE updates can happen in the interrupt
    handler.

    Thanks to Jeremy Fitzhardinge for noting the bug and suggestions on a fix.

    This patch gets reverted again when we start 2.6.22 and the bug gets fixed
    differently.

    Signed-off-by: Zachary Amsden
    Cc: Andi Kleen
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     

08 Apr, 2007

1 commit

  • Soeren Sonnenburg reported that upon resume he is getting
    this backtrace:

    [] smp_apic_timer_interrupt+0x57/0x90
    [] retrigger_next_event+0x0/0xb0
    [] apic_timer_interrupt+0x28/0x30
    [] retrigger_next_event+0x0/0xb0
    [] __kfifo_put+0x8/0x90
    [] on_each_cpu+0x35/0x60
    [] clock_was_set+0x18/0x20
    [] timekeeping_resume+0x7c/0xa0
    [] __sysdev_resume+0x11/0x80
    [] sysdev_resume+0x47/0x80
    [] device_power_up+0x5/0x10

    it turns out that on resume we mistakenly re-enable interrupts too
    early. Do the timer retrigger only on the current CPU.

    Signed-off-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Acked-by: Soeren Sonnenburg
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

07 Apr, 2007

1 commit


05 Apr, 2007

3 commits

  • Just a one-byter for an ia64 thinko/typo - already fixed for i386 and x86_64.

    Acked-by: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej Zenczykowski
     
  • Revert all this. It can cause device-mapper to receive a different major from
    earlier kernels and it turns out that the Amanda backup program (via GNU tar,
    apparently) checks major numbers on files when performing incremental backups.

    Which is a bit broken of Amanda (or tar), but this feature isn't important
    enough to justify the churn.

    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • A device can be removed from an md array via e.g.
    echo remove > /sys/block/md3/md/dev-sde/state

    This will try to remove the 'dev-sde' subtree which will deadlock
    since
    commit e7b0d26a86943370c04d6833c6edba2a72a6e240

    With this patch we run the kobject_del via schedule_work so as to
    avoid the deadlock.

    Cc: Alan Stern
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

04 Apr, 2007

3 commits


03 Apr, 2007

5 commits

  • Add unsigned to unused bit field in a.out.h to make sparse happy.

    [ I took care of the sparc64 side as well -DaveM ]

    Signed-off-by: Robert Reif
    Signed-off-by: David S. Miller

    Robert Reif
     
  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
    [PATCH] x86: Don't probe for DDC on VBE1.2
    [PATCH] x86-64: Increase NMI watchdog probing timeout
    [PATCH] x86-64: Let oprofile reserve MSR on all CPUs
    [PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E

    Linus Torvalds
     
  • Fix the regression resulting from the recent change of suspend code
    ordering that causes systems based on Intel x86 CPUs using the microcode
    driver to hang during the resume.

    The problem occurs since the microcode driver uses request_firmware() in
    its CPU hotplug notifier, which is called after tasks has been frozen and
    hangs. It can be fixed by telling the microcode driver to use the
    microcode stored in memory during the resume instead of trying to load it
    from disk.

    Signed-off-by: Rafael J. Wysocki
    Adrian Bunk
    Cc: Tigran Aivazian
    Cc: Pavel Machek
    Cc: Maxim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • built-in drivers had broken sysfs links that caused bootup hangs for
    certain driver unregistry sequences.

    Signed-off-by: Ingo Molnar
    Acked-by: Kay Sievers
    Signed-off-by: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     
  • Currently we have a confused udelay implementation.

    * __const_udelay does not accept usecs but xloops in i386 and x86_64
    * our implementation requires usecs as arg
    * it gets a xloops count when called by asm/arch/delay.h

    Bugs related to this (extremely long shutdown times) where reported by some
    x86_64 users, especially using Device Mapper.

    To hit this bug, a compile-time constant time parameter must be passed -
    that's why UML seems to work most times. Fix this with a simple udelay
    implementation.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

02 Apr, 2007

4 commits

  • AMD dual core laptops with C1E do not run the APIC timer correctly
    when they go idle. Previously the code assumed this only happened
    on C2 or deeper. But not all of these systems report support C2.

    Use a AMD supplied snippet to detect C1E being enabled and then disable
    local apic timer use.

    This supercedes an earlier workaround using DMI detection of specific systems.

    Thanks to Mark Langsdorf for the detection snippet.

    Signed-off-by: Andi Kleen

    Andi Kleen
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 4298/1: fix memory barriers for DMA coherent and SMP platforms
    [ARM] 4295/2: Fix error-handling in pxaficp_ir.c (version 2)
    [ARM] Fix __NR_kexec_load
    [ARM] Export dma_channel_active()
    [ARM] 4296/1: ixp4xx: compile fix
    [ARM] 4289/1: AT91: SAM9260 NAND flash timing

    Linus Torvalds
     
  • This patch:
    - Switches mb/rmb/wmb back to being full-blown DMBs on ARM SMP systems,
    since mb/rmb/wmb are required to order Normal memory accesses as well.
    - Enables the use of DMB and ISB on XSC3 (which is an ARMv5TE ISA core
    but conforms to the ARMv6 memory ordering model and supports the
    various ARMv6 barriers.)
    - Makes DMA coherent platforms (only ixp23xx at the moment) map
    mb/rmb/wmb to dmb(), as on DMA coherent platforms, DMA consistent
    mappings are done as Normal mappings, which are weakly ordered.

    Signed-off-by: Lennert Buytenhek
    Acked-by: David Howells
    Acked-by: Catalin Marinas
    Acked-by: Paul E. McKenney
    Acked-by: Dan Williams
    Signed-off-by: Russell King

    Lennert Buytenhek
     
  • It's __NR_kexec_load, not __NR_sys_kexec_load

    Signed-off-by: Russell King

    Russell King
     

31 Mar, 2007

1 commit


30 Mar, 2007

6 commits


29 Mar, 2007

3 commits