|Subject:||[PATCH] Use the incore inode size in xfs_file_readdir()|
|From:||Lachlan McIlroy <lachlan@xxxxxxx>|
|Date:||Thu, 04 Dec 2008 17:59:08 +1100|
|User-agent:||Thunderbird 220.127.116.11 (X11/20081105)|
We should be using the incore inode size here not the linux inode size. The incore inode size is always up to date for directories whereas the linux inode size is not updated for directories.
We've hit assertions in xfs_bmap() and traced it back to the linux inode size being zero here but the incore size being correct.
--- xfs-fix.orig/fs/xfs/linux-2.6/xfs_file.c +++ xfs-fix/fs/xfs/linux-2.6/xfs_file.c @@ -254,7 +254,7 @@ xfs_file_readdir( * point we can change the ->readdir prototype to include the * buffer size. */ - bufsize = (size_t)min_t(loff_t, PAGE_SIZE, inode->i_size); + bufsize = (size_t)min_t(loff_t, PAGE_SIZE, ip->i_d.di_size);
error = xfs_readdir(ip, dirent, bufsize, (xfs_off_t *)&filp->f_pos, filldir);
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||[Fwd: [PATCH] Fix race in xfs_write() between direct and buffered I/O with DMAPI], Lachlan McIlroy|
|Next by Date:||[PATCH] Fix bug in xlogitm idbg command, Lachlan McIlroy|
|Previous by Thread:||[Fwd: [PATCH] Fix race in xfs_write() between direct and buffered I/O with DMAPI], Lachlan McIlroy|
|Next by Thread:||Re: [PATCH] Use the incore inode size in xfs_file_readdir(), Christoph Hellwig|
|Indexes:||[Date] [Thread] [Top] [All Lists]|