int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,

                          uint64_t bytes, QEMUIOVector *qiov, int flags)

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_WRITE,

        .from = offset,

        .len = bytes,

    };




    if (flags & BDRV_REQ_FUA) {

        assert(client->info.flags & NBD_FLAG_SEND_FUA);

        request.flags |= NBD_CMD_FLAG_FUA;

    }



    assert(bytes <= NBD_MAX_BUFFER_SIZE);



    return nbd_co_request(bs, &request, qiov);

}
int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,

                          uint64_t bytes, QEMUIOVector *qiov, int flags)

{

    NBDClientSession *client = nbd_get_client_session(bs);

    NBDRequest request = {

        .type = NBD_CMD_WRITE,

        .from = offset,

        .len = bytes,

    };




    if (flags & BDRV_REQ_FUA) {

        assert(client->info.flags & NBD_FLAG_SEND_FUA);

        request.flags |= NBD_CMD_FLAG_FUA;

    }



    assert(bytes <= NBD_MAX_BUFFER_SIZE);



    return nbd_co_request(bs, &request, qiov);

}
int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,

                          uint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)

{

    NBDClientSession *client = nbd_get_client_session(VAR_0);

    NBDRequest request = {

        .type = NBD_CMD_WRITE,

        .from = VAR_1,

        .len = VAR_2,

    };




    if (VAR_4 & BDRV_REQ_FUA) {

        assert(client->info.VAR_4 & NBD_FLAG_SEND_FUA);

        request.VAR_4 |= NBD_CMD_FLAG_FUA;

    }



    assert(VAR_2 <= NBD_MAX_BUFFER_SIZE);



    return nbd_co_request(VAR_0, &request, VAR_3);

}
int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t VAR_2, QEMUIOVector *VAR_3, int VAR_4)
{ NBDClientSession *client = nbd_get_client_session(VAR_0); NBDRequest request = { .type = NBD_CMD_WRITE,
.from = VAR_1,
.len = VAR_2,
}; if (VAR_4 & BDRV_REQ_FUA) { assert(client->info.VAR_4 & NBD_FLAG_SEND_FUA); request.VAR_4 |= NBD_CMD_FLAG_FUA; } assert(VAR_2 <= NBD_MAX_BUFFER_SIZE); return nbd_co_request(VAR_0, &request, VAR_3); }