13 Aug 2012 15:08
[PATCH v7 4/4] xfs: xfs_seek_hole() refinement with hole searching from page cache for unwritten extent
Jeff Liu <jeff.liu <at> oracle.com>
2012-08-13 13:08:13 GMT
2012-08-13 13:08:13 GMT
Improve xfs_seek_hole() to search hole offset from page cache for unwritten extents. Signed-off-by: Jie Liu <jeff.liu <at> oracle.com> --- fs/xfs/xfs_file.c | 76 +++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 65 insertions(+), 11 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 43b3718..a537f61 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c <at> <at> -1288,9 +1288,9 <at> <at> xfs_seek_hole( struct xfs_inode *ip = XFS_I(inode); struct xfs_mount *mp = ip->i_mount; loff_t uninitialized_var(offset); - loff_t holeoff; xfs_fsize_t isize; xfs_fileoff_t fsbno; + xfs_filblks_t end; uint lock; int error; <at> <at> -1306,21 +1306,75 <at> <at> xfs_seek_hole( } fsbno = XFS_B_TO_FSBT(mp, start); - error = xfs_bmap_first_unused(NULL, ip, 1, &fsbno, XFS_DATA_FORK); - if (error) - goto out_unlock; + end = XFS_B_TO_FSB(mp, isize);(Continue reading)
RSS Feed