1
linux/fs/gfs2
Steven Whitehouse 7a6bbacbb8 [GFS2] Map multiple blocks at once where possible
This is a tidy up of the GFS2 bmap code. The main change is that the
bh is passed to gfs2_block_map allowing the flags to be set directly
rather than having to repeat that code several times in ops_address.c.

At the same time, the extent mapping code from gfs2_extent_map has
been moved into gfs2_block_map. This allows all calls to gfs2_block_map
to map extents in the case that no allocation is taking place. As a
result reads and non-allocating writes should be faster. A quick test
with postmark appears to support this.

There is a limit on the number of blocks mapped in a single bmap
call in that it will only ever map blocks which are pointed to
from a single pointer block. So in other words, it will never try
to do additional i/o in order to satisfy read-ahead. The maximum
number of blocks is thus somewhat less than 512 (the GFS2 4k block
size minus the header divided by sizeof(u64)). I've further limited
the mapping of "normal" blocks to 32 blocks (to avoid extra work)
since readpages() will currently read a maximum of 32 blocks ahead (128k).

Some further work will probably be needed to set a suitable value
for DIO as well, but for now thats left at the maximum 512 (see
ops_address.c:gfs2_get_block_direct).

There is probably a lot more that can be done to improve bmap for GFS2,
but this is a good first step.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-09-18 17:18:23 -04:00
..
locking [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
acl.c [GFS2] Align all labels against LH side 2006-09-04 12:04:26 -04:00
acl.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
bmap.c [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
bmap.h [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
daemon.c [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
daemon.h [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
dir.c [GFS2] More style changes 2006-09-07 09:42:56 -04:00
dir.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
eaops.c [GFS2] Extended attribute code style changes 2006-09-05 13:15:18 -04:00
eaops.h [GFS2] Extended attribute code style changes 2006-09-05 13:15:18 -04:00
eattr.c [GFS2] Extended attribute code style changes 2006-09-05 13:15:18 -04:00
eattr.h [GFS2] Extended attribute code style changes 2006-09-05 13:15:18 -04:00
gfs2.h [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
glock.c [GFS2] Fix glock hash clearing 2006-09-14 13:57:38 -04:00
glock.h [GFS2] Remove unused function from glock.c 2006-09-09 18:59:27 -04:00
glops.c [GFS2] Remove unused function from glock.c 2006-09-09 18:59:27 -04:00
glops.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
incore.h [GFS2] Use atomic_t rather than kref in glock.c 2006-09-13 10:43:37 -04:00
inode.c [GFS2] Remove a cast, tidy gfs2_inode_attr_in 2006-09-04 13:55:48 -04:00
inode.h [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
Kconfig [GFS2] gfs2/dlm: mailing list and web page 2006-06-22 15:29:57 -04:00
lm_interface.h [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
lm.c [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
lm.h [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
locking.c [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
log.c [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
log.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
lops.c [GFS2] Style changes in logging code 2006-09-05 14:41:30 -04:00
lops.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
main.c [GFS2] Use hlist for glock hash chains 2006-09-12 10:10:01 -04:00
Makefile [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
meta_io.c [GFS2] More style changes 2006-09-04 14:47:06 -04:00
meta_io.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
mount.c [GFS2] Align all labels against LH side 2006-09-04 12:04:26 -04:00
mount.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ondisk.c [GFS2] Use const in endian conversion routines 2006-09-04 14:48:37 -04:00
ops_address.c [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
ops_address.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_dentry.c [GFS2] Align all labels against LH side 2006-09-04 12:04:26 -04:00
ops_dentry.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_export.c [GFS2] Add a comment in ops_export.c 2006-09-05 15:56:17 -04:00
ops_export.h [GFS2] Some further style changes 2006-09-04 16:16:45 -04:00
ops_file.c [GFS2] More code style updates 2006-09-04 15:32:10 -04:00
ops_file.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_fstype.c [GFS2] vfree should be kfree 2006-09-08 10:13:03 -04:00
ops_fstype.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_inode.c [GFS2] More code style updates 2006-09-04 15:32:10 -04:00
ops_inode.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_super.c [GFS2] vfree should be kfree (II) 2006-09-09 16:56:34 -04:00
ops_super.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_vm.c [GFS2] Change all types to uX style 2006-09-04 12:49:07 -04:00
ops_vm.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
quota.c [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
quota.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
recovery.c [GFS2] Map multiple blocks at once where possible 2006-09-18 17:18:23 -04:00
recovery.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
rgrp.c [GFS2] More style fixes 2006-09-05 15:41:57 -04:00
rgrp.h [GFS2] More style fixes 2006-09-05 15:41:57 -04:00
super.c [GFS2] Change all types to uX style 2006-09-04 12:49:07 -04:00
super.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
sys.c [GFS2] print mount errors related to sysfs 2006-09-18 09:43:23 -04:00
sys.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
trans.c [GFS2] Change all types to uX style 2006-09-04 12:49:07 -04:00
trans.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
util.c [GFS2] Change all types to uX style 2006-09-04 12:49:07 -04:00
util.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00