req, lock);
buflen = req_capsule_get_size(&req->rq_pill,
&RMF_DLM_LVB, RCL_SERVER);
- buflen = ldlm_lvbo_fill(lock, buf, buflen);
- if (buflen >= 0)
- req_capsule_shrink(&req->rq_pill,
- &RMF_DLM_LVB,
- buflen, RCL_SERVER);
+ if (buflen >= 0) {
+ buflen = ldlm_lvbo_fill(lock, buf,
+ buflen);
+ if (buflen >= 0)
+ req_capsule_shrink(
+ &req->rq_pill,
+ &RMF_DLM_LVB,
+ buflen, RCL_SERVER);
+ else
+ rc = buflen;
+ }
else
rc = buflen;
}
ret = ll_read_ahead_pages(env, io, queue,
ria, &reserved, mapping, &ra_end);
- LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
if (reserved != 0)
ll_ra_count_put(ll_i2sbi(inode), reserved);
}
ee_free(ee);
} else if (rce->rce_ops == RMT_RSETFACL) {
- size = lustre_posix_acl_xattr_filter(
- (posix_acl_xattr_header *)value,
- size, &new_value);
- if (unlikely(size < 0))
- RETURN(size);
+ int acl_size = lustre_posix_acl_xattr_filter(
+ (posix_acl_xattr_header *)value,
+ size, &new_value);
+ if (unlikely(acl_size < 0))
+ RETURN(acl_size);
+ size = acl_size;
pv = (const char *)new_value;
} else
return rc;
}
-static int lodname2mdt_index(char *lodname, int *index)
+static int lodname2mdt_index(char *lodname, long *index)
{
char *ptr, *tmp;
if (mdt == NULL) {
mdt_index = 0;
} else {
+ long long_index;
rc = lodname2mdt_index(
- lustre_cfg_string(lcfg, 0), &mdt_index);
+ lustre_cfg_string(lcfg, 0),
+ &long_index);
if (rc != 0)
GOTO(out, rc);
+ mdt_index = long_index;
}
rc = lod_add_device(env, lod, arg1, index, gen,
mdt_index, LUSTRE_OSC_NAME, 1);
const char *identity_upcall = "NONE";
struct md_device *next;
int rc;
- int node_id;
+ long node_id;
mntopt_t mntopts;
ENTRY;
struct llog_rec_hdr *rec, void *data)
{
struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data;
- static int l, remains, from, to;
+ static int l, remains;
+ static long from, to;
static char *out;
char *endp;
int cur_index, rc = 0;
struct llog_rec_hdr *rec, void *data)
{
struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data;
- static int l, remains, from, to;
+ static int l, remains;
+ static long from, to;
static char *out;
char *endp;
int cur_index;
struct obd_import *imp;
class_uuid_t uuid;
char *src, *tgt, *mdt, *osdname = NULL;
- int rc, idx;
+ int rc;
+ long idx;
ENTRY;
} else {
/* New OSC name fsname-OSTXXXX-osc-MDTXXXX */
if (strncmp(tgt, "-MDT", 4) != 0 &&
- strncmp(tgt, "-OST", 4) != 0) {
+ strncmp(tgt, "-OST", 4) != 0) {
CERROR("%s: invalid target name %s\n",
m->opd_obd->obd_name, lustre_cfg_string(cfg, 0));
RETURN(-EINVAL);
int num_obds, int **obdindexes, int *obdindex,
enum tgt_type type)
{
- int ret, obdcount, obd_valid = 0, obdnum, i;
+ int ret, obdcount, obd_valid = 0, obdnum;
+ long i;
struct obd_uuid *uuids = NULL;
char buf[16];
int *indexes;
{
char fsname[20];
char *ptr;
- int fd, index, rc;
+ int fd, rc;
+ long index;
/* Take path, fsname, or MDTname. Assume MDT0000 in the former cases.
Open root and parse mdt index. */
int llapi_changelog_clear(const char *mdtname, const char *idstr,
long long endrec)
{
- int id;
+ long id;
if (endrec < 0) {
llapi_err_noerrno(LLAPI_MSG_ERROR,