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

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_TRIM,

        .from = offset,

        .len = bytes,

    };



    assert(!(client->info.flags & NBD_FLAG_READ_ONLY));

    if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    return nbd_co_request(bs, &request, NULL);

}

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

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_TRIM,

        .from = offset,

        .len = bytes,

    };



    assert(!(client->info.flags & NBD_FLAG_READ_ONLY));

    if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    return nbd_co_request(bs, &request, NULL);

}

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,

    };



    assert(!(client->info.flags & NBD_FLAG_READ_ONLY));

    if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) {

        return 0;

    }



    return nbd_co_request(VAR_0, &request, NULL);

}

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,
}; assert(!(client->info.flags & NBD_FLAG_READ_ONLY)); if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) { return 0; } return nbd_co_request(VAR_0, &request, NULL); }