Displaying 17 results from an estimated 17 matches for "vixdisklib_sector_size".
2018 Sep 17
4
[PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...f --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_ALIGNED (count, VIXDISKLIB_SECTOR_SIZE)) {
nbdkit_error ("read is not aligned to...
2018 Sep 17
0
[PATCH nbdkit v3 1/3] common: isaligned: Use a macro instead of relying on implicit truncation.
...f --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_ALIGNED (count, VIXDISKLIB_SECTOR_SIZE)) {
nbdkit_error ("read is not aligned to...
2019 Mar 20
0
[PATCH nbdkit 7/8] vddk: Implement extents.
...,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 {
char *uuid;
} VixDiskLibInfo;
+typedef struct {
+ uint64_t offset;
+ ui...
2018 Sep 17
0
Re: [PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...k/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_ALIGNED (count, VIXDISKLIB_SECTOR_SIZE)) {
> nbdkit_...
2020 Jun 02
0
[PATCH nbdkit 4/5] tests: Enhance dummy-vddk.
...dint.h>
+#include <string.h>
#include "vddk-structs.h"
+#define STUB(fn,ret,args) extern ret fn args;
+#define OPTIONAL_STUB(fn,ret,args)
+#include "vddk-stubs.h"
+#undef STUB
+#undef OPTIONAL_STUB
+
+#define CAPACITY 1024 /* sectors */
+static char disk[CAPACITY * VIXDISKLIB_SECTOR_SIZE];
+
VixError
VixDiskLib_InitEx (uint32_t major, uint32_t minor,
VixDiskLibGenericLogFunc *log_function,
@@ -59,10 +65,95 @@ VixDiskLib_Exit (void)
/* Do nothing. */
}
-#define NO_INITEX_STUB
-#define NO_EXIT_STUB
-#define STUB(fn,ret,args) void fn (void) { abort (); }
-#...
2019 Mar 23
2
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...q_one = flags & NBDKIT_FLAG_REQ_ONE;
> + uint64_t position, end, start_sector;
> +
> + position = offset;
> +
...
> +
> + for (i = 0; i < block_list->numBlocks; ++i) {
> + uint64_t offset, length;
> +
> + offset = block_list->blocks[i].offset * VIXDISKLIB_SECTOR_SIZE;
> + length = block_list->blocks[i].length * VIXDISKLIB_SECTOR_SIZE;
> +
> + /* The query returns blocks. We must insert holes between the
> + * blocks as necessary.
> + */
> + if (position < offset) {
> + if (nbdkit_add_extent (extents,...
2019 Mar 25
0
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
On Sat, Mar 23, 2019 at 02:29:54PM -0500, Eric Blake wrote:
> On 3/20/19 5:11 PM, Richard W.M. Jones wrote:
...
> > + for (i = 0; i < block_list->numBlocks; ++i) {
> > + uint64_t offset, length;
> > +
> > + offset = block_list->blocks[i].offset * VIXDISKLIB_SECTOR_SIZE;
> > + length = block_list->blocks[i].length * VIXDISKLIB_SECTOR_SIZE;
> > +
> > + /* The query returns blocks. We must insert holes between the
> > + * blocks as necessary.
> > + */
> > + if (position < offset) {
> > +...
2019 Mar 27
2
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...:29:54PM -0500, Eric Blake wrote:
> > On 3/20/19 5:11 PM, Richard W.M. Jones wrote:
> ...
> > > + for (i = 0; i < block_list->numBlocks; ++i) {
> > > + uint64_t offset, length;
> > > +
> > > + offset = block_list->blocks[i].offset * VIXDISKLIB_SECTOR_SIZE;
> > > + length = block_list->blocks[i].length * VIXDISKLIB_SECTOR_SIZE;
> > > +
> > > + /* The query returns blocks. We must insert holes between the
> > > + * blocks as necessary.
> > > + */
> > > + if (position...
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
2019 Apr 05
2
[PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_SINGLE_LINK
...-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 @@ static int nfc_host_port = 0; /* nfchostport */
static char *password = NULL; /* password */
static int port =...
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing).
However I have changed the first two patches based on feedback
received. In particular this fixes a very serious bug found by Eric
Blake in the current truncate filter.
Rich.
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 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.
2019 Apr 05
0
Re: [PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_SINGLE_LINK
...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 @@ static int nfc_host_port = 0; /* nfchostport */
> static char *password = NULL; /* pas...
2019 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's
version 4.
I'm a lot happier with this version:
- all filters have been reviewed and changed where I think that's necessary
- can_extents is properly defined and implemented now
- NBD protocol is followed
- I believe it addresses all previous review points where possible
The "only" thing
2019 Mar 19
15
[PATCH nbdkit 0/9] [mainly for discussion and early review] Implement extents.
I want to post this but mainly for discussion and early review. It's
not safe for these patches to all go upstream yet (because not all
filters have been checked/adjusted), but if any patches were to go
upstream then probably 1 & 2 only are safe.
File, VDDK, memory and data plugins all work, although I have only
done minimal testing on them.
The current tests, such as they are, all
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here
so we have a reference in the mailing list in case we find bugs later
(as I'm sure we will - it's a complex patch series).
Great thanks to Eric Blake for tireless review on this one. It also
seems to have identified a few minor bugs in qemu along the way.
Rich.