From 2d6ec99c0aed8f88e066ea117700e28b6a9f4899 Mon Sep 17 00:00:00 2001 From: John Dyson Date: Mon, 20 Nov 1995 03:57:50 +0000 Subject: [PATCH] Since FreeBSD clustering code now supports filesystems < PAGE_SIZE, enable clustering for cd9660, thereby giving a BIG performance boost. --- sys/fs/cd9660/cd9660_vnops.c | 8 ++++++-- sys/isofs/cd9660/cd9660_vnops.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 79ec54f27c8f..8c8f724a4f5b 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.20 1995/11/12 10:16:53 davidg Exp $ + * $Id: cd9660_vnops.c,v 1.21 1995/11/12 10:36:19 davidg Exp $ */ #include @@ -283,8 +283,12 @@ extern int doclusterread; #endif #else /* XXX until cluster routines can handle block sizes less than one page */ +#if defined(__FreeBSD__) +#define doclusterread 1 +#else #define doclusterread 0 #endif +#endif /* * Vnode op for reading. @@ -328,7 +332,7 @@ cd9660_read(ap) rablock = lbn + 1; if (doclusterread) { if (iso_lblktosize(imp, rablock) <= ip->i_size) - error = cluster_read(vp, (off_t)ip->i_size, + error = cluster_read(vp, ip->i_size, lbn, size, NOCRED, &bp); else error = bread(vp, lbn, size, NOCRED, &bp); diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 79ec54f27c8f..8c8f724a4f5b 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.20 1995/11/12 10:16:53 davidg Exp $ + * $Id: cd9660_vnops.c,v 1.21 1995/11/12 10:36:19 davidg Exp $ */ #include @@ -283,8 +283,12 @@ extern int doclusterread; #endif #else /* XXX until cluster routines can handle block sizes less than one page */ +#if defined(__FreeBSD__) +#define doclusterread 1 +#else #define doclusterread 0 #endif +#endif /* * Vnode op for reading. @@ -328,7 +332,7 @@ cd9660_read(ap) rablock = lbn + 1; if (doclusterread) { if (iso_lblktosize(imp, rablock) <= ip->i_size) - error = cluster_read(vp, (off_t)ip->i_size, + error = cluster_read(vp, ip->i_size, lbn, size, NOCRED, &bp); else error = bread(vp, lbn, size, NOCRED, &bp);