aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-09-28 06:25:50 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-10-14 12:54:42 -0400
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 5a62420cbdb1..86c0ac87b8e3 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)
194static int __readpages_done(struct page_collect *pcol) 194static int __readpages_done(struct page_collect *pcol)
195{ 195{
196 int i; 196 int i;
197 u64 resid;
198 u64 good_bytes; 197 u64 good_bytes;
199 u64 length = 0; 198 u64 length = 0;
200 int ret = ore_check_io(pcol->ios, &resid); 199 int ret = ore_check_io(pcol->ios, NULL);
201 200
202 if (likely(!ret)) { 201 if (likely(!ret)) {
203 good_bytes = pcol->length; 202 good_bytes = pcol->length;
204 ret = PAGE_WAS_NOT_IN_IO; 203 ret = PAGE_WAS_NOT_IN_IO;
205 } else { 204 } else {
206 good_bytes = pcol->length - resid; 205 good_bytes = 0;
207 } 206 }
208 if (good_bytes > pcol->ios->length)
209 good_bytes = pcol->ios->length;
210 207
211 EXOFS_DBGMSG2("readpages_done(0x%lx) good_bytes=0x%llx" 208 EXOFS_DBGMSG2("readpages_done(0x%lx) good_bytes=0x%llx"
212 " length=0x%lx nr_pages=%u\n", 209 " length=0x%lx nr_pages=%u\n",
@@ -519,10 +516,9 @@ static void writepages_done(struct ore_io_state *ios, void *p)
519{ 516{
520 struct page_collect *pcol = p; 517 struct page_collect *pcol = p;
521 int i; 518 int i;
522 u64 resid;
523 u64 good_bytes; 519 u64 good_bytes;
524 u64 length = 0; 520 u64 length = 0;
525 int ret = ore_check_io(ios, &resid); 521 int ret = ore_check_io(ios, NULL);
526 522
527 atomic_dec(&pcol->sbi->s_curr_pending); 523 atomic_dec(&pcol->sbi->s_curr_pending);
528 524
@@ -530,10 +526,8 @@ static void writepages_done(struct ore_io_state *ios, void *p)
530 good_bytes = pcol->length; 526 good_bytes = pcol->length;
531 ret = PAGE_WAS_NOT_IN_IO; 527 ret = PAGE_WAS_NOT_IN_IO;
532 } else { 528 } else {
533 good_bytes = pcol->length - resid; 529 good_bytes = 0;
534 } 530 }
535 if (good_bytes > pcol->ios->length)
536 good_bytes = pcol->ios->length;
537 531
538 EXOFS_DBGMSG2("writepages_done(0x%lx) good_bytes=0x%llx" 532 EXOFS_DBGMSG2("writepages_done(0x%lx) good_bytes=0x%llx"
539 " length=0x%lx nr_pages=%u\n", 533 " length=0x%lx nr_pages=%u\n",