@@ -197,7 +197,7 @@ static int ll_get_name(struct dentry *dentry, char *name,
struct ll_getname_data lgd = {
.lgd_name = name,
.lgd_fid = ll_i2info(d_inode(child))->lli_fid,
- .ctx.actor = ll_nfs_get_name_filldir,
+ .ctx.actor = (filldir_t)ll_nfs_get_name_filldir,
};
struct md_op_data *op_data;
u64 pos = 0;
@@ -255,9 +255,8 @@ config_recover_log_add(struct obd_device *obd, char *fsname,
* where only clients are notified if one of cmd server restarts
*/
LASSERT(strlen(fsname) < sizeof(logname) / 2);
- strcpy(logname, fsname);
LASSERT(lcfg.cfg_instance);
- strcat(logname, "-cliir");
+ scnprintf(logname, sizeof(logname), "%s-cliir", fsname);
cld = do_config_log_add(obd, logname, MGS_CFG_T_RECOVER, &lcfg, sb);
return cld;
@@ -1277,6 +1277,7 @@ int obd_get_request_slot(struct client_obd *cli)
else
list_del(&orsw.orsw_entry);
}
+ rc = -EINTR;
}
if (orsw.orsw_signaled) {
@@ -1328,7 +1329,7 @@ int obd_set_max_rpcs_in_flight(struct client_obd *cli, u32 max)
if (max > OBD_MAX_RIF_MAX || max < 1)
return -ERANGE;
- CDEBUG(D_INFO, "%s: max = %hu max_mod = %u rif = %u\n",
+ CDEBUG(D_INFO, "%s: max = %u max_mod = %u rif = %u\n",
cli->cl_import->imp_obd->obd_name, max,
cli->cl_max_mod_rpcs_in_flight, cli->cl_max_rpcs_in_flight);
@@ -1384,6 +1385,7 @@ int obd_set_max_mod_rpcs_in_flight(struct client_obd *cli, u16 max)
if (max > OBD_MAX_RIF_MAX || max < 1)
return -ERANGE;
+ ocd = &cli->cl_import->imp_connect_data;
CDEBUG(D_INFO, "%s: max = %hu flags = %llx, max_mod = %u rif = %u\n",
cli->cl_import->imp_obd->obd_name, max, ocd->ocd_connect_flags,
ocd->ocd_maxmodrpcs, cli->cl_max_rpcs_in_flight);
@@ -1396,9 +1398,9 @@ int obd_set_max_mod_rpcs_in_flight(struct client_obd *cli, u16 max)
*/
if (max >= cli->cl_max_rpcs_in_flight) {
CDEBUG(D_INFO,
- "%s: increasing max_rpcs_in_flight=%hu to allow larger max_mod_rpcs_in_flight=%u\n",
+ "%s: increasing max_rpcs_in_flight=%u to allow larger max_mod_rpcs_in_flight=%u\n",
cli->cl_import->imp_obd->obd_name, max + 1, max);
- return -ERANGE;
+ obd_set_max_rpcs_in_flight(cli, max + 1);
}
/* cannot exceed max modify RPCs in flight supported by the server,
@@ -65,7 +65,7 @@ static struct ldlm_lock *osc_handle_ptr(struct lustre_handle *handle)
/**
* Invariant that has to be true all of the time.
*/
-static int osc_lock_invariant(struct osc_lock *ols)
+static inline int osc_lock_invariant(struct osc_lock *ols)
{
struct ldlm_lock *lock = osc_handle_ptr(&ols->ols_handle);
struct ldlm_lock *olock = ols->ols_dlmlock;
@@ -912,7 +912,8 @@ static inline void unstable_page_accounting(struct ptlrpc_bulk_desc *desc,
}
if (count > 0) {
- mod_node_page_state(pgdat, NR_WRITEBACK,
+ mod_node_page_state(pgdat,
+ (enum zone_stat_item)NR_WRITEBACK,
factor * count);
count = 0;
}
@@ -920,7 +921,8 @@ static inline void unstable_page_accounting(struct ptlrpc_bulk_desc *desc,
++count;
}
if (count > 0)
- mod_node_page_state(last, NR_WRITEBACK, factor * count);
+ mod_node_page_state(last, (enum zone_stat_item)NR_WRITEBACK,
+ factor * count);
}
static inline void add_unstable_page_accounting(struct ptlrpc_bulk_desc *desc,