stressdisk icon indicating copy to clipboard operation
stressdisk copied to clipboard

Add an option to set BlockSize

Open Zero3K opened this issue 2 years ago • 2 comments

It would be nice if that could be added in order to see if the current size being used is causing errors while testing a UDF drive with an open source driver being used to mount it.

Zero3K avatar Dec 08 '23 15:12 Zero3K

The block size is set here

https://github.com/ncw/stressdisk/blob/daaa039112931a86b8df2f259770081bfde8c5f7/stressdisk.go#L50

It would be quite easy to make it controllable by a flag if you wanted to have a go at that, eg put this just below

blockSize      = flag.Int("s", 2*MB, "Size of the read / write buffer")

And replace all occurrences of BlockSize with *blockSize

ncw avatar Dec 08 '23 16:12 ncw

Actually, this is not needed since I was able to figure out the reason why the driver is causing errors when using StressDisk. It has a bug(s) with the use of DirectIO.

Zero3K avatar Dec 08 '23 16:12 Zero3K