Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188646
b: refs/heads/master
c: 767ea5c
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Dec 9, 2009
1 parent 49ea208 commit b5748a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2e552e76e2c6907ca50cd9a4b747a2e2e8c615e
refs/heads/master: 767ea5c33a360ce88da24e296e802dace5821799
5 changes: 5 additions & 0 deletions trunk/fs/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,11 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid,
ps = le16_to_cpu(pgid.ps);
preferred = (s16)le16_to_cpu(pgid.preferred);

/* don't forcefeed bad device ids to crush */
if (preferred >= osdmap->max_osd ||
preferred >= osdmap->crush->max_devices)
preferred = -1;

if (poolid >= osdmap->num_pools)
return NULL;
pool = &osdmap->pg_pool[poolid];
Expand Down

0 comments on commit b5748a4

Please sign in to comment.