linux/include
Joel Becker e06c8227fd jbd2: Add buffer triggers
Filesystems often to do compute intensive operation on some
metadata.  If this operation is repeated many times, it can be very
expensive.  It would be much nicer if the operation could be performed
once before a buffer goes to disk.

This adds triggers to jbd2 buffer heads.  Just before writing a metadata
buffer to the journal, jbd2 will optionally call a commit trigger associated
with the buffer.  If the journal is aborted, an abort trigger will be
called on any dirty buffers as they are dropped from pending
transactions.

ocfs2 will use this feature.

Initially I tried to come up with a more generic trigger that could be
used for non-buffer-related events like transaction completion.  It
doesn't tie nicely, because the information a buffer trigger needs
(specific to a journal_head) isn't the same as what a transaction
trigger needs (specific to a tranaction_t or perhaps journal_t).  So I
implemented a buffer set, with the understanding that
journal/transaction wide triggers should be implemented separately.

There is only one trigger set allowed per buffer.  I can't think of any
reason to attach more than one set.  Contrast this with a journal or
transaction in which multiple places may want to watch the entire
transaction separately.

The trigger sets are considered static allocation from the jbd2
perspective.  ocfs2 will just have one trigger set per block type,
setting the same set on every bh of the same type.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:40:30 -08:00
..
acpi cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t 2009-01-03 19:15:40 +01:00
asm-arm
asm-frv frv: define __fls 2009-01-03 16:14:05 +10:30
asm-generic Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
asm-h8300
asm-m32r m32r: define __fls 2009-01-03 16:16:54 +10:30
asm-m68k m68k: define __fls 2009-01-01 10:12:18 +10:30
asm-mn10300 mn10300: define __fls 2009-01-03 16:19:03 +10:30
asm-xtensa xtensa: define __fls 2009-01-03 16:21:08 +10:30
crypto crypto: aes - Precompute tables 2008-12-25 11:05:13 +11:00
drm drm: Add a debug node for vblank state. 2008-12-29 17:47:27 +10:00
keys
linux jbd2: Add buffer triggers 2009-01-05 08:40:30 -08:00
math-emu
media V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2008-12-28 12:49:40 -08:00
pcmcia
rdma
rxrpc
scsi [SCSI] fcoe: Fibre Channel over Ethernet 2008-12-29 11:24:33 -06:00
sound V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
trace sched, trace: update trace_sched_wakeup() 2008-12-25 13:10:21 +01:00
video video: sh_mobile_lcdcfb deferred io support 2008-12-22 18:44:48 +09:00
xen xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
Kbuild