[XFS] Introduce two new mount options (nolargeio/largeio) to allow

filesystems to expose the filesystem stripe width in stat(2) rather than
the page cache size. This allows applications requiring high bandwidth to
easily determine the optimum I/O size for the underlying filesystem. The
default is to report the page cache size (i.e. "nolargeio").

SGI-PV: 942818
SGI-Modid: xfs-linux:xfs-kern:23830a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
David Chinner
2005-11-02 10:33:05 +11:00
committed by Nathan Scott
parent ee34807a65
commit e8c8b3a79d
6 changed files with 43 additions and 35 deletions

View File

@ -181,40 +181,7 @@ xfs_getattr(
vap->va_rdev = 0;
if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) {
#if 0
/* Large block sizes confuse various
* user space programs, so letting the
* stripe size through is not a good
* idea for now.
*/
vap->va_blocksize = mp->m_swidth ?
/*
* If the underlying volume is a stripe, then
* return the stripe width in bytes as the
* recommended I/O size.
*/
(mp->m_swidth << mp->m_sb.sb_blocklog) :
/*
* Return the largest of the preferred buffer
* sizes since doing small I/Os into larger
* buffers causes buffers to be decommissioned.
* The value returned is in bytes.
*/
(1 << (int)MAX(mp->m_readio_log,
mp->m_writeio_log));
#else
vap->va_blocksize =
/*
* Return the largest of the preferred buffer
* sizes since doing small I/Os into larger
* buffers causes buffers to be decommissioned.
* The value returned is in bytes.
*/
1 << (int)MAX(mp->m_readio_log,
mp->m_writeio_log);
#endif
vap->va_blocksize = xfs_preferred_iosize(mp);
} else {
/*