From: zab Date: Thu, 31 Jul 2003 20:29:35 +0000 (+0000) Subject: make sanity and iozone run from llite over the lov in the new ocp X-Git-Tag: v1_7_0_51~2^7~732 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6762a36b28ed833b0c2ee1f64dac45a9ad7b6395;p=fs%2Flustre-release.git make sanity and iozone run from llite over the lov in the new ocp io model. - add ocp_off to the ocp so the lov can remap it as it passes through - fix up the page accounting a bit 'cause truncate doesn't really know right know to subtract pages from the dirty or io counts - pass our completion struct, _not_ a pointer to the complete function - make sure to always free the ocp in commit_write_sync - disable the watermark io until it actually does something - make sure to alter the filehandle/o_id as we pass through the lov - initialize our loi bits in lov_unpackmd --- diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c index 1ea2d48..c2e31b7 100644 --- a/lustre/llite/rw24.c +++ b/lustre/llite/rw24.c @@ -77,6 +77,7 @@ int ll_start_readpage_24(struct ll_file_data *fd, struct obd_export *exp, RETURN(PTR_ERR(ocp)); ocp->ocp_callback = ll_complete_readpage_24; + ocp->ocp_off = (obd_off)page->index << PAGE_CACHE_SHIFT; ocp->ocp_count = PAGE_CACHE_SIZE; ocp->ocp_flag = 0; @@ -235,6 +236,7 @@ void ll_complete_writepage_24(struct obd_client_page *ocp, int rc) LASSERT(page->private == (unsigned long)ocp); LASSERT(PageLocked(page)); + ll_page_acct(0, -1); /* io before dirty, this is so lame. */ rc = ll_clear_dirty_pages(ll_i2obdconn(inode), ll_i2info(inode)->lli_smd, page->index, page->index); @@ -269,13 +271,14 @@ static int ll_writepage_24(struct page *page) GOTO(out, rc = PTR_ERR(ocp)); ocp->ocp_callback = ll_complete_writepage_24; + ocp->ocp_off = (obd_off)page->index << PAGE_CACHE_SHIFT; ocp->ocp_count = ll_ocp_write_count(inode, page); ocp->ocp_flag = OBD_BRW_CREATE|OBD_BRW_FROM_GRANT; obd_brw_plug(OBD_BRW_WRITE, exp, ll_i2info(inode)->lli_smd, NULL); rc = ll_start_ocp_io(page); if (rc == 0) { - ll_page_acct(-1, 1); + ll_page_acct(0, 1); ll_start_io_from_dirty(inode, ll_complete_writepage_24); } else { ocp_free(page);