]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ocfs2: allocation reservations
authorMark Fasheh <mfasheh@suse.com>
Mon, 7 Dec 2009 21:10:48 +0000 (13:10 -0800)
committerJoel Becker <joel.becker@oracle.com>
Thu, 6 May 2010 01:17:30 +0000 (18:17 -0700)
commitd02f00cc057809d96c044cc72d5b9809d59f7d49
tree44a6d81ecf9fb4b5aa91c0501a8da2ee36890a38
parentec20cec7a351584ca6c70ead012e73d61f9a8e04
ocfs2: allocation reservations

This patch improves Ocfs2 allocation policy by allowing an inode to
reserve a portion of the local alloc bitmap for itself. The reserved
portion (allocation window) is advisory in that other allocation
windows might steal it if the local alloc bitmap becomes
full. Otherwise, the reservations are honored and guaranteed to be
free. When the local alloc window is moved to a different portion of
the bitmap, existing reservations are discarded.

Reservation windows are represented internally by a red-black
tree. Within that tree, each node represents the reservation window of
one inode. An LRU of active reservations is also maintained. When new
data is written, we allocate it from the inodes window. When all bits
in a window are exhausted, we allocate a new one as close to the
previous one as possible. Should we not find free space, an existing
reservation is pulled off the LRU and cannibalized.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Documentation/filesystems/ocfs2.txt
fs/ocfs2/Makefile
fs/ocfs2/cluster/masklog.c
fs/ocfs2/cluster/masklog.h
fs/ocfs2/localalloc.c
fs/ocfs2/ocfs2.h
fs/ocfs2/reservations.c [new file with mode: 0644]
fs/ocfs2/reservations.h [new file with mode: 0644]
fs/ocfs2/suballoc.h
fs/ocfs2/super.c