Re: [ceph-users] How does crush selects different osds using hash(pg) in diferent iterations

2015-03-23 Thread Gregory Farnum
On Sat, Mar 21, 2015 at 10:46 AM, shylesh kumar shylesh.mo...@gmail.com wrote: Hi , I was going through this simplified crush algorithm given in ceph website. def crush(pg): all_osds = ['osd.0', 'osd.1', 'osd.2', ...] result = [] # size is the number of copies; primary+replicas

[ceph-users] How does crush selects different osds using hash(pg) in diferent iterations

2015-03-21 Thread shylesh kumar
Hi , I was going through this simplified crush algorithm given in ceph website. def crush(pg): all_osds = ['osd.0', 'osd.1', 'osd.2', ...] result = [] # size is the number of copies; primary+replicas while len(result) size: -- *r = hash(pg)* chosen = all_osds[ r %