From 553feee7bf0492aab15658d2cc86a730954a1b83 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 11 May 2005 18:28:46 +0000 Subject: [PATCH] Branch b1_4 Pass OBD_BRW_WRITE to filter_alloc_iobuf() from preprw_write(). This parameter is actually unused at this time, so no real effect. b=6289 r=fergal (original change) --- lustre/obdfilter/filter_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index baa8173..bc37000 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -318,7 +318,7 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa, fsfilt_check_slow(now, obd_timeout, "preprw_read setup"); - for (i = 0, lnb = res, rnb = nb; i < obj->ioo_bufcnt; + for (i = 0, lnb = res, rnb = nb; i < obj->ioo_bufcnt; i++, rnb++, lnb++) { lnb->dentry = dentry; lnb->offset = rnb->offset; @@ -327,8 +327,8 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa, if (inode->i_size <= rnb->offset) /* If there's no more data, abort early. - * lnb->page == NULL and lnb->rc == 0, so it's - * easy to detect later. */ + * lnb->page == NULL and lnb->rc == 0, so it's + * easy to detect later. */ break; else rc = filter_alloc_dio_page(obd, inode, lnb); @@ -527,7 +527,7 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa, memset(res, 0, niocount * sizeof(*res)); - rc = filter_alloc_iobuf(&exp->exp_obd->u.filter, OBD_BRW_READ, + rc = filter_alloc_iobuf(&exp->exp_obd->u.filter, OBD_BRW_WRITE, obj->ioo_bufcnt, &iobuf); if (rc) GOTO(cleanup, rc); -- 1.8.3.1