Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263107
b: refs/heads/master
c: 20618b2
h: refs/heads/master
i:
  263105: eb0ab5b
  263103: 94c111a
v: v3
  • Loading branch information
Boaz Harrosh authored and Trond Myklebust committed Aug 4, 2011
1 parent 60e1cea commit e3bcaba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 88c9e42196285a7c573e2abda11a4b5037c669bc
refs/heads/master: 20618b21da0796115e81906d24ff1601552701b7
12 changes: 5 additions & 7 deletions trunk/fs/nfs/objlayout/objio_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,22 +589,19 @@ static void _calc_stripe_info(struct objio_state *ios, u64 file_offset,
}

static int _add_stripe_unit(struct objio_state *ios, unsigned *cur_pg,
unsigned pgbase, struct _objio_per_comp *per_dev, int cur_len,
unsigned pgbase, struct _objio_per_comp *per_dev, int len,
gfp_t gfp_flags)
{
unsigned pg = *cur_pg;
int cur_len = len;
struct request_queue *q =
osd_request_queue(_io_od(ios, per_dev->dev));

per_dev->length += cur_len;

if (per_dev->bio == NULL) {
unsigned stripes = ios->layout->num_comps /
ios->layout->mirrors_p1;
unsigned pages_in_stripe = stripes *
unsigned pages_in_stripe = ios->layout->group_width *
(ios->layout->stripe_unit / PAGE_SIZE);
unsigned bio_size = (ios->ol_state.nr_pages + pages_in_stripe) /
stripes;
ios->layout->group_width;

if (BIO_MAX_PAGES_KMALLOC < bio_size)
bio_size = BIO_MAX_PAGES_KMALLOC;
Expand Down Expand Up @@ -632,6 +629,7 @@ static int _add_stripe_unit(struct objio_state *ios, unsigned *cur_pg,
}
BUG_ON(cur_len);

per_dev->length += len;
*cur_pg = pg;
return 0;
}
Expand Down

0 comments on commit e3bcaba

Please sign in to comment.