Change type of changelog_*{namelen,size}() to size_t.
Fixed string specifier for unsigned types.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie24c87242328d14ee608ad38b530a6e581db93b9
Reviewed-on: http://review.whamcloud.com/12474
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
};
-static inline unsigned int changelog_rec_offset(enum changelog_rec_flags crf)
+static inline size_t changelog_rec_offset(enum changelog_rec_flags crf)
{
- unsigned int size = sizeof(struct changelog_rec);
+ size_t size = sizeof(struct changelog_rec);
if (crf & CLF_RENAME)
size += sizeof(struct changelog_ext_rename);
return size;
}
-static inline unsigned int changelog_rec_size(struct changelog_rec *rec)
+static inline size_t changelog_rec_size(struct changelog_rec *rec)
{
return changelog_rec_offset(rec->cr_flags);
}
-static inline unsigned int changelog_rec_varsize(struct changelog_rec *rec)
+static inline size_t changelog_rec_varsize(struct changelog_rec *rec)
{
return changelog_rec_size(rec) - sizeof(*rec) + rec->cr_namelen;
}
CLF_SUPPORTED);
}
-static inline int changelog_rec_snamelen(struct changelog_rec *rec)
+static inline size_t changelog_rec_snamelen(struct changelog_rec *rec)
{
return rec->cr_namelen - strlen(changelog_rec_name(rec)) - 1;
}
struct range_lock range;
ENTRY;
- CDEBUG(D_VFSTRACE, "file: %s, type: %d ppos: "LPU64", count: %zd\n",
+ CDEBUG(D_VFSTRACE, "file: %s, type: %d ppos: "LPU64", count: %zu\n",
file->f_dentry->d_name.name, iot, *ppos, count);
restart:
/* If any bit been read/written (result != 0), we just return
* short read/write instead of restart io. */
if ((result == 0 || result == -ENODATA) && io->ci_need_restart) {
- CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zd\n",
+ CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zu\n",
iot == CIT_READ ? "read" : "write",
file->f_dentry->d_name.name, *ppos, count);
LASSERTF(io->ci_nob == 0, "%zd\n", io->ci_nob);
LASSERT(sizeof(*lum) < sizeof(*lum3));
if (buf->lb_len < sizeof(*lum)) {
- CDEBUG(D_IOCTL, "buf len %zd too small for lov_user_md\n",
+ CDEBUG(D_IOCTL, "buf len %zu too small for lov_user_md\n",
buf->lb_len);
GOTO(out, rc = -EINVAL);
}
stripe_count = le16_to_cpu(lum->lmm_stripe_count);
if (buf->lb_len != lum_size) {
- CDEBUG(D_IOCTL, "invalid buf len %zd for lov_user_md with "
+ CDEBUG(D_IOCTL, "invalid buf len %zu for lov_user_md with "
"magic %#x and stripe_count %u\n",
buf->lb_len, magic, stripe_count);
GOTO(out, rc = -EINVAL);
lum3 = buf->lb_buf;
if (buf->lb_len < sizeof(*lum3)) {
- CDEBUG(D_IOCTL, "buf len %zd too small for lov_user_md_v3\n",
+ CDEBUG(D_IOCTL, "buf len %zu too small for lov_user_md_v3\n",
buf->lb_len);
GOTO(out, rc = -EINVAL);
}
if (osd_object_auth(env, dt, capa, CAPA_OPC_META_WRITE))
return -EACCES;
- CDEBUG(D_INODE, DFID" set xattr '%s' with size %zd\n",
+ CDEBUG(D_INODE, DFID" set xattr '%s' with size %zu\n",
PFID(lu_object_fid(&dt->do_lu)), name, buf->lb_len);
osd_trans_exec_op(env, handle, OSD_OT_XATTR_SET);
tmp = object_update_param_get(update, 2, &size);
if (tmp == NULL || size != sizeof(*tmp)) {
- CERROR("%s: emptry or wrong size %zd flag: rc = %d\n",
+ CERROR("%s: emptry or wrong size %zu flag: rc = %d\n",
tgt_name(tsi->tsi_tgt), size, -EPROTO);
RETURN(err_serious(-EPROTO));
}
tmp = object_update_param_get(update, 1, &size);
if (tmp == NULL || size != sizeof(*tmp)) {
- CERROR("%s: empty or wrong size %zd pos: rc = %d\n",
+ CERROR("%s: empty or wrong size %zu pos: rc = %d\n",
tgt_name(tsi->tsi_tgt), size, -EPROTO);
RETURN(err_serious(-EPROTO));
}
printf(" s="DFID" sp="DFID" %.*s",
PFID(&rnm->cr_sfid),
PFID(&rnm->cr_spfid),
- changelog_rec_snamelen(rec),
+ (int)changelog_rec_snamelen(rec),
changelog_rec_sname(rec));
}
printf("\n");