Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269233
b: refs/heads/master
c: 3bd9856
h: refs/heads/master
i:
  269231: f5bc087
v: v3
  • Loading branch information
Boaz Harrosh committed Oct 14, 2011
1 parent 036f02f commit e1ab3f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbf9a31bba8c985780fe94da059cc5813a7920f5
refs/heads/master: 3bd9856857339d7ee8c4ad50030583f1b9415c39
1 change: 1 addition & 0 deletions trunk/fs/exofs/exofs.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ static inline void exofs_init_comps(struct ore_components *oc,
one_comp->obj.id = oid;
exofs_make_credential(one_comp->cred, &one_comp->obj);

oc->first_dev = 0;
oc->numdevs = sbi->layout.group_width * sbi->layout.mirrors_p1 *
sbi->layout.group_count;
oc->single_comp = EC_SINGLE_COMP;
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/exofs/ore.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ static struct osd_obj_id *_ios_obj(struct ore_io_state *ios, unsigned index)

static struct osd_dev *_ios_od(struct ore_io_state *ios, unsigned index)
{
ORE_DBGMSG2("oc->first_dev=%d oc->numdevs=%d i=%d oc->ods=%p\n",
ios->oc->first_dev, ios->oc->numdevs, index,
ios->oc->ods);

return ore_comp_dev(ios->oc, index);
}

Expand Down
7 changes: 4 additions & 3 deletions trunk/include/scsi/osd_ore.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct ore_dev {
};

struct ore_components {
unsigned first_dev; /* First logical device no */
unsigned numdevs; /* Num of devices in array */
/* If @single_comp == EC_SINGLE_COMP, @comps points to a single
* component. else there are @numdevs components
Expand All @@ -70,14 +71,14 @@ struct ore_components {
static inline struct osd_dev *ore_comp_dev(
const struct ore_components *oc, unsigned i)
{
BUG_ON(oc->numdevs <= i);
return oc->ods[i]->od;
BUG_ON((i < oc->first_dev) || (oc->first_dev + oc->numdevs <= i));
return oc->ods[i - oc->first_dev]->od;
}

static inline void ore_comp_set_dev(
struct ore_components *oc, unsigned i, struct osd_dev *od)
{
oc->ods[i]->od = od;
oc->ods[i - oc->first_dev]->od = od;
}

struct ore_striping_info {
Expand Down

0 comments on commit e1ab3f4

Please sign in to comment.