Reversible and irreversible structural changes in amorphous silicon