search for: vixerror

Displaying 20 results from an estimated 27 matches for "vixerror".

2020 Jun 02
0
[PATCH nbdkit 4/5] tests: Enhance dummy-vddk.
...- a/plugins/vddk/vddk-stubs.h +++ b/plugins/vddk/vddk-stubs.h @@ -44,10 +44,6 @@ * which is the earliest version of VDDK that we support. */ -/* We treat these two stubs slightly specially for the benefit of - * tests/dummy-vddk.c. - */ -#ifndef NO_INITEX_STUB STUB (VixDiskLib_InitEx, VixError, (uint32_t major, uint32_t minor, @@ -56,13 +52,9 @@ STUB (VixDiskLib_InitEx, VixDiskLibGenericLogFunc *panic_function, const char *lib_dir, const char *config_file)); -#endif -#ifndef NO_EXIT_STUB STUB (VixDiskLib_Exit, void, (void)); -#endif - STUB (...
2019 Mar 20
0
[PATCH nbdkit 7/8] vddk: Implement extents.
...s/vddk/vddk-structs.h +++ b/plugins/vddk/vddk-structs.h @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2013-2018 Red Hat Inc. + * Copyright (C) 2013-2019 Red Hat Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,6 +47,9 @@ typedef uint64_t VixError; #define VIXDISKLIB_FLAG_OPEN_READ_ONLY 4 #define VIXDISKLIB_SECTOR_SIZE 512 +#define VIXDISKLIB_MIN_CHUNK_SIZE 128 +#define VIXDISKLIB_MAX_CHUNK_NUMBER (512*1024) + typedef void *VixDiskLibConnection; typedef void *VixDiskLibHandle; @@ -124,4 +127,14 @@ typedef struct VixDiskLibInfo { c...
2019 Oct 10
1
[PATCH NOT WORKING nbdkit] vddk: Restructure plugin to allow greater parallelism.
We had a query yesterday about the VDDK plugin and making it actually obey the weird "Multithreading Considerations" rules in the VDDK documentation (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8f96698a-0e7b-4d67-bb6c-d18a1d101540/ef536a47-27cd-481a-90ef-76b38e75353c/vsphere-vddk-671-programming-guide.pdf) This patch is my attempt to implement this. The idea is that the
2020 Aug 06
5
[PATCH nbdkit NOT WORKING 0/2] vddk: Relax threading model.
I believe this roughly implements Nir's proposal here: https://www.redhat.com/archives/libguestfs/2020-August/msg00028.html Unfortunately it doesn't work for me. It actually slows things down quite a lot, for reasons I don't understand. Note the adjustment of the pool-max parameter and how it affects the total time. The results are quite reproducible. $ ./nbdkit -r -U - vddk
2020 Aug 06
0
[PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...dk_handles vddk_handles; }; static inline VixDiskLibConnectParams * @@ -531,17 +556,28 @@ free_connect_params (VixDiskLibConnectParams *params) static void * vddk_open (int readonly) { - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); - struct vddk_handle *h; + struct handle *h; VixError err; - uint32_t flags; - h = malloc (sizeof *h); + h = calloc (1, sizeof *h); if (h == NULL) { - nbdkit_error ("malloc: %m"); + nbdkit_error ("calloc: %m"); return NULL; } + h->readonly = readonly; + pthread_mutex_init (&h->vddk_handles_lock,...
2019 Oct 11
3
[PATCH NOT WORKING nbdkit v2 0/2] vddk: Restructure plugin to allow greater parallelism.
This is my second attempt at this. The first version (also not working) was here: https://www.redhat.com/archives/libguestfs/2019-October/msg00062.html In part 1/2 I introduce a new .ready_to_serve plugin method which is called after forking and just before accepting any client connection. The idea would be that plugins could start background threads here. However this doesn't work well in
2020 Aug 06
3
Re: [PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...nline VixDiskLibConnectParams * > @@ -531,17 +556,28 @@ free_connect_params (VixDiskLibConnectParams *params) > static void * > vddk_open (int readonly) > { > - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > - struct vddk_handle *h; > + struct handle *h; > VixError err; > - uint32_t flags; > > - h = malloc (sizeof *h); > + h = calloc (1, sizeof *h); > if (h == NULL) { > - nbdkit_error ("malloc: %m"); > + nbdkit_error ("calloc: %m"); > return NULL; > } > > + h->readonly = readonly; &g...
2018 Sep 17
4
[PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...uot;zero succeeded using BLKZEROOUT"); return 0; } diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index f3b4539..9bfd4d2 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -511,11 +511,11 @@ vddk_pread (void *handle, void *buf, uint32_t count, uint64_t offset) VixError err; /* Align to sectors. */ - if (!is_aligned (offset, VIXDISKLIB_SECTOR_SIZE)) { + if (!IS_ALIGNED (offset, VIXDISKLIB_SECTOR_SIZE)) { nbdkit_error ("read is not aligned to sectors"); return -1; } - if (!is_aligned (count, VIXDISKLIB_SECTOR_SIZE)) { + if (!IS_ALIGN...
2020 Jun 02
9
[PATCH nbdkit 0/5] vddk: Fix password parameter.
Probably needs a bit of cleanup, but seems like it is generally the right direction. One thing I've noticed is that the expect test randomly (but rarely) hangs :-( I guess something is racey but I don't know what at the moment. Rich.
2018 Sep 17
0
[PATCH nbdkit v3 1/3] common: isaligned: Use a macro instead of relying on implicit truncation.
...uot;zero succeeded using BLKZEROOUT"); return 0; } diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index f3b4539..9bfd4d2 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -511,11 +511,11 @@ vddk_pread (void *handle, void *buf, uint32_t count, uint64_t offset) VixError err; /* Align to sectors. */ - if (!is_aligned (offset, VIXDISKLIB_SECTOR_SIZE)) { + if (!IS_ALIGNED (offset, VIXDISKLIB_SECTOR_SIZE)) { nbdkit_error ("read is not aligned to sectors"); return -1; } - if (!is_aligned (count, VIXDISKLIB_SECTOR_SIZE)) { + if (!IS_ALIGN...
2020 Jun 22
0
[PATCH nbdkit 2/2] vddk: Defer library initialization to .after_fork().
...31 @@ vddk_config_complete (void) return 0; } +#define vddk_config_help \ + "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ + "Many optional parameters are supported, see nbdkit-vddk-plugin(3)." + static int vddk_get_ready (void) { - VixError err; - load_library (true); + return 0; +} + +/* Defer VDDK initialization until after fork because it is known to + * create background threads from VixDiskLib_InitEx. Unfortunately + * error reporting from this callback is difficult, but we have + * already checked in .get_ready that the lib...
2018 Sep 17
0
Re: [PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...gt; return 0; > } > diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c > index f3b4539..9bfd4d2 100644 > --- a/plugins/vddk/vddk.c > +++ b/plugins/vddk/vddk.c > @@ -511,11 +511,11 @@ vddk_pread (void *handle, void *buf, uint32_t count, > uint64_t offset) > VixError err; > > /* Align to sectors. */ > - if (!is_aligned (offset, VIXDISKLIB_SECTOR_SIZE)) { > + if (!IS_ALIGNED (offset, VIXDISKLIB_SECTOR_SIZE)) { > nbdkit_error ("read is not aligned to sectors"); > return -1; > } > - if (!is_aligned (count, VIXDI...
2020 Aug 06
1
Re: [PATCH nbdkit 1/2] vddk: Relax threading model: SERIALIZE_ALL_REQUESTS -> SERIALIZE_REQUESTS.
.../* The per-connection handle. */ > struct vddk_handle { > @@ -524,6 +531,7 @@ free_connect_params (VixDiskLibConnectParams *params) > static void * > vddk_open (int readonly) > { > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > struct vddk_handle *h; > VixError err; > uint32_t flags; > @@ -616,6 +624,7 @@ vddk_open (int readonly) > static void > vddk_close (void *handle) > { > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > struct vddk_handle *h = handle; > > DEBUG_CALL ("VixDiskLib_Close", &quo...
2019 Apr 05
2
[PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_SINGLE_LINK
.... + =item B<snapshot=>MOREF Optional. The Managed Object Reference of the snapshot. diff --git a/plugins/vddk/vddk-structs.h b/plugins/vddk/vddk-structs.h index 24b3259..bc68ac6 100644 --- a/plugins/vddk/vddk-structs.h +++ b/plugins/vddk/vddk-structs.h @@ -43,6 +43,7 @@ typedef uint64_t VixError; #define VIX_OK 0 +#define VIXDISKLIB_FLAG_OPEN_SINGLE_LINK 2 #define VIXDISKLIB_FLAG_OPEN_READ_ONLY 4 #define VIXDISKLIB_SECTOR_SIZE 512 diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 8ea923a..78a4c88 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -91,6 +91,7 @@...
2019 Apr 05
1
[PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_UNBUFFERED.
I suppose we may as well implement the only other flag too ... It's not clear what this does, something like O_DIRECT I imagine. Rich.
2020 Aug 05
0
[PATCH nbdkit] vddk: Relax threading model and enable multi-conn.
...dle; /* disk handle */ + int readonly; }; static inline VixDiskLibConnectParams * @@ -557,6 +569,7 @@ free_connect_params (VixDiskLibConnectParams *params) static void * vddk_open (int readonly) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h; VixError err; uint32_t flags; @@ -567,6 +580,7 @@ vddk_open (int readonly) return NULL; } + h->readonly = readonly; h->params = allocate_connect_params (); if (h->params == NULL) { nbdkit_error ("allocate VixDiskLibConnectParams: %m"); @@ -649,6 +663,7 @@ vddk_ope...
2020 Aug 06
0
[PATCH nbdkit 1/2] vddk: Relax threading model: SERIALIZE_ALL_REQUESTS -> SERIALIZE_REQUESTS.
...se_lock = PTHREAD_MUTEX_INITIALIZER; /* The per-connection handle. */ struct vddk_handle { @@ -524,6 +531,7 @@ free_connect_params (VixDiskLibConnectParams *params) static void * vddk_open (int readonly) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h; VixError err; uint32_t flags; @@ -616,6 +624,7 @@ vddk_open (int readonly) static void vddk_close (void *handle) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h = handle; DEBUG_CALL ("VixDiskLib_Close", "handle"); -- 2.27.0
2019 Apr 05
0
Re: [PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_SINGLE_LINK
...REF > > Optional. The Managed Object Reference of the snapshot. >diff --git a/plugins/vddk/vddk-structs.h b/plugins/vddk/vddk-structs.h >index 24b3259..bc68ac6 100644 >--- a/plugins/vddk/vddk-structs.h >+++ b/plugins/vddk/vddk-structs.h >@@ -43,6 +43,7 @@ > typedef uint64_t VixError; > #define VIX_OK 0 > >+#define VIXDISKLIB_FLAG_OPEN_SINGLE_LINK 2 > #define VIXDISKLIB_FLAG_OPEN_READ_ONLY 4 > #define VIXDISKLIB_SECTOR_SIZE 512 > >diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c >index 8ea923a..78a4c88 100644 >--- a/plugins/vddk/vddk.c >+++ b...
2020 Aug 05
2
[PATCH nbdkit] vddk: Relax threading model and enable multi-conn.
In theory this patch depends on this series: https://www.redhat.com/archives/libguestfs/2020-August/msg00021.html In practice I believe they're independent of each other, but the above series makes it easier to test. Rich.
2019 Mar 20
15
[PATCH nbdkit 0/8] Implement extents using a simpler array.
Not sure what version we're up to, but this reimplements extents using the new simpler structure described in this thread: https://www.redhat.com/archives/libguestfs/2019-March/msg00077.html I also fixed most of the things that Eric pointed out in the previous review, although I need to go back over his replies and check I've got everything. This needs a bit more testing. However the