pmemblk: Clarify fsize is in MiB not MB
[fio.git] / engines / pmemblk.c
index ed6c2b2feb7ba5b4e690dcc8f254f70cf5615336..e8476f99ab0782557387a79226dbb3edee4c36a8 100644 (file)
  *   ioengine=pmemblk
  *
  * Other relevant settings:
  *   ioengine=pmemblk
  *
  * Other relevant settings:
+ *   thread=1   REQUIRED
  *   iodepth=1
  *   direct=1
  *   iodepth=1
  *   direct=1
- *   thread=1   REQUIRED
  *   unlink=1
  *   unlink=1
- *   filename=/pmem0/fiotestfile,BSIZE,FSIZEMB
+ *   filename=/mnt/pmem0/fiotestfile,BSIZE,FSIZEMiB
  *
  *   thread must be set to 1 for pmemblk as multiple processes cannot
  *     open the same block pool file.
  *
  *   thread must be set to 1 for pmemblk as multiple processes cannot
  *     open the same block pool file.
  *   iodepth should be set to 1 as pmemblk is always synchronous.
  *   Use numjobs to scale up.
  *
  *   iodepth should be set to 1 as pmemblk is always synchronous.
  *   Use numjobs to scale up.
  *
- *   direct=1 is implied as pmemblk is always direct.
+ *   direct=1 is implied as pmemblk is always direct. A warning message
+ *   is printed if this is not specified.
+ *
+ *   unlink=1 removes the block pool file after testing, and is optional.
+ *
+ *   The pmem device must have a DAX-capable filesystem and be mounted
+ *   with DAX enabled.  filename must point to a file on that filesystem.
  *
  *
- *   Can set unlink to 1 to remove the block pool file after testing.
+ *   Example:
+ *     mkfs.xfs /dev/pmem0
+ *     mkdir /mnt/pmem0
+ *     mount -o dax /dev/pmem0 /mnt/pmem0
  *
  *   When specifying the filename, if the block pool file does not already
  *
  *   When specifying the filename, if the block pool file does not already
- *   exist, then the pmemblk engine can create the pool file if you specify
+ *   exist, then the pmemblk engine creates the pool file if you specify
  *   the block and file sizes.  BSIZE is the block size in bytes.
  *   the block and file sizes.  BSIZE is the block size in bytes.
- *   FSIZEMB is the pool file size in MB.
+ *   FSIZEMB is the pool file size in MiB.
  *
  *   See examples/pmemblk.fio for more.
  *
  *
  *   See examples/pmemblk.fio for more.
  *
@@ -128,7 +137,7 @@ static void fio_pmemblk_cache_remove(fio_pmemblk_file_t pmb)
  * level, we allow the block size and file size to be appended
  * to the file name:
  *
  * level, we allow the block size and file size to be appended
  * to the file name:
  *
- *   path[,bsize,fsizemb]
+ *   path[,bsize,fsizemib]
  *
  * note that we do not use the fio option "filesize" to dictate
  * the file size because we can only give libpmemblk the gross
  *
  * note that we do not use the fio option "filesize" to dictate
  * the file size because we can only give libpmemblk the gross
@@ -138,7 +147,7 @@ static void fio_pmemblk_cache_remove(fio_pmemblk_file_t pmb)
  * the final path without the parameters is returned in ppath.
  * the block size and file size are returned in pbsize and fsize.
  *
  * the final path without the parameters is returned in ppath.
  * the block size and file size are returned in pbsize and fsize.
  *
- * note that the user should specify the file size in MiB, but
+ * note that the user specifies the file size in MiB, but
  * we return bytes from here.
  */
 static void pmb_parse_path(const char *pathspec, char **ppath, uint64_t *pbsize,
  * we return bytes from here.
  */
 static void pmb_parse_path(const char *pathspec, char **ppath, uint64_t *pbsize,
@@ -147,7 +156,7 @@ static void pmb_parse_path(const char *pathspec, char **ppath, uint64_t *pbsize,
        char *path;
        char *s;
        uint64_t bsize;
        char *path;
        char *s;
        uint64_t bsize;
-       uint64_t fsizemb;
+       uint64_t fsizemib;
 
        path = strdup(pathspec);
        if (!path) {
 
        path = strdup(pathspec);
        if (!path) {
@@ -157,14 +166,14 @@ static void pmb_parse_path(const char *pathspec, char **ppath, uint64_t *pbsize,
 
        /* extract sizes, if given */
        s = strrchr(path, ',');
 
        /* extract sizes, if given */
        s = strrchr(path, ',');
-       if (s && (fsizemb = strtoull(s + 1, NULL, 10))) {
+       if (s && (fsizemib = strtoull(s + 1, NULL, 10))) {
                *s = 0;
                s = strrchr(path, ',');
                if (s && (bsize = strtoull(s + 1, NULL, 10))) {
                        *s = 0;
                        *ppath = path;
                        *pbsize = bsize;
                *s = 0;
                s = strrchr(path, ',');
                if (s && (bsize = strtoull(s + 1, NULL, 10))) {
                        *s = 0;
                        *ppath = path;
                        *pbsize = bsize;
-                       *pfsize = fsizemb << 20;
+                       *pfsize = fsizemib << 20;
                        return;
                }
        }
                        return;
                }
        }