iscsi_readcapacity16_cb(struct iscsi_context *iscsi, int status,

                        void *command_data, void *opaque)

{

    struct IscsiTask *itask = opaque;

    struct scsi_readcapacity16 *rc16;

    struct scsi_task *task = command_data;



    if (status != 0) {

        error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",

                     iscsi_get_error(iscsi));

        itask->status   = 1;

        itask->complete = 1;

        scsi_free_scsi_task(task);

        return;

    }



    rc16 = scsi_datain_unmarshall(task);

    if (rc16 == NULL) {

        error_report("iSCSI: Failed to unmarshall readcapacity16 data.");

        itask->status   = 1;

        itask->complete = 1;

        scsi_free_scsi_task(task);

        return;

    }



    itask->iscsilun->block_size = rc16->block_length;

    itask->iscsilun->num_blocks = rc16->returned_lba + 1;

    itask->bs->total_sectors    = itask->iscsilun->num_blocks *

                               itask->iscsilun->block_size / BDRV_SECTOR_SIZE ;



    itask->status   = 0;

    itask->complete = 1;

    scsi_free_scsi_task(task);

}

iscsi_readcapacity16_cb(struct iscsi_context *iscsi, int status,

                        void *command_data, void *opaque)

{

    struct IscsiTask *itask = opaque;

    struct scsi_readcapacity16 *rc16;

    struct scsi_task *task = command_data;



    if (status != 0) {

        error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",

                     iscsi_get_error(iscsi));

        itask->status   = 1;

        itask->complete = 1;

        scsi_free_scsi_task(task);

        return;

    }



    rc16 = scsi_datain_unmarshall(task);

    if (rc16 == NULL) {

        error_report("iSCSI: Failed to unmarshall readcapacity16 data.");

        itask->status   = 1;

        itask->complete = 1;

        scsi_free_scsi_task(task);

        return;

    }



    itask->iscsilun->block_size = rc16->block_length;

    itask->iscsilun->num_blocks = rc16->returned_lba + 1;

    itask->bs->total_sectors    = itask->iscsilun->num_blocks *

                               itask->iscsilun->block_size / BDRV_SECTOR_SIZE ;



    itask->status   = 0;

    itask->complete = 1;

    scsi_free_scsi_task(task);

}

iscsi_readcapacity16_cb(struct iscsi_context *iscsi, int status,                         void *command_data, void *opaque)     struct IscsiTask *itask = opaque;     struct scsi_readcapacity16 *rc16;     struct scsi_task *task = command_data;     if (status != 0) {         error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",                      iscsi_get_error(iscsi));         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);     rc16 = scsi_datain_unmarshall(task);     if (rc16 == NULL) {         error_report("iSCSI: Failed to unmarshall readcapacity16 data.");         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);     itask->iscsilun->block_size = rc16->block_length;     itask->iscsilun->num_blocks = rc16->returned_lba + 1;     itask->bs->total_sectors    = itask->iscsilun->num_blocks *                                itask->iscsilun->block_size / BDRV_SECTOR_SIZE ;     itask->status   = 0;     itask->complete = 1;     scsi_free_scsi_task(task);                         void *command_data, void *opaque)     struct IscsiTask *itask = opaque;     struct scsi_task *task = command_data;     if (status != 0) {         error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",                      iscsi_get_error(iscsi));         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);     itask->bs->total_sectors    = itask->iscsilun->num_blocks *                                itask->iscsilun->block_size / BDRV_SECTOR_SIZE ;     itask->status   = 0;     itask->complete = 1;     scsi_free_scsi_task(task);     struct IscsiTask *itask = opaque;     struct scsi_task *task = command_data;     if (status != 0) {         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);         itask->status   = 1;         itask->complete = 1;         scsi_free_scsi_task(task);     scsi_free_scsi_task(task);         itask->complete = 1;     struct IscsiTask *itask = opaque;     if (status != 0) {         itask->status   = 1;         itask->complete = 1;         itask->status   = 1;         itask->complete = 1;                      iscsi_get_error(iscsi));
FUNC_0(struct iscsi_context *VAR_0, int VAR_1,

                        void *VAR_2, void *VAR_3)

{

    struct IscsiTask *VAR_4 = VAR_3;

    struct scsi_readcapacity16 *VAR_5;

    struct scsi_task *VAR_6 = VAR_2;



    if (VAR_1 != 0) {

        error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",

                     iscsi_get_error(VAR_0));

        VAR_4->VAR_1   = 1;

        VAR_4->complete = 1;

        scsi_free_scsi_task(VAR_6);

        return;

    }



    VAR_5 = scsi_datain_unmarshall(VAR_6);

    if (VAR_5 == NULL) {

        error_report("iSCSI: Failed to unmarshall readcapacity16 data.");

        VAR_4->VAR_1   = 1;

        VAR_4->complete = 1;

        scsi_free_scsi_task(VAR_6);

        return;

    }



    VAR_4->iscsilun->block_size = VAR_5->block_length;

    VAR_4->iscsilun->num_blocks = VAR_5->returned_lba + 1;

    VAR_4->bs->total_sectors    = VAR_4->iscsilun->num_blocks *

                               VAR_4->iscsilun->block_size / BDRV_SECTOR_SIZE ;



    VAR_4->VAR_1   = 0;

    VAR_4->complete = 1;

    scsi_free_scsi_task(VAR_6);

}

FUNC_0(struct iscsi_context *VAR_0, int VAR_1,
void *VAR_2, void *VAR_3)
{ struct IscsiTask *VAR_4 = VAR_3; struct scsi_readcapacity16 *VAR_5; struct scsi_task *VAR_6 = VAR_2; if (VAR_1 != 0) { error_report("iSCSI: Failed to read capacity of iSCSI lun. %s",
iscsi_get_error(VAR_0)); VAR_4->VAR_1   = 1; VAR_4->complete = 1; scsi_free_scsi_task(VAR_6); return; } VAR_5 = scsi_datain_unmarshall(VAR_6); if (VAR_5 == NULL) { error_report("iSCSI: Failed to unmarshall readcapacity16 data."); VAR_4->VAR_1   = 1; VAR_4->complete = 1; scsi_free_scsi_task(VAR_6); return; } VAR_4->iscsilun->block_size = VAR_5->block_length; VAR_4->iscsilun->num_blocks = VAR_5->returned_lba + 1; VAR_4->bs->total_sectors    = VAR_4->iscsilun->num_blocks *
VAR_4->iscsilun->block_size / BDRV_SECTOR_SIZE ; VAR_4->VAR_1   = 0; VAR_4->complete = 1; scsi_free_scsi_task(VAR_6); }