Fix disk sync and sdb_foreach