X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flov%2Flov_io.c;h=464c8f2c24ecc600f035f48fecb2fd1287f251b4;hp=3cc6ec027e9900cfddf585d9a76433da8a02337c;hb=8d6d2914cf85be0508805cd5195163e1959652f4;hpb=05b9da4fd124c61fd41d4b560773c0552a1ee5d7 diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 3cc6ec0..464c8f2 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -191,19 +191,6 @@ out: * Lov io operations. * */ - -int lov_page_index(const struct cl_page *page) -{ - const struct cl_page_slice *slice; - ENTRY; - - slice = cl_page_at(page, &lov_device_type); - LASSERT(slice != NULL); - LASSERT(slice->cpl_obj != NULL); - - RETURN(cl2lov_page(slice)->lps_index); -} - static int lov_io_subio_init(const struct lu_env *env, struct lov_io *lio, struct cl_io *io) { @@ -1137,10 +1124,10 @@ static int lov_io_submit(const struct lu_env *env, cl_2queue_init(cl2q); cl_page_list_move(&cl2q->c2_qin, qin, page); - index = lov_page_index(page); + index = page->cp_lov_index; cl_page_list_for_each_safe(page, tmp, qin) { /* this page is not on this stripe */ - if (index != lov_page_index(page)) + if (index != page->cp_lov_index) continue; cl_page_list_move(&cl2q->c2_qin, qin, page); @@ -1204,10 +1191,10 @@ static int lov_io_commit_async(const struct lu_env *env, cl_page_list_move(plist, queue, page); - index = lov_page_index(page); + index = page->cp_lov_index; while (queue->pl_nr > 0) { page = cl_page_list_first(queue); - if (index != lov_page_index(page)) + if (index != page->cp_lov_index) break; cl_page_list_move(plist, queue, page); @@ -1253,7 +1240,7 @@ static int lov_io_fault_start(const struct lu_env *env, fio = &ios->cis_io->u.ci_fault; lio = cl2lov_io(env, ios); - sub = lov_sub_get(env, lio, lov_page_index(fio->ft_page)); + sub = lov_sub_get(env, lio, fio->ft_page->cp_lov_index); sub->sub_io.u.ci_fault.ft_nob = fio->ft_nob; RETURN(lov_io_start(env, ios));