Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-9753 ofd: 64-bits diff variable to avoid overflow
[fs/lustre-release.git]
/
lustre
/
ofd
/
ofd_obd.c
diff --git
a/lustre/ofd/ofd_obd.c
b/lustre/ofd/ofd_obd.c
index
03489fe
..
cc04521
100644
(file)
--- a/
lustre/ofd/ofd_obd.c
+++ b/
lustre/ofd/ofd_obd.c
@@
-1011,9
+1011,10
@@
static int ofd_echo_create(const struct lu_env *env, struct obd_export *exp,
struct ofd_device *ofd = ofd_exp(exp);
u64 seq = ostid_seq(&oa->o_oi);
struct ofd_seq *oseq;
struct ofd_device *ofd = ofd_exp(exp);
u64 seq = ostid_seq(&oa->o_oi);
struct ofd_seq *oseq;
- int rc = 0, diff = 1;
long granted;
u64 next_id;
long granted;
u64 next_id;
+ s64 diff = 1;
+ int rc = 0;
int count;
ENTRY;
int count;
ENTRY;
@@
-1049,13
+1050,13
@@
static int ofd_echo_create(const struct lu_env *env, struct obd_export *exp,
rc = granted;
granted = 0;
CDEBUG(D_HA, "%s: failed to acquire grant space for "
rc = granted;
granted = 0;
CDEBUG(D_HA, "%s: failed to acquire grant space for "
- "precreate (%d): rc = %d\n", ofd_name(ofd), diff, rc);
+ "precreate (%
ll
d): rc = %d\n", ofd_name(ofd), diff, rc);
diff = 0;
GOTO(out, rc);
}
next_id = ofd_seq_last_oid(oseq) + 1;
diff = 0;
GOTO(out, rc);
}
next_id = ofd_seq_last_oid(oseq) + 1;
- count = ofd_precreate_batch(ofd, diff);
+ count = ofd_precreate_batch(ofd,
(int)
diff);
rc = ofd_precreate_objects(env, ofd, next_id, oseq, count, 0);
if (rc < 0) {
rc = ofd_precreate_objects(env, ofd, next_id, oseq, count, 0);
if (rc < 0) {