~ubuntu-branches/ubuntu/trusty/iscsitarget/trusty

« back to all changes in this revision

Viewing changes to kernel/iscsi.h

  • Committer: Colin Watson
  • Date: 2010-08-16 20:59:52 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: cjwatson@canonical.com-20100816205952-hyytf817ju6wk1bj
merge from Debian 1.4.20.2-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#ifndef __ISCSI_H__
9
9
#define __ISCSI_H__
10
10
 
 
11
#include <linux/blkdev.h>
11
12
#include <linux/completion.h>
12
13
#include <linux/pagemap.h>
13
14
#include <linux/seq_file.h>
18
19
 
19
20
#include "iscsi_hdr.h"
20
21
#include "iet_u.h"
 
22
#include "compat.h"
21
23
 
22
24
#define IET_SENSE_BUF_SIZE      18
23
25
 
92
94
        struct list_head work_queue;
93
95
 
94
96
        wait_queue_head_t wthread_sleep;
 
97
 
 
98
        struct io_context *wthread_ioc;
95
99
};
96
100
 
97
101
struct iscsi_cmnd;
127
131
        struct worker_thread_info * wthread_info;
128
132
 
129
133
        struct semaphore target_sem;
130
 
        struct completion *done;
131
134
};
132
135
 
133
136
struct iscsi_queue {
149
152
        struct iscsi_queue queue;
150
153
 
151
154
        u8 scsi_id[SCSI_ID_LEN];
152
 
        u8 scsi_sn[SCSI_SN_LEN];
 
155
        u8 scsi_sn[SCSI_SN_LEN + 1];
153
156
 
154
157
        u32 blk_shift;
155
158
        u64 blk_cnt;
336
339
extern struct iscsi_conn *conn_lookup(struct iscsi_session *, u16);
337
340
extern int conn_add(struct iscsi_session *, struct conn_info *);
338
341
extern int conn_del(struct iscsi_session *, struct conn_info *);
339
 
extern void conn_del_all(struct iscsi_session *);
340
342
extern int conn_free(struct iscsi_conn *);
341
343
extern void conn_close(struct iscsi_conn *);
342
344
extern void conn_info_show(struct seq_file *, struct iscsi_session *);
377
379
extern struct iscsi_session *session_lookup(struct iscsi_target *, u64);
378
380
extern int session_add(struct iscsi_target *, struct session_info *);
379
381
extern int session_del(struct iscsi_target *, u64);
380
 
extern void session_del_all(struct iscsi_target *);
381
382
 
382
383
/* volume.c */
383
384
extern struct file_operations volume_seq_fops;
464
465
#define cmnd_itt(cmnd) cpu_to_be32((cmnd)->pdu.bhs.itt)
465
466
#define cmnd_opcode(cmnd) ((cmnd)->pdu.bhs.opcode & ISCSI_OPCODE_MASK)
466
467
#define cmnd_scsicode(cmnd) cmnd_hdr(cmnd)->scb[0]
 
468
#define cmnd_immediate(cmnd) ((cmnd)->pdu.bhs.opcode & ISCSI_OP_IMMEDIATE)
467
469
 
468
 
#define SECTOR_SIZE_BITS        9
 
470
/* default and maximum scsi level block sizes */
 
471
#define IET_DEF_BLOCK_SIZE      512
 
472
#define IET_MAX_BLOCK_SIZE      4096
469
473
 
470
474
enum cmnd_flags {
471
475
        CMND_hashed,