From abb618c5e7c5141fe2b2a90e5ea895e1bdc77456 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 29 Sep 2009 08:40:13 +0000 Subject: [PATCH] - use appropriate temp. storage for client's data --- lustre/ofd/ofd_fs.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lustre/ofd/ofd_fs.c b/lustre/ofd/ofd_fs.c index 1aaecd5..92c997f 100644 --- a/lustre/ofd/ofd_fs.c +++ b/lustre/ofd/ofd_fs.c @@ -349,14 +349,14 @@ static int filter_last_rcvd_read(const struct lu_env *env, { struct filter_thread_info *info = filter_info(env); struct lu_buf buf; - int rc; + int rc; - buf.lb_buf = &info->fti_fsd; - buf.lb_len = sizeof(info->fti_fsd); + buf.lb_buf = &info->fti_fcd; + buf.lb_len = sizeof(*lcd); rc = dt_record_read(env, ofd->ofd_last_rcvd, &buf, off); if (rc == 0) - lcd_le_to_cpu((struct lsd_client_data *) &info->fti_fsd, lcd); + lcd_le_to_cpu((struct lsd_client_data *) &info->fti_fcd, lcd); return rc; } @@ -366,16 +366,12 @@ int filter_last_rcvd_write(const struct lu_env *env, loff_t *off, struct thandle *th) { struct filter_thread_info *info = filter_info(env); - struct lu_buf buf; - int rc; + int rc; - lcd_cpu_to_le(lcd, (struct lsd_client_data *) &info->fti_fsd); + lcd_cpu_to_le(lcd, &info->fti_fcd); - buf.lb_buf = &info->fti_fsd; - buf.lb_len = sizeof(info->fti_fsd); - rc = filter_record_write(env, ofd, ofd->ofd_last_rcvd, - &info->fti_fsd, *off, sizeof(info->fti_fsd), th); + &info->fti_fcd, *off, sizeof(*lcd), th); return rc; } -- 1.8.3.1