----------------------------------------------
These are the supplementary sample codes for the publication, 
"Software Developer's Introduction to HGST Ultrastar Archive Ha10 SMR Drives"
The paper can be found on the Colfax International Research website, 
http://colfaxresearch.com/hgst-smr-drive-intro

The Colfax research team can be contacted at phi@colfax-intl.com
Authors:
Ryo Asai (ryo@colfax-intl.com)
Andrey Vladimirov (andrey@colfax-intl.com)
----------------------------------------------


NOTE:
To compile the applications included, you will need "libzbc" library.
The application was written for libzbc v2.0.0 The .tar archive for  
libzbc v2.0.0 is included with this distribution. (libzbc-master.zip)

The latest version of libzbc can be found at https://github.com/hgst/libzbc


----------------------------------------------
Source code from the Paper 
----------------------------------------------

example.c:
	The example code used in the publication. To compile with gcc;
	> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/libzbc
	> gcc example.c -lzbc

----------------------------------------------
Benchmark suite
----------------------------------------------

To compile, simply type
>  make all

Write benchmarks:
      Benchmarks contiguous writes to the drive. wFlush will flush 
      the cache after every write, wNoFlush will not.

      wNoFlush [device_path] [write_size] [[zone1] [zone2] ...] 
      wFlush [device_path] [write_size] [[zone1] [zone2] ...] 

      ex: > wFlush /dev/sg1 4096 380 381

Random Read benchmarks:
      Benchmarks random-access reads from the drive. rndrFlush 
      will flush the cache before every read, rndrNoFlush will not.

      rndrNoFlush [device_path] [read_size] [[zone1] [zone2] ...] 
      rndrFlush [device_path] [read_size] [[zone1] [zone2] ...] 

      ex: > rndrFlush /dev/sg1 4096 380 381

Read benchmarks:
      Benchmarks contiguous reads from the drive. rFlush will 
      flush the cache before every read, rNoFlush will not.

      rNoFlush [device_path] [read_size] [[zone1] [zone2] ...] 
      rFlush [device_path] [read_size] [[zone1] [zone2] ...] 

      ex: > rFlush /dev/sg1 4096 380 381

Resetting Zone:
      Resets the zone write pointer. Call this to reset zones
      after write benchmarks.

      resetZones [device_path] [[zone1] [zone2] ...] 

      ex: > resetZones /dev/sg1 380 381


For more information on each of the benchmarks, refer to the publication.

