aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osdmap.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-19 14:41:51 -0400
committerSage Weil <sage@newdream.net>2009-10-19 14:42:41 -0400
commitee7fdfaff7702bd209e3a013b2fc4643233f5465 (patch)
tree98affb849897dcefc0b256886f4e43df7aae1052 /fs/ceph/osdmap.c
parent8fa9765576875200a7412a5300b5f0537211f038 (diff)
ceph: include preferred osd in placement seed
Mix the preferred osd (if any) into the placement seed that is fed into the CRUSH object placement calculation. This prevents all the placement pgs from peering with the same osds. Rev the osd client protocol with this change. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osdmap.c')
-rw-r--r--fs/ceph/osdmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index 6f0aeff4185a..72d75a239ac2 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -791,6 +791,8 @@ int ceph_calc_object_layout(struct ceph_object_layout *ol,
791 pgid.pg64 = 0; /* start with it zeroed out */ 791 pgid.pg64 = 0; /* start with it zeroed out */
792 pgid.pg.ps = ceph_full_name_hash(oid, strlen(oid)); 792 pgid.pg.ps = ceph_full_name_hash(oid, strlen(oid));
793 pgid.pg.preferred = preferred; 793 pgid.pg.preferred = preferred;
794 if (preferred >= 0)
795 pgid.pg.ps += preferred;
794 pgid.pg.pool = le32_to_cpu(fl->fl_pg_pool); 796 pgid.pg.pool = le32_to_cpu(fl->fl_pg_pool);
795 if (preferred >= 0) 797 if (preferred >= 0)
796 dout("calc_object_layout '%s' pgid %d.%xp%d (%llx)\n", oid, 798 dout("calc_object_layout '%s' pgid %d.%xp%d (%llx)\n", oid,