static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,

                         Error **errp) {

    NFSClient *client = bs->opaque;

    int64_t ret;



    client->aio_context = bdrv_get_aio_context(bs);



    ret = nfs_client_open(client, options,

                          (flags & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,

                          bs->open_flags, errp);

    if (ret < 0) {

        return ret;

    }

    qemu_mutex_init(&client->mutex);

    bs->total_sectors = ret;

    ret = 0;

    return ret;

}

static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,

                         Error **errp) {

    NFSClient *client = bs->opaque;

    int64_t ret;



    client->aio_context = bdrv_get_aio_context(bs);



    ret = nfs_client_open(client, options,

                          (flags & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,

                          bs->open_flags, errp);

    if (ret < 0) {

        return ret;

    }

    qemu_mutex_init(&client->mutex);

    bs->total_sectors = ret;

    ret = 0;

    return ret;

}

    qemu_mutex_init(&client->mutex);
static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,

                         Error **VAR_3) {

    NFSClient *client = VAR_0->opaque;

    int64_t ret;



    client->aio_context = bdrv_get_aio_context(VAR_0);



    ret = nfs_client_open(client, VAR_1,

                          (VAR_2 & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,

                          VAR_0->open_flags, VAR_3);

    if (ret < 0) {

        return ret;

    }

    qemu_mutex_init(&client->mutex);

    VAR_0->total_sectors = ret;

    ret = 0;

    return ret;

}

static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3) { NFSClient *client = VAR_0->opaque; int64_t ret; client->aio_context = bdrv_get_aio_context(VAR_0); ret = nfs_client_open(client, VAR_1,
(VAR_2 & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,
VAR_0->open_flags, VAR_3); if (ret < 0) { return ret; } qemu_mutex_init(&client->mutex); VAR_0->total_sectors = ret; ret = 0; return ret; }