X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fliblustre%2Fllite_cl.c;h=98ae334b01039e7a6a2a33b3f519f32feefb32a9;hp=aa5b72ccb2f445b475611af97bdab3c405d6addb;hb=490fd542a9bc8e8dafd22a8f4ca7b186f87ab21c;hpb=32becabb43b6e8f21c030c23c01c3f02e351eaea diff --git a/lustre/liblustre/llite_cl.c b/lustre/liblustre/llite_cl.c index aa5b72cc..98ae334 100644 --- a/lustre/liblustre/llite_cl.c +++ b/lustre/liblustre/llite_cl.c @@ -321,14 +321,7 @@ static void slp_page_fini_common(struct ccc_page *cp) static void slp_page_completion_common(const struct lu_env *env, struct ccc_page *cp, int ioret) { - struct cl_sync_io *anchor = cp->cpg_sync_io; - - if (anchor) { - cp->cpg_sync_io = NULL; - cl_sync_io_note(anchor, ioret); - } else { - LBUG(); - } + LASSERT(cp->cpg_cl.cpl_page->cp_sync_io != NULL); } static void slp_page_completion_read(const struct lu_env *env, @@ -503,12 +496,10 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io, struct intnl_stat *st = llu_i2stat(inode); struct obd_export *exp = llu_i2obdexp(inode); struct page *page; - int rc = 0, npages = 0, ret_bytes = 0; + int rc = 0, ret_bytes = 0; int local_lock; struct cl_page *clp; - struct ccc_page *clup; struct cl_2queue *queue; - struct cl_sync_io *anchor = &ccc_env_info(env)->cti_sync_io; ENTRY; if (!exp) @@ -561,8 +552,6 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io, break; } - clup = cl2ccc_page(cl_page_at(clp, &slp_device_type)); - clup->cpg_sync_io = anchor; cl_2queue_add(queue, clp); /* drop the reference count for cl_page_find, so that the page @@ -571,7 +560,6 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io, cl_page_clip(env, clp, offset, offset+bytes); - npages++; count -= bytes; pos += bytes; buf += bytes; @@ -581,25 +569,10 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io, page++; } while (count); - cl_sync_io_init(anchor, npages); - /* printk("Inited anchor with %d pages\n", npages); */ - if (rc == 0) { - enum cl_req_type crt; - - crt = io->ci_type == CIT_READ ? CRT_READ : CRT_WRITE; - rc = cl_io_submit_rw(env, io, crt, queue, CRP_NORMAL); - if (rc == 0) { - /* If some pages weren't sent for any reason, count - * then as completed, to avoid infinite wait. */ - cl_page_list_for_each(clp, &queue->c2_qin) { - CL_PAGE_DEBUG(D_ERROR, env, clp, - "not completed\n"); - cl_sync_io_note(anchor, +1); - } - /* wait for the IO to be finished. */ - rc = cl_sync_io_wait(env, io, &queue->c2_qout, anchor); - } + enum cl_req_type iot; + iot = io->ci_type == CIT_READ ? CRT_READ : CRT_WRITE; + rc = cl_io_submit_sync(env, io, iot, queue, CRP_NORMAL, 0); } group->lig_rc = rc;