sort devices after prioritizing zones
commit0567ffbdf8045b75d0b1db0a8c6b14b6e4ac21ed
authordormando <dormando@rydia.net>
Mon, 27 Feb 2012 10:50:13 +0000 (27 02:50 -0800)
committerdormando <dormando@rydia.net>
Mon, 27 Feb 2012 10:50:13 +0000 (27 02:50 -0800)
treee25a4467ef918081bc36887cf1bc90a4a38546f6
parentea79ae9b66fe614322892756b0b4e057642f8963
sort devices after prioritizing zones

calling into sort_devs_by_freespace was cutting the list to the "20 devices
with most freespace" before checking the zone at all, which caused new files
to upload into the wrong zones for multi-DC setups with many uneven devices.

now we simply call the sorter later. it's a little less efficient.
lib/MogileFS/Plugin/ZoneLocal.pm