Displaying 20 results from an estimated 26 matches for "cache_open".
Did you mean:
ace_open
2019 Apr 27
0
[nbdkit PATCH 1/4] filters: Drop useless .open callbacks
...20 deletions(-)
diff --git a/filters/cache/cache.c b/filters/cache/cache.c
index b3fef42..19ce555 100644
--- a/filters/cache/cache.c
+++ b/filters/cache/cache.c
@@ -186,15 +186,6 @@ cache_config_complete (nbdkit_next_config_complete *next, void *nxdata)
return next (nxdata);
}
-static void *
-cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
-{
- if (next (nxdata, readonly) == -1)
- return NULL;
-
- return NBDKIT_HANDLE_NOT_NEEDED;
-}
-
/* Get the file size and ensure the cache is the correct size. */
static int64_t
cache_get_size (struct nbdkit_next_ops *next_ops, void *nxda...
2019 Aug 29
0
I broke "yum update" - C7
...update
2019-08-29 16:27:08,367 urlgrabber version = 3.10
2019-08-29 16:27:08,367 trans function "_" = <function _ at 0x7effcd5bf2a8>
2019-08-29 16:27:08,391 combined options: {
'delegate' : {
'async' : None,
'bandwidth' : 0,
'cache_openers': True,
'checkfunc' : None,
'close_connection': 0,
'copy_local' : 0,
'curl_obj' : None,
'data' : None,
'default_speed': 1000000.0,
'delegate' : None,
'failfunc' : <func...
2019 Aug 29
4
I broke "yum update" - C7
Am 2019-08-29 16:51, schrieb Gary Stainburn:
> On Thursday 29 August 2019 15:45:44 Gordon Messmer wrote:
>> On 8/29/19 3:03 AM, Gary Stainburn wrote:
>> > https://us-east.repo.webtatic.com/yum/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
>>
>>
>> What do you see when you run:
>>
2011 Oct 30
2
Module Error
...fff8801ee7c6500 ffff8801efd32bc0 ffff8801e45de2d0
Oct 28 23:40:35 goku kernel: [ 4472.132037] <0> ffff8801ee7c6500
ffff8801f05d80f8 ffffffff801314f0 ffffffffa08d1349
Oct 28 23:40:35 goku kernel: [ 4472.132037] Call Trace:
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffffa08d1349>]
cache_open+0x9/0x20 [pagecache]
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff8016c529>]
proc_reg_open+0xb9/0x240
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff8011060b>]
__dentry_open+0xeb/0x340
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff801206a8>]
finish_open+...
2011 Oct 30
2
Module Error
...fff8801ee7c6500 ffff8801efd32bc0 ffff8801e45de2d0
Oct 28 23:40:35 goku kernel: [ 4472.132037] <0> ffff8801ee7c6500
ffff8801f05d80f8 ffffffff801314f0 ffffffffa08d1349
Oct 28 23:40:35 goku kernel: [ 4472.132037] Call Trace:
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffffa08d1349>]
cache_open+0x9/0x20 [pagecache]
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff8016c529>]
proc_reg_open+0xb9/0x240
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff8011060b>]
__dentry_open+0xeb/0x340
Oct 28 23:40:35 goku kernel: [ 4472.132037] [<ffffffff801206a8>]
finish_open+...
2018 Dec 28
0
[PATCH nbdkit 9/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
...then check the thresholds. */
+ if (max_size != -1) {
+ if (lo_thresh >= hi_thresh) {
+ nbdkit_error ("cache-low-threshold must be "
+ "less than cache-high-threshold");
+ return -1;
+ }
+ }
+
+ return next (nxdata);
+}
+
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
@@ -415,6 +470,7 @@ static struct nbdkit_filter filter = {
.load = cache_load,
.unload = cache_unload,
.config = cache_config,
+ .config_complete = cache_config_complete,
.open = c...
2019 Aug 29
0
I broke "yum update" - C7
...--disablerepo=\* --enablerepo=epel update
[snip]
Loading mirror speeds from cached hostfile
2019-08-29 17:23:17,344 combined options: {
'text' : 'epel/x86_64/metalink',
'delegate' : {
'async' : None,
'bandwidth' : 0,
'cache_openers': True,
'checkfunc' : None,
'close_connection': 0,
'copy_local' : 0,
'curl_obj' : None,
'data' : None,
'default_speed': 1000000.0,
'delegate' : None,
'failfunc' : <func...
[PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 01
0
[PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
...then check the thresholds. */
+ if (max_size != -1) {
+ if (lo_thresh >= hi_thresh) {
+ nbdkit_error ("cache-low-threshold must be "
+ "less than cache-high-threshold");
+ return -1;
+ }
+ }
+
+ return next (nxdata);
+}
+
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
@@ -416,6 +471,7 @@ static struct nbdkit_filter filter = {
.load = cache_load,
.unload = cache_unload,
.config = cache_config,
+ .config_complete = cache_config_complete,
.open = c...
2019 Apr 27
8
[nbdkit PATCH 0/4] Fix truncate handling of real_size
While working on adding assertions to pthread_mutex_lock calls, I
noticed that the truncate filter's use of mutex didn't really protect
us, and isn't really necessary. Cleaning that up also spotted a couple
of other potential cleanups.
Eric Blake (4):
filters: Drop useless .open callbacks
truncate: Fix corruption when plugin changes per-connection size
truncate: Test for safe
[PATCH nbdkit v3 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
0
[PATCH nbdkit v3 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...then check the thresholds. */
+ if (max_size != -1) {
+ if (lo_thresh >= hi_thresh) {
+ nbdkit_error ("cache-low-threshold must be "
+ "less than cache-high-threshold");
+ return -1;
+ }
+ }
+
+ return next (nxdata);
+}
+
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
@@ -416,6 +480,7 @@ static struct nbdkit_filter filter = {
.load = cache_load,
.unload = cache_unload,
.config = cache_config,
+ .config_complete = cache_config_complete,
.open = c...
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
0
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...then check the thresholds. */
+ if (max_size != -1) {
+ if (lo_thresh >= hi_thresh) {
+ nbdkit_error ("cache-low-threshold must be "
+ "less than cache-high-threshold");
+ return -1;
+ }
+ }
+
+ return next (nxdata);
+}
+
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
@@ -416,6 +481,7 @@ static struct nbdkit_filter filter = {
.load = cache_load,
.unload = cache_unload,
.config = cache_config,
+ .config_complete = cache_config_complete,
.open = c...
2018 Jan 22
1
[PATCH nbdkit] filters: Add caching filter.
This adds a cache filter, which works like the COW filter in reverse.
For realistic use it needs a bit more work, especially to add limits
on the size of the cache, a more sensible cache replacement policy,
and perhaps some kind of background worker to write dirty blocks out.
Rich.
2019 Jan 01
0
[PATCH nbdkit] plugins, filters: Define and use NBDKIT_HANDLE_NOT_NEEDED.
...dkit_error)
+
#ifdef __cplusplus
}
#endif
diff --git a/filters/cache/cache.c b/filters/cache/cache.c
index 67dde23..dc7ceab 100644
--- a/filters/cache/cache.c
+++ b/filters/cache/cache.c
@@ -177,15 +177,10 @@ cache_config_complete (nbdkit_next_config_complete *next, void *nxdata)
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
- /* We don't use the handle, so this just provides a non-NULL
- * pointer that we can return.
- */
- static int handle;
-
if (next (nxdata, readonly) == -1)
return NULL;
- return &handle;
+ return NBDKIT_HANDLE_NOT_N...
2019 Aug 29
2
I broke "yum update" - C7
Am 2019-08-29 17:36, schrieb Gary Stainburn:
> On Thursday 29 August 2019 16:20:00 Alexander Dalloz wrote:
>> Hi,
>>
>> yum uses libcurl behind the scenes and thus NSS and not OpenSSL.
>>
>> Do you get something indicative when running:
>>
>> URLGRABBER_DEBUG=1 yum --disablerepo=\* --enablerepo=webtatic
>> check-update
>>
>>
[PATCH nbdkit v3 0/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
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.
...then check the thresholds. */
+ if (max_size != -1) {
+ if (lo_thresh >= hi_thresh) {
+ nbdkit_error ("cache-low-threshold must be "
+ "less than cache-high-threshold");
+ return -1;
+ }
+ }
+
+ return next (nxdata);
+}
+
static void *
cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
{
@@ -176,7 +242,7 @@ cache_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
uint8_t *block;
assert (!flags);
- block = malloc (BLKSIZE);
+ block = malloc (blksize);
if (block == NULL) {
*err = errno;
nbdkit_error (&...
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 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.
2018 Dec 01
0
[PATCH nbdkit] common: Move shared bitmap code to a common library.
...int32_t flags, int *err);
static void
cache_load (void)
@@ -104,6 +99,8 @@ cache_load (void)
size_t len;
char *template;
+ bitmap_init (&bm, BLKSIZE, 2 /* bits per block */);
+
tmpdir = getenv ("TMPDIR");
if (!tmpdir)
tmpdir = LARGE_TMPDIR;
@@ -180,28 +177,8 @@ cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
static int
blk_set_size (uint64_t new_size)
{
- uint8_t *new_bm;
- const size_t old_bm_size = bm_size;
- uint64_t new_bm_size_u64 = DIV_ROUND_UP (new_size, BLKSIZE*8/2);
- size_t new_bm_size;
-
- if (new_bm_size_u64 > SIZE_MAX) {
-...
2018 Dec 02
0
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
...plate;
+ bitmap_init (&bm, BLKSIZE, 2 /* bits per block */);
+
tmpdir = getenv ("TMPDIR");
if (!tmpdir)
tmpdir = LARGE_TMPDIR;
@@ -133,6 +130,8 @@ cache_unload (void)
{
if (fd >= 0)
close (fd);
+
+ bitmap_free (&bm);
}
static int
@@ -180,28 +179,8 @@ cache_open (nbdkit_next_open *next, void *nxdata, int readonly)
static int
blk_set_size (uint64_t new_size)
{
- uint8_t *new_bm;
- const size_t old_bm_size = bm_size;
- uint64_t new_bm_size_u64 = DIV_ROUND_UP (new_size, BLKSIZE*8/2);
- size_t new_bm_size;
-
- if (new_bm_size_u64 > SIZE_MAX) {
-...