static void iscsi_allocationmap_set(IscsiLun *iscsilun, int64_t sector_num,

                                    int nb_sectors)

{

    int64_t cluster_num, nb_clusters;

    if (iscsilun->allocationmap == NULL) {

        return;

    }

    cluster_num = sector_num / iscsilun->cluster_sectors;

    nb_clusters = DIV_ROUND_UP(sector_num + nb_sectors,

                               iscsilun->cluster_sectors) - cluster_num;

    bitmap_set(iscsilun->allocationmap, cluster_num, nb_clusters);

}

static void iscsi_allocationmap_set(IscsiLun *iscsilun, int64_t sector_num,

                                    int nb_sectors)

{

    int64_t cluster_num, nb_clusters;

    if (iscsilun->allocationmap == NULL) {

        return;

    }

    cluster_num = sector_num / iscsilun->cluster_sectors;

    nb_clusters = DIV_ROUND_UP(sector_num + nb_sectors,

                               iscsilun->cluster_sectors) - cluster_num;

    bitmap_set(iscsilun->allocationmap, cluster_num, nb_clusters);

}

static void FUNC_0(IscsiLun *VAR_0, int64_t VAR_1,

                                    int VAR_2)

{

    int64_t cluster_num, nb_clusters;

    if (VAR_0->allocationmap == NULL) {

        return;

    }

    cluster_num = VAR_1 / VAR_0->cluster_sectors;

    nb_clusters = DIV_ROUND_UP(VAR_1 + VAR_2,

                               VAR_0->cluster_sectors) - cluster_num;

    bitmap_set(VAR_0->allocationmap, cluster_num, nb_clusters);

}

static void FUNC_0(IscsiLun *VAR_0, int64_t VAR_1,
int VAR_2)
{ int64_t cluster_num, nb_clusters; if (VAR_0->allocationmap == NULL) { return; } cluster_num = VAR_1 / VAR_0->cluster_sectors; nb_clusters = DIV_ROUND_UP(VAR_1 + VAR_2,
VAR_0->cluster_sectors) - cluster_num; bitmap_set(VAR_0->allocationmap, cluster_num, nb_clusters); }