]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't do IO when creating an new inode
authorDave Chinner <dchinner@redhat.com>
Thu, 27 Jun 2013 06:04:49 +0000 (16:04 +1000)
committerBen Myers <bpm@sgi.com>
Thu, 27 Jun 2013 18:28:20 +0000 (13:28 -0500)
commitc303b6226ccd5ca016cf7e4fa1534cf5040bf1d0
treefde37617169aaa939531a1177dd766aa8900cddb
parentfe2d99a638637f90f729f053eef0c12a64ed9d9d
xfs: don't do IO when creating an new inode

When we are allocating a new inode, we read the inode cluster off
disk to increment the generation number. We are already using a
random generation number for newly allocated inodes, so if we are not
using the ikeep mode, we can just generate a new generation number
when we initialise the newly allocated inode.

This avoids the need for reading the inode buffer during inode
creation. This will speed up allocation of inodes in cold, partially
allocated clusters as they will no longer need to be read from disk
during allocation. It will also reduce the CPU overhead of inode
allocation by not having the process the buffer read, even on cache
hits.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_inode.c