[PATCH] pass mode instead of file to sg_io()