Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321375
b: refs/heads/master
c: be388f3
h: refs/heads/master
i:
  321373: 0647576
  321371: 29eb030
  321367: 45f82a9
  321359: b020130
  321343: d16fe3a
v: v3
  • Loading branch information
Boaz Harrosh committed Aug 2, 2012
1 parent 9600f3c commit 745c6a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 4b74f6ea8417e48bb1fc65880a0574134a8b4745
refs/heads/master: be388f3d9af4155db0dc9e7e59dd49db90271c1c
10 changes: 4 additions & 6 deletions trunk/fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@

#define EXOFS_DBGMSG2(M...) do {} while (0)

enum {MAX_PAGES_KMALLOC = PAGE_SIZE / sizeof(struct page *), };

unsigned exofs_max_io_pages(struct ore_layout *layout,
unsigned expected_pages)
{
unsigned pages = min_t(unsigned, expected_pages, MAX_PAGES_KMALLOC);
unsigned pages = min_t(unsigned, expected_pages,
layout->max_io_length / PAGE_SIZE);

/* TODO: easily support bio chaining */
pages = min_t(unsigned, pages, layout->max_io_length / PAGE_SIZE);
return pages;
}

Expand Down Expand Up @@ -101,7 +98,8 @@ static void _pcol_reset(struct page_collect *pcol)
* it might not end here. don't be left with nothing
*/
if (!pcol->expected_pages)
pcol->expected_pages = MAX_PAGES_KMALLOC;
pcol->expected_pages =
exofs_max_io_pages(&pcol->sbi->layout, ~0);
}

static int pcol_try_alloc(struct page_collect *pcol)
Expand Down

0 comments on commit 745c6a7

Please sign in to comment.