iores: support discard mode (-d).