linux-stable/include
David Chinner 39d2f1ab2a [XFS] extend completions to provide XFS object flush requirements
XFS object flushing doesn't quite match existing completion semantics.  It
mixed exclusive access with completion.  That is, we need to mark an object as
being flushed before flushing it to disk, and then block any other attempt to
flush it until the completion occurs.  We do this but adding an extra count to
the completion before we start using them.  However, we still need to
determine if there is a completion in progress, and allow no-blocking attempts
fo completions to decrement the count.

To do this we introduce:

int try_wait_for_completion(struct completion *x)
	returns a failure status if done == 0, otherwise decrements done
	to zero and returns a "started" status. This is provided
	to allow counted completions to begin safely while holding
	object locks in inverted order.

int completion_done(struct completion *x)
	returns 1 if there is no waiter, 0 if there is a waiter
	(i.e. a completion in progress).

This replaces the use of semaphores for providing this exclusion
and completion mechanism.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31816a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
2008-08-13 16:40:43 +10:00
..
acpi PCI: disable ASPM per ACPI FADT setting 2008-07-28 14:56:09 -07:00
asm-alpha
asm-arm [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
asm-blackfin
asm-cris Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
asm-frv FRV: Wire up new system calls 2008-08-01 13:03:49 -07:00
asm-generic Missing symbol prefix on vmlinux.lds.h 2008-08-01 12:46:41 -07:00
asm-h8300
asm-m32r
asm-m68k m68k{,nommu}: Wire up new system calls 2008-08-11 10:37:34 -07:00
asm-mips [MIPS] kgdb: add arch support for the kernel's kgdb core 2008-07-30 21:54:42 +01:00
asm-mn10300 MN10300: Wire up new system calls 2008-08-01 13:03:48 -07:00
asm-parisc
asm-um
asm-x86 Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-08-01 12:48:16 -07:00
asm-xtensa
crypto
drm
keys
linux [XFS] extend completions to provide XFS object flush requirements 2008-08-13 16:40:43 +10:00
math-emu
media V4L/DVB (8610): Add suspend/resume capabilities to soc_camera. 2008-08-06 06:57:32 -03:00
mtd
net Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-08-07 02:10:27 -07:00
pcmcia
rdma RDMA/cma: Remove padding arrays by using struct sockaddr_storage 2008-08-04 11:02:14 -07:00
rxrpc
scsi Re-introduce "[SCSI] extend the last_sector_bug flag to cover more sectors" 2008-08-05 21:42:21 -07:00
sound ALSA: ASoC: Export dapm_reg_event() fully 2008-07-29 16:00:33 +02:00
video radeon: misc corrections 2008-08-05 14:33:49 -07:00
xen
Kbuild