aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2005-11-01 18:33:05 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 18:33:05 -0500
commite8c8b3a79d85c22d3665b97dde843dc4d8d7ae37 (patch)
treea82b58ebc5c40474cdc53c91bd135b97034de565 /fs/xfs/xfs_vnodeops.c
parentee34807a65aa0c5911dc27682863afca780a003e (diff)
[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>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index e2bf2ef58b66..8221b11a48c0 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -181,40 +181,7 @@ xfs_getattr(
181 vap->va_rdev = 0; 181 vap->va_rdev = 0;
182 182
183 if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { 183 if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) {
184 184 vap->va_blocksize = xfs_preferred_iosize(mp);
185#if 0
186 /* Large block sizes confuse various
187 * user space programs, so letting the
188 * stripe size through is not a good
189 * idea for now.
190 */
191 vap->va_blocksize = mp->m_swidth ?
192 /*
193 * If the underlying volume is a stripe, then
194 * return the stripe width in bytes as the
195 * recommended I/O size.
196 */
197 (mp->m_swidth << mp->m_sb.sb_blocklog) :
198 /*
199 * Return the largest of the preferred buffer
200 * sizes since doing small I/Os into larger
201 * buffers causes buffers to be decommissioned.
202 * The value returned is in bytes.
203 */
204 (1 << (int)MAX(mp->m_readio_log,
205 mp->m_writeio_log));
206
207#else
208 vap->va_blocksize =
209 /*
210 * Return the largest of the preferred buffer
211 * sizes since doing small I/Os into larger
212 * buffers causes buffers to be decommissioned.
213 * The value returned is in bytes.
214 */
215 1 << (int)MAX(mp->m_readio_log,
216 mp->m_writeio_log);
217#endif
218 } else { 185 } else {
219 186
220 /* 187 /*