summaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-09-28 13:18:45 +0300
committerBoaz Harrosh <bharrosh@panasas.com>2011-10-14 18:54:41 +0200
commit5a51c0c7e9a913649aa65d8233470682bcbb7694 (patch)
tree4ed43b3a2f9fade227e098771a5bed66f6a71dc4 /fs/exofs/inode.c
parent3bd9856857339d7ee8c4ad50030583f1b9415c39 (diff)
downloadlinux-5a51c0c7e9a913649aa65d8233470682bcbb7694.tar.gz
linux-5a51c0c7e9a913649aa65d8233470682bcbb7694.tar.bz2
linux-5a51c0c7e9a913649aa65d8233470682bcbb7694.zip
ore/exofs: Define new ore_verify_layout
All users of the ore will need to check if current code supports the given layout. For example RAID5/6 is not currently supported. So move all the checks from exofs/super.c to a new ore_verify_layout() to be used by ore users. Note that any new layout should be passed through the ore_verify_layout() because the ore engine will prepare and verify some internal members of ore_layout, and assumes it's called. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 96366a1d7eae..5a62420cbdb1 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -37,11 +37,7 @@
#define EXOFS_DBGMSG2(M...) do {} while (0)
-enum { BIO_MAX_PAGES_KMALLOC =
- (PAGE_SIZE - sizeof(struct bio)) / sizeof(struct bio_vec),
- MAX_PAGES_KMALLOC =
- PAGE_SIZE / sizeof(struct page *),
-};
+enum {MAX_PAGES_KMALLOC = PAGE_SIZE / sizeof(struct page *), };
unsigned exofs_max_io_pages(struct ore_layout *layout,
unsigned expected_pages)
@@ -49,8 +45,7 @@ unsigned exofs_max_io_pages(struct ore_layout *layout,
unsigned pages = min_t(unsigned, expected_pages, MAX_PAGES_KMALLOC);
/* TODO: easily support bio chaining */
- pages = min_t(unsigned, pages,
- layout->group_width * BIO_MAX_PAGES_KMALLOC);
+ pages = min_t(unsigned, pages, layout->max_io_length / PAGE_SIZE);
return pages;
}