glusterfs: update for new API Apparently glusterfs just changes their API as they see fit. Add a configure check for the newer version, which adds pre/post stat variables in a few random spots. This should fix compilation with v6.0 of the API. Fixes: https://github.com/axboe/fio/issues/781 Signed-off-by: Jens Axboe <axboe@kernel.dk>
glusterfs: capable to test with one single glfs instance Current multi-thread test creates one glfs instance per job. However, there is requirement to run all jobs on one single instance, and that all jobs would share the same set of underlying working threads. Add a new option "single-instance" to control whether to create one global instance or one instance per job. For testing with mutilple gluster volumes, use host name and volume name to filter out same volume, one specific volume will have one instance. Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Don't malloc/memcpy ioengine_ops on td initialization The only reason load_ioengine() needs to malloc extra space for struct ioengine_ops and memcpy from the original ops is because td has per-thread/process ioengine private data which is a part of this structure. If data (and dlhandle) are separated from struct ioengine_ops, load_ioengine() no longer needs to malloc, as the rest of structure fields such as function pointers and string literal are static. Td only needs a pointer to the original ops. Also avoid memcpying a list_head from the original ops. This commit moves/renames data and dlhandle to struct thread_data as thread_data::io_ops_data and thread_data::io_ops_dlhandle. engines/*.c which access ioengine private data by dereferencing td->io_ops->... are modified accordingly, but nothing more than that. Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Add unlink hook to ioengine API, gluster ioengine fio would just call unlink even with engines that are not using the operating systems file namespace... This provides a hook to allow overriding that, with a default handler, and implements it for the gluster ioengine. There are others which it'd probably make sense I'm sure. Huamin Chen looked over my changes to the gluster code earlier... >I like this unlink idea, it would be great if you can also make unlink optional (if my coding reading is correct). This looks a great pull request candidate to fio. Please ping Axboe after you are done. He is not actively watching pull requests. >Please also feel free to augment gluster code and pull me for review if necessary. -castor Signed-off-by: Jens Axboe <axboe@fb.com>