search for: blk_init

Displaying 19 results from an estimated 19 matches for "blk_init".

Did you mean: xlblk_init
2013 Apr 05
0
[PATCHv2 1/2] Xen PV backend (for qemu-upstream-4.2-testing): Move call to bdrv_new from blk_init to blk_connect
This commit delays the point at which bdrv_new (and hence blk_open on the underlying device) is called from blk_init to blk_connect. This ensures that in an inbound live migrate, the block device is not opened until it has been closed at the other end. This is in preparation for supporting devices with open/close consistency without using O_DIRECT. This commit does NOT itself change O_DIRECT semantics. Signed-of...
2011 Jun 27
1
[PATCH v3] xen_disk: cope with missing xenstore "params" node
...<stefano.stabellini@eu.citrix.com> --- hw/xen_disk.c | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 096d1c9..faaa065 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -616,12 +616,14 @@ static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); int index, qflags, have_barriers, info = 0; - char *h; /* read xenstore entries */ if (blkdev->params == NULL) { + char *h = NULL; blkdev->params =...
2011 Jun 24
2
[PATCH v2] xen_disk: cope with missing xenstore "params" node
...lini <stefano.stabellini@eu.citrix.com> --- hw/xen_disk.c | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 096d1c9..eec05dd 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -616,12 +616,14 @@ static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); int index, qflags, have_barriers, info = 0; - char *h; /* read xenstore entries */ if (blkdev->params == NULL) { + char *h = NULL; blkdev->params =...
2012 Apr 24
21
no console when using xl toolstack xen 4.1.2
Hello! I was asking for help on the Freenode channel, and I was pointed here. I have a situation where, using xl, I can create a functional PV domU, with or without pv-grub, but I cannot access the console. Firing up xend and using xm works without trouble. Since xend and company is being deprecated, I would like to transition to using the xl toolstack. The system is an Arch Linux system
2011 Jun 24
9
[PATCH] xen_disk: cope with missing xenstore "params" node
...tefano Stabellini <stefano.stabellini@eu.citrix.com> --- hw/xen_disk.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 096d1c9..801da58 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -616,11 +616,13 @@ static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); int index, qflags, have_barriers, info = 0; - char *h; + char *h = NULL; /* read xenstore entries */ if (blkdev->params == NULL) { blkdev->params = xens...
2018 Dec 28
0
[PATCH nbdkit 5/9] cache: Allow this filter to serve requests in parallel.
...++++++ filters/cache/cache.c | 57 +++++++++++++++++++++++++++++++------------ 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/filters/cache/blk.h b/filters/cache/blk.h index 24bf6a1..ab9134e 100644 --- a/filters/cache/blk.h +++ b/filters/cache/blk.h @@ -40,6 +40,13 @@ extern int blk_init (void); /* Close the cache, free the bitmap. */ extern void blk_free (void); +/*---------------------------------------------------------------------- + * ** NOTE ** + * + * An exclusive lock must be held when you call any function below + * this line. + */ + /* Allocate or resize the cache fi...
2018 Dec 28
12
[PATCH nbdkit 0/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
This patch series enhances the cache filter in a few ways, primarily adding a "cache-on-read" feature (similar to qemu's copyonread); and adding the ability to limit the cache size and the antecedent of that which is having a method to reclaim cache blocks. As the cache is stored as a sparse temporary file, reclaiming cache blocks simply means punching holes in the temporary file.
2019 Jan 01
0
[PATCH nbdkit v2 3/4] cache: Implement LRU structure.
...ff --git a/filters/cache/blk.c b/filters/cache/blk.c index 4000276..b256446 100644 --- a/filters/cache/blk.c +++ b/filters/cache/blk.c @@ -53,6 +53,7 @@ #include "cache.h" #include "blk.h" +#include "lru.h" /* The cache. */ static int fd = -1; @@ -80,6 +81,8 @@ blk_init (void) size_t len; char *template; + lru_init (); + bitmap_init (&bm, BLKSIZE, 2 /* bits per block */); tmpdir = getenv ("TMPDIR"); @@ -115,6 +118,8 @@ blk_free (void) close (fd); bitmap_free (&bm); + + lru_free (); } int @@ -128,6 +133,9 @@ blk_set...
2019 Jan 03
0
[PATCH nbdkit v4 1/2] cache: Implement LRU structure.
...ff --git a/filters/cache/blk.c b/filters/cache/blk.c index 4000276..b256446 100644 --- a/filters/cache/blk.c +++ b/filters/cache/blk.c @@ -53,6 +53,7 @@ #include "cache.h" #include "blk.h" +#include "lru.h" /* The cache. */ static int fd = -1; @@ -80,6 +81,8 @@ blk_init (void) size_t len; char *template; + lru_init (); + bitmap_init (&bm, BLKSIZE, 2 /* bits per block */); tmpdir = getenv ("TMPDIR"); @@ -115,6 +118,8 @@ blk_free (void) close (fd); bitmap_free (&bm); + + lru_free (); } int @@ -128,6 +133,9 @@ blk_set...
2019 Jan 03
3
[PATCH nbdkit v3 0/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
Patch 1 is the same as last time, except for a minor comment fix. Patch 2 should address everything that Eric mentioned in his review, and has been retested. Rich.
2019 Jan 04
0
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
..."reclaim.h" /* The cache. */ static int fd = -1; @@ -69,7 +72,7 @@ static int fd = -1; static struct bitmap bm; enum bm_entry { - BLOCK_NOT_CACHED = 0, + BLOCK_NOT_CACHED = 0, /* assumed to be zero by reclaim code */ BLOCK_CLEAN = 1, BLOCK_DIRTY = 3, }; @@ -80,10 +83,7 @@ blk_init (void) const char *tmpdir; size_t len; char *template; - - lru_init (); - - bitmap_init (&bm, BLKSIZE, 2 /* bits per block */); + struct statvfs statvfs; tmpdir = getenv ("TMPDIR"); if (!tmpdir) @@ -108,6 +108,24 @@ blk_init (void) unlink (template); + /* C...
2019 Jan 04
5
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
v4: https://www.redhat.com/archives/libguestfs/2019-January/msg00032.html v5: - Now we set the block size at run time. I'd like to say that I was able to test this change, but unfortunately I couldn't find any easy way to create a filesystem on x86-64 with a block size > 4K. Ext4 doesn't support it at all, and XFS doesn't support block size > page size (and I
2019 Jul 31
13
[nbdkit PATCH 0/8] fd leak safety
There's enough here to need a review; some of it probably needs backporting to stable-1.12. This probably breaks tests on Haiku or other platforms that have not been as on-the-ball about atomic CLOEXEC; feel free to report issues that arise, and I'll help come up with workarounds (even if we end up leaving a rare fd leak on less-capable systems). Meanwhile, I'm still working on my
2018 Dec 28
0
[PATCH nbdkit 9/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
...e. + * + * reclaim_blk is the last block that we will looked at. + */ +enum reclaim_state { + NOT_RECLAIMING = 0, + RECLAIMING_LRU = 1, + RECLAIMING_ANY = 2, +}; + +static enum reclaim_state reclaiming = NOT_RECLAIMING; +static uint64_t reclaim_blk; +#endif + +static void reclaim (void); + int blk_init (void) { @@ -146,6 +173,8 @@ blk_read (struct nbdkit_next_ops *next_ops, void *nxdata, off_t offset = blknum * BLKSIZE; enum bm_entry state = bitmap_get_blk (&bm, blknum, BLOCK_NOT_CACHED); + reclaim (); + nbdkit_debug ("cache: blk_read block %" PRIu64 " (offset %&qu...
2019 Jan 01
0
[PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
...e. + * + * reclaim_blk is the last block that we will looked at. + */ +enum reclaim_state { + NOT_RECLAIMING = 0, + RECLAIMING_LRU = 1, + RECLAIMING_ANY = 2, +}; + +static enum reclaim_state reclaiming = NOT_RECLAIMING; +static uint64_t reclaim_blk; +#endif + +static void reclaim (void); + int blk_init (void) { @@ -146,6 +173,8 @@ blk_read (struct nbdkit_next_ops *next_ops, void *nxdata, off_t offset = blknum * BLKSIZE; enum bm_entry state = bitmap_get_blk (&bm, blknum, BLOCK_NOT_CACHED); + reclaim (); + nbdkit_debug ("cache: blk_read block %" PRIu64 " (offset %&qu...
2019 Jan 03
0
[PATCH nbdkit v3 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...bm[1]. + * + * reclaim_blk is the last block that we looked at. + */ +enum reclaim_state { + NOT_RECLAIMING = 0, + RECLAIMING_LRU = 1, + RECLAIMING_ANY = 2, +}; + +static enum reclaim_state reclaiming = NOT_RECLAIMING; +static uint64_t reclaim_blk; +#endif + +static void reclaim (void); + int blk_init (void) { @@ -146,6 +176,8 @@ blk_read (struct nbdkit_next_ops *next_ops, void *nxdata, off_t offset = blknum * BLKSIZE; enum bm_entry state = bitmap_get_blk (&bm, blknum, BLOCK_NOT_CACHED); + reclaim (); + nbdkit_debug ("cache: blk_read block %" PRIu64 " (offset %&qu...
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as patches 6/9 through 9/9 here: https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html except that it has been rebased onto the current git master and retested thoroughly. Rich.
2019 Jan 03
4
[PATCH nbdkit v4 0/2] cache: Implement cache-max-size and method of
v3 was broken by a bad rebase, so let's forget about that one. Compared to v2: - Patch 1 is the same except for a minor comment change. - Patch 2 splits the reclaim code into a separate file (filters/cache/reclaim.c) - Addressed Eric's comments from his review of v2. - Retested on Linux and FreeBSD.
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried a lot harder to ensure that we still accommodate building on Haiku (although I have not actually yet fired up a Haiku VM to try it for myself). I also managed to make the sh plugin fully parallel, on capable platforms. See also my question on patch 10 on whether I've picked the best naming convention. Eric Blake (17):