int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_TRIM,

        .from = offset,

        .len = count,

    };

    NBDReply reply;

    ssize_t ret;



    if (!(client->nbdflags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    nbd_coroutine_start(client, &request);

    ret = nbd_co_send_request(bs, &request, NULL);

    if (ret < 0) {

        reply.error = -ret;

    } else {

        nbd_co_receive_reply(client, &request, &reply, NULL);

    }

    nbd_coroutine_end(bs, &request);

    return -reply.error;



}

int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_TRIM,

        .from = offset,

        .len = count,

    };

    NBDReply reply;

    ssize_t ret;



    if (!(client->nbdflags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    nbd_coroutine_start(client, &request);

    ret = nbd_co_send_request(bs, &request, NULL);

    if (ret < 0) {

        reply.error = -ret;

    } else {

        nbd_co_receive_reply(client, &request, &reply, NULL);

    }

    nbd_coroutine_end(bs, &request);

    return -reply.error;



}

    nbd_coroutine_start(client, &request);     nbd_coroutine_start(client, &request);     nbd_coroutine_start(client, &request);     nbd_coroutine_start(client, &request);     nbd_coroutine_start(client, &request);
int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, int VAR_2)

{

    NBDClientSession *client = nbd_get_client_session(VAR_0);

    NBDRequest request = {

        .type = NBD_CMD_TRIM,

        .from = VAR_1,

        .len = VAR_2,

    };

    NBDReply reply;

    ssize_t ret;



    if (!(client->nbdflags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    nbd_coroutine_start(client, &request);

    ret = nbd_co_send_request(VAR_0, &request, NULL);

    if (ret < 0) {

        reply.error = -ret;

    } else {

        nbd_co_receive_reply(client, &request, &reply, NULL);

    }

    nbd_coroutine_end(VAR_0, &request);

    return -reply.error;



}

int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, int VAR_2)
{ NBDClientSession *client = nbd_get_client_session(VAR_0); NBDRequest request = { .type = NBD_CMD_TRIM,
.from = VAR_1,
.len = VAR_2,
}; NBDReply reply; ssize_t ret; if (!(client->nbdflags & NBD_FLAG_SEND_TRIM)) { return 0; } nbd_coroutine_start(client, &request); ret = nbd_co_send_request(VAR_0, &request, NULL); if (ret < 0) { reply.error = -ret; } else { nbd_co_receive_reply(client, &request, &reply, NULL); } nbd_coroutine_end(VAR_0, &request); return -reply.error; }