ports/56011: bonnie++ doesn't do large files

Vivek Khera vivek at khera.org
Tue Aug 26 18:00:25 UTC 2003


>Number:         56011
>Category:       ports
>Synopsis:       bonnie++ doesn't do large files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 26 11:00:23 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Vivek Khera
>Release:        FreeBSD 4.7-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD lorax.kciLink.com 4.7-RELEASE-p6 FreeBSD 4.7-RELEASE-p6 #10: Mon Feb 24 13:13:48 EST 2003 vivek at lorax.kciLink.com:/u/lorax1/usr/obj/u/lorax1/usr/src/sys/LORAX i386


	
>Description:
	

the bonnie++ benchmark can do large files if you tell it to.  unfortunately,
the configure script assumes you have the linux variety of large files (ie,
using off64_t and friends).

the patch (hack) enclosed bypasses the tests where it tries to warn you for
using files which are 'too large'.

>How-To-Repeat:
	
>Fix:

	

all other references to _LARGEFILE64_SOURCE should be left as-is since we
don't need to alter the off_t type nor change the seek() calls.


--- #bonnie++.cpp~	Mon Aug 25 17:08:46 2003
+++ bonnie++.cpp	Mon Aug 25 17:08:46 2003
@@ -322,11 +322,7 @@
       {
         char *sbuf = _strdup(optarg);
         char *size = strtok(sbuf, ":");
-#ifdef _LARGEFILE64_SOURCE
         file_size = size_from_str(size, "gt");
-#else
-        file_size = size_from_str(size, "g");
-#endif
         size = strtok(NULL, "");
         if(size)
         {
@@ -411,15 +407,6 @@
     if(file_size % 1024 > 512)
       file_size = file_size + 1024 - (file_size % 1024);
   }
-#ifndef _LARGEFILE64_SOURCE
-  if(file_size == 2048)
-    file_size = 2047;
-  if(file_size > 2048)
-  {
-    fprintf(stderr, "Large File Support not present, can't do %dM.\n", file_size);
-    usage();
-  }
-#endif
   globals.byte_io_size = __min(file_size, globals.byte_io_size);
   globals.byte_io_size = __max(0, globals.byte_io_size);
 
@@ -503,14 +490,6 @@
      && (directory_max_size < directory_min_size || directory_max_size < 0
      || directory_min_size < 0) )
     usage();
-#ifndef _LARGEFILE64_SOURCE
-  if(file_size > (1 << (31 - 20 + globals.io_chunk_bits)) )
-  {
-    fprintf(stderr
-   , "The small chunk size and large IO size make this test impossible in 32bit.\n");
-    usage();
-  }
-#endif
   if(file_size && globals.ram && (file_size * concurrency) < (globals.ram * 2) )
   {
     fprintf(stderr
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list