summaryrefslogtreecommitdiff
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-09-28 13:25:50 +0300
committerBoaz Harrosh <bharrosh@panasas.com>2011-10-14 18:54:42 +0200
commit4b46c9f5cf69505f0bc708995b88b0cc60317ffd (patch)
treee5369fe948509c230470f922a0cd89cda60f2692 /fs/exofs/inode.c
parent5a51c0c7e9a913649aa65d8233470682bcbb7694 (diff)
ore/exofs: Change ore_check_io API
Current ore_check_io API receives a residual pointer, to report partial IO. But it is actually not used, because in a multiple devices IO there is never a linearity in the IO failure. On the other hand if every failing device is reported through a received callback measures can be taken to handle only failed devices. One at a time. This will also be needed by the objects-layout-driver for it's error reporting facility. Exofs is not currently using the new information and keeps the old behaviour of failing the complete IO in case of an error. (No partial completion) TODO: Use an ore_check_io callback to set_page_error only the failing pages. And re-dirty write pages. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 5a62420cbdb..86c0ac87b8e 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -194,19 +194,16 @@ static void update_write_page(struct page *page, int ret)
static int __readpages_done(struct page_collect *pcol)
{
int i;
- u64 resid;
u64 good_bytes;
u64 length = 0;
- int ret = ore_check_io(pcol->ios, &resid);
+ int ret = ore_check_io(pcol->ios, NULL);
if (likely(!ret)) {
good_bytes = pcol->length;
ret = PAGE_WAS_NOT_IN_IO;
} else {
- good_bytes = pcol->length - resid;
+ good_bytes = 0;
}
- if (good_bytes > pcol->ios->length)
- good_bytes = pcol->ios->length;
EXOFS_DBGMSG2("readpages_done(0x%lx) good_bytes=0x%llx"
" length=0x%lx nr_pages=%u\n",
@@ -519,10 +516,9 @@ static void writepages_done(struct ore_io_state *ios, void *p)
{
struct page_collect *pcol = p;
int i;
- u64 resid;
u64 good_bytes;
u64 length = 0;
- int ret = ore_check_io(ios, &resid);
+ int ret = ore_check_io(ios, NULL);
atomic_dec(&pcol->sbi->s_curr_pending);
@@ -530,10 +526,8 @@ static void writepages_done(struct ore_io_state *ios, void *p)
good_bytes = pcol->length;
ret = PAGE_WAS_NOT_IN_IO;
} else {
- good_bytes = pcol->length - resid;
+ good_bytes = 0;
}
- if (good_bytes > pcol->ios->length)
- good_bytes = pcol->ios->length;
EXOFS_DBGMSG2("writepages_done(0x%lx) good_bytes=0x%llx"
" length=0x%lx nr_pages=%u\n",