mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -102,7 +102,7 @@ static int iscsi_session_alloc(struct iscsi_target *target,
|
||||
|
||||
if (!session->sess_params.rdma_extensions) {
|
||||
err = iscsi_threads_pool_get(
|
||||
(bool)scst_get_acg_tgt_priv(session->scst_sess->acg),
|
||||
scst_get_acg_tgt_priv(session->scst_sess->acg) != NULL,
|
||||
&session->scst_sess->acg->acg_cpu_mask,
|
||||
&session->sess_thr_pool);
|
||||
if (err != 0)
|
||||
|
||||
@@ -665,7 +665,7 @@ static ssize_t iscsi_acg_sess_dedicated_threads_show(struct kobject *kobj,
|
||||
TRACE_ENTRY();
|
||||
|
||||
acg = container_of(kobj, struct scst_acg, acg_kobj);
|
||||
dedicated = (bool)scst_get_acg_tgt_priv(acg);
|
||||
dedicated = scst_get_acg_tgt_priv(acg) != NULL;
|
||||
|
||||
pos = sprintf(buf, "%d\n%s", dedicated,
|
||||
dedicated ? SCST_SYSFS_KEY_MARK "\n" : "");
|
||||
|
||||
@@ -4805,7 +4805,8 @@ static void scst_free_acg(struct scst_acg *acg)
|
||||
struct scst_session *sess;
|
||||
struct scst_tgt *tgt = acg->tgt;
|
||||
|
||||
TRACE_DBG("Freeing acg %s/%s", tgt->tgt_name, acg->acg_name);
|
||||
/* For procfs acg->tgt could be NULL */
|
||||
TRACE_DBG("Freeing acg %s/%s", tgt ? tgt->tgt_name : "(tgt=NULL)", acg->acg_name);
|
||||
|
||||
list_for_each_entry_safe(acg_dev, acg_dev_tmp, &acg->acg_dev_list,
|
||||
acg_dev_list_entry) {
|
||||
@@ -6231,8 +6232,6 @@ static void scst_ws_write_cmd_finished(struct scst_cmd *cmd)
|
||||
wsp->ws_cur_in_flight--;
|
||||
|
||||
if (cmd->status != 0) {
|
||||
int rc;
|
||||
|
||||
TRACE_DBG("Write cmd %p (ws cmd %p) finished not successfully",
|
||||
cmd, ws_cmd);
|
||||
sBUG_ON(cmd->resp_data_len != 0);
|
||||
@@ -6662,8 +6661,6 @@ static void scst_cwr_read_cmd_finished(struct scst_cmd *cmd)
|
||||
TRACE_DBG("READ cmd %p finished (cwr cmd %p)", cmd, cwr_cmd);
|
||||
|
||||
if (cmd->status != 0) {
|
||||
int rc;
|
||||
|
||||
TRACE_DBG("Read cmd %p (cwr cmd %p) finished not successfully",
|
||||
cmd, cwr_cmd);
|
||||
sBUG_ON(cmd->resp_data_len != 0);
|
||||
|
||||
@@ -2569,7 +2569,7 @@ out_unlock:
|
||||
/* Called with dev_pr_mutex locked, no IRQ */
|
||||
void scst_pr_read_keys(struct scst_cmd *cmd, uint8_t *buffer, int buffer_size)
|
||||
{
|
||||
int i, offset = 0, size, size_max;
|
||||
int offset = 0, size, size_max;
|
||||
struct scst_device *dev = cmd->dev;
|
||||
struct scst_dev_registrant *reg;
|
||||
|
||||
@@ -2592,7 +2592,6 @@ void scst_pr_read_keys(struct scst_cmd *cmd, uint8_t *buffer, int buffer_size)
|
||||
size = 0;
|
||||
size_max = buffer_size - 8;
|
||||
|
||||
i = 0;
|
||||
list_for_each_entry(reg, &dev->dev_registrants_list,
|
||||
dev_registrants_list_entry) {
|
||||
if (size_max - size >= 8) {
|
||||
@@ -2602,7 +2601,7 @@ void scst_pr_read_keys(struct scst_cmd *cmd, uint8_t *buffer, int buffer_size)
|
||||
WARN_ON(reg->key == 0);
|
||||
|
||||
put_unaligned(reg->key,
|
||||
(__be64 *)&buffer[offset + 8 * i]);
|
||||
(__be64 *)&buffer[offset]);
|
||||
|
||||
offset += 8;
|
||||
}
|
||||
|
||||
@@ -4131,7 +4131,7 @@ next:
|
||||
|
||||
if (likely(scst_cmd_completed_good(cmd))) {
|
||||
if (cmd->deferred_dif_read_check) {
|
||||
int rc = scst_dif_process_read(cmd);
|
||||
rc = scst_dif_process_read(cmd);
|
||||
|
||||
if (unlikely(rc != 0)) {
|
||||
cmd->deferred_dif_read_check = 0;
|
||||
@@ -7452,7 +7452,6 @@ static int scst_mgmt_affected_cmds_done(struct scst_mgmt_cmd *mcmd)
|
||||
list_for_each_entry(s, &tgt->sess_list, sess_list_entry) {
|
||||
for (i = 0; i < SESS_TGT_DEV_LIST_HASH_SIZE; i++) {
|
||||
struct list_head *head = &s->sess_tgt_dev_list[i];
|
||||
struct scst_tgt_dev *tgt_dev;
|
||||
|
||||
list_for_each_entry_rcu(tgt_dev, head,
|
||||
sess_tgt_dev_list_entry) {
|
||||
|
||||
@@ -120,7 +120,7 @@ static int set_sense(uint8_t *buffer, int len, int key, int asc, int ascq)
|
||||
* scst_set_invalid_field_in_parm_list()
|
||||
*/
|
||||
|
||||
void set_cmd_error(struct vdisk_cmd *vcmd, int key, int asc, int ascq)
|
||||
static void set_cmd_error(struct vdisk_cmd *vcmd, int key, int asc, int ascq)
|
||||
{
|
||||
struct scst_user_scsi_cmd_reply_exec *reply = &vcmd->reply->exec_reply;
|
||||
|
||||
@@ -137,7 +137,7 @@ void set_cmd_error(struct vdisk_cmd *vcmd, int key, int asc, int ascq)
|
||||
return;
|
||||
}
|
||||
|
||||
void set_busy(struct vdisk_cmd *vcmd)
|
||||
static void set_busy(struct vdisk_cmd *vcmd)
|
||||
{
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -189,7 +189,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
struct vdisk_tgt_dev *find_tgt_dev(struct vdisk_dev *dev, uint64_t sess_h)
|
||||
static struct vdisk_tgt_dev *find_tgt_dev(struct vdisk_dev *dev, uint64_t sess_h)
|
||||
{
|
||||
unsigned int i;
|
||||
struct vdisk_tgt_dev *res = NULL;
|
||||
@@ -203,7 +203,7 @@ struct vdisk_tgt_dev *find_tgt_dev(struct vdisk_dev *dev, uint64_t sess_h)
|
||||
return res;
|
||||
}
|
||||
|
||||
struct vdisk_tgt_dev *find_empty_tgt_dev(struct vdisk_dev *dev)
|
||||
static struct vdisk_tgt_dev *find_empty_tgt_dev(struct vdisk_dev *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
struct vdisk_tgt_dev *res = NULL;
|
||||
|
||||
@@ -203,7 +203,7 @@ static void *align_alloc(size_t size)
|
||||
return memalign(PAGE_SIZE, size);
|
||||
}
|
||||
|
||||
void sigalrm_handler(int signo)
|
||||
static void sigalrm_handler(int signo)
|
||||
{
|
||||
int res, i;
|
||||
|
||||
@@ -234,7 +234,7 @@ out:
|
||||
return;
|
||||
}
|
||||
|
||||
void sigusr1_handler(int signo)
|
||||
static void sigusr1_handler(int signo)
|
||||
{
|
||||
int res, i;
|
||||
|
||||
@@ -258,7 +258,7 @@ out:
|
||||
return;
|
||||
}
|
||||
|
||||
int prealloc_buffers(struct vdisk_dev *dev)
|
||||
static int prealloc_buffers(struct vdisk_dev *dev)
|
||||
{
|
||||
int i, c, res = 0;
|
||||
|
||||
@@ -300,7 +300,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
int start(int argc, char **argv)
|
||||
static int start(int argc, char **argv)
|
||||
{
|
||||
int res = 0;
|
||||
int fd;
|
||||
|
||||
@@ -94,7 +94,7 @@ static void stpg_handle_tm_received(struct scst_event_user *event_user)
|
||||
*/
|
||||
}
|
||||
|
||||
int invoke_stpg(const uint8_t *device_name,
|
||||
static int invoke_stpg(const uint8_t *device_name,
|
||||
const struct scst_event_stpg_descr *descr, pid_t *out_pid)
|
||||
{
|
||||
char *args[7], *env[7];
|
||||
@@ -175,7 +175,7 @@ out:
|
||||
}
|
||||
|
||||
/* Returns 0, if the pid is still running, >0 if it was exited or <0 error code */
|
||||
int wait_until_finished(pid_t pid, unsigned long deadline, int *status, int child)
|
||||
static int wait_until_finished(pid_t pid, unsigned long deadline, int *status, int child)
|
||||
{
|
||||
int res;
|
||||
time_t start, end;
|
||||
@@ -204,7 +204,7 @@ int wait_until_finished(pid_t pid, unsigned long deadline, int *status, int chil
|
||||
return res;
|
||||
}
|
||||
|
||||
int handle_stpg_received(struct scst_event_user *event_user)
|
||||
static int handle_stpg_received(struct scst_event_user *event_user)
|
||||
{
|
||||
const struct scst_event_stpg_payload *p = (struct scst_event_stpg_payload *)event_user->out_event.payload;
|
||||
int num, k;
|
||||
@@ -426,7 +426,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
void sig_chld(int signal)
|
||||
static void sig_chld(int signal)
|
||||
{
|
||||
/* Check just in case */
|
||||
if (signal == SIGCHLD) {
|
||||
|
||||
Reference in New Issue
Block a user