From: adilger Date: Sat, 7 Feb 2004 01:19:35 +0000 (+0000) Subject: Fix type mismatch errors found on ia64. X-Git-Tag: 1.0.4~23 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a7e86379d94a63975908766c63fecd91ead60763;p=fs%2Flustre-release.git Fix type mismatch errors found on ia64. --- diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index f3298bf..ae4117c 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -985,7 +985,7 @@ int mds_mfd_close(struct ptlrpc_request *req, struct obd_device *obd, struct mds_obd *mds = &obd->u.mds; struct inode *pending_dir = mds->mds_pending_dir->d_inode; void *handle = NULL; - struct mds_body *request_body = NULL, *reply_body; + struct mds_body *request_body = NULL, *reply_body = NULL; struct dentry_params dp; ENTRY; diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c index 785739f..310f122 100644 --- a/lustre/obdclass/llog_ioctl.c +++ b/lustre/obdclass/llog_ioctl.c @@ -182,7 +182,7 @@ static int llog_print_cb(struct llog_handle *handle, struct llog_rec_hdr *rec, } l = snprintf(out, remains, - "[index]: %05d [logid]: #%llx#%llx#%08x\n", + "[index]: %05d [logid]: #"LPX64"#"LPX64"#%08x\n", cur_index, lir->lid_id.lgl_oid, lir->lid_id.lgl_ogr, lir->lid_id.lgl_ogen); } else { @@ -208,7 +208,7 @@ static int llog_remove_log(struct llog_handle *cat, struct llog_logid *logid) down_write(&cat->lgh_lock); rc = llog_cat_id2handle(cat, &log, logid); if (rc) { - CDEBUG(D_IOCTL, "cannot find log #%0llx#%0llx#%08x\n", + CDEBUG(D_IOCTL, "cannot find log #"LPX64"#"LPX64"#%08x\n", logid->lgl_oid, logid->lgl_ogr, logid->lgl_ogen); GOTO(out, rc = -ENOENT); } @@ -277,7 +277,7 @@ int llog_ioctl(struct llog_ctxt *ctxt, int cmd, struct obd_ioctl_data *data) char *out = data->ioc_bulk; l = snprintf(out, remains, - "logid: #%llx#%llx#%08x\n" + "logid: #"LPX64"#"LPX64"#%08x\n" "flags: %x (%s)\n" "records count: %d\n" "last index: %d\n", @@ -389,7 +389,7 @@ int llog_catlog_list(struct obd_device *obd, int count, id = idarray; for (i = 0; i < count; i++) { l = snprintf(out, remains, - "catalog log: #%llx#%llx#%08x\n", + "catalog log: #"LPX64"#"LPX64"#%08x\n", id->lgl_oid, id->lgl_ogr, id->lgl_ogen); id++; out += l; diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index 18a1afe..3271968 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -336,7 +336,7 @@ static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx, ppos = *cur_offset; rc = fsfilt_read_record(loghandle->lgh_ctxt->loc_exp->exp_obd, loghandle->lgh_file, buf, len, - cur_offset); + &ppos); if (rc) { CERROR("Cant read llog block at log id "LPU64 @@ -344,11 +344,12 @@ static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx, loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen, *cur_offset); - RETURN(rc); + RETURN(rc); } - /* put number of readed bytes in rc to make code simpler */ - rc = *cur_offset - ppos; + /* put number of bytes read into rc to make code simpler */ + rc = ppos - *cur_offset; + *cur_offset = ppos; if (rc == 0) /* end of file, nothing to do */ RETURN(0); @@ -357,7 +358,7 @@ static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx, CERROR("Invalid llog block at log id "LPU64"/%u offset " LPU64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen, *cur_offset); - RETURN(-EINVAL); + RETURN(-EINVAL); } tail = buf + rc - sizeof(struct llog_rec_tail);