[PATCH] md: handle errors when read-only