Fix sync_disk to get the enabled disk first

Ticket:	#4430
(cherry picked from commit 7e1594bc659f2184e175d8935d58b00d4827559d)