search for: cache_emul

Displaying 14 results from an estimated 14 matches for "cache_emul".

2019 Nov 22
2
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...t; + PyModule_AddIntConstant (m, "FUA_EMULATE", NBDKIT_FUA_EMULATE); > + PyModule_AddIntConstant (m, "FUA_NATIVE", NBDKIT_FUA_NATIVE); > + > + PyModule_AddIntConstant (m, "CACHE_NONE", NBDKIT_CACHE_NONE); > + PyModule_AddIntConstant (m, "CACHE_EMULATE", NBDKIT_CACHE_EMULATE); > + PyModule_AddIntConstant (m, "CACHE_NATIVE", NBDKIT_CACHE_NATIVE); > + > + PyModule_AddIntConstant (m, "EXTENT_HOLE", NBDKIT_EXTENT_HOLE); > + PyModule_AddIntConstant (m, "EXTENT_ZERO", NBDKIT_EXTENT_ZERO); &g...
2019 Nov 22
1
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...FUA_EMULATE", NBDKIT_FUA_EMULATE); > > > + PyModule_AddIntConstant (m, "FUA_NATIVE", NBDKIT_FUA_NATIVE); > > > + > > > + PyModule_AddIntConstant (m, "CACHE_NONE", NBDKIT_CACHE_NONE); > > > + PyModule_AddIntConstant (m, "CACHE_EMULATE", NBDKIT_CACHE_EMULATE); > > > + PyModule_AddIntConstant (m, "CACHE_NATIVE", NBDKIT_CACHE_NATIVE); > > > + > > > + PyModule_AddIntConstant (m, "EXTENT_HOLE", NBDKIT_EXTENT_HOLE); > > > + PyModule_AddIntConstant (m, "EXTEN...
2019 Nov 22
0
[PATCH nbdkit v2 02/10] python: Add various constants to the API.
...NBDKIT_FUA_NONE); + PyModule_AddIntConstant (m, "FUA_EMULATE", NBDKIT_FUA_EMULATE); + PyModule_AddIntConstant (m, "FUA_NATIVE", NBDKIT_FUA_NATIVE); + + PyModule_AddIntConstant (m, "CACHE_NONE", NBDKIT_CACHE_NONE); + PyModule_AddIntConstant (m, "CACHE_EMULATE", NBDKIT_CACHE_EMULATE); + PyModule_AddIntConstant (m, "CACHE_NATIVE", NBDKIT_CACHE_NATIVE); + + PyModule_AddIntConstant (m, "EXTENT_HOLE", NBDKIT_EXTENT_HOLE); + PyModule_AddIntConstant (m, "EXTENT_ZERO", NBDKIT_EXTENT_ZERO); + return m; } --...
2019 Nov 22
0
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...tConstant (m, "FUA_EMULATE", NBDKIT_FUA_EMULATE); > > + PyModule_AddIntConstant (m, "FUA_NATIVE", NBDKIT_FUA_NATIVE); > > + > > + PyModule_AddIntConstant (m, "CACHE_NONE", NBDKIT_CACHE_NONE); > > + PyModule_AddIntConstant (m, "CACHE_EMULATE", NBDKIT_CACHE_EMULATE); > > + PyModule_AddIntConstant (m, "CACHE_NATIVE", NBDKIT_CACHE_NATIVE); > > + > > + PyModule_AddIntConstant (m, "EXTENT_HOLE", NBDKIT_EXTENT_HOLE); > > + PyModule_AddIntConstant (m, "EXTENT_ZERO", NBD...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...lugin.pod b/plugins/python/nbdkit-python-plugin.pod > index b20f51f7..d7b6033f 100644 > --- a/plugins/python/nbdkit-python-plugin.pod > +++ b/plugins/python/nbdkit-python-plugin.pod > @@ -271,6 +271,13 @@ contents will be garbage collected. > # return nbdkit.CACHE_NONE or nbdkit.CACHE_EMULATE > # or nbdkit.CACHE_NATIVE We expose various constants through 'import nbdkit', so... > +++ b/plugins/python/python.c > @@ -1020,6 +1020,79 @@ py_can_cache (void *handle) > return NBDKIT_CACHE_NONE; > } > > +static int > +py_can_extents (void *ha...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...ins/python/nbdkit-python-plugin.pod b/plugins/python/nbdkit-python-plugin.pod index b20f51f7..d7b6033f 100644 --- a/plugins/python/nbdkit-python-plugin.pod +++ b/plugins/python/nbdkit-python-plugin.pod @@ -271,6 +271,13 @@ contents will be garbage collected. # return nbdkit.CACHE_NONE or nbdkit.CACHE_EMULATE # or nbdkit.CACHE_NATIVE +=item C<can_extents> + +(Optional) + + def can_extents(h): + # return a boolean + =item C<pread> (Required) @@ -365,6 +372,14 @@ indicated range. If the cache operation fails, your function should throw an exception, optionally using C<nbdki...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...plugin.pod b/plugins/python/nbdkit-python-plugin.pod > index b20f51f7..d7b6033f 100644 > --- a/plugins/python/nbdkit-python-plugin.pod > +++ b/plugins/python/nbdkit-python-plugin.pod > @@ -271,6 +271,13 @@ contents will be garbage collected. > # return nbdkit.CACHE_NONE or nbdkit.CACHE_EMULATE > # or nbdkit.CACHE_NATIVE > > +=item C<can_extents> > + > +(Optional) > + > + def can_extents(h): > + # return a boolean > + > =item C<pread> > > (Required) > @@ -365,6 +372,14 @@ indicated range. > If the cache operation fails, you...
2019 Nov 22
18
[PATCH nbdkit v2 00/10] Implement nbdkit API v2 for Python plugins.
v1: https://www.redhat.com/archives/libguestfs/2019-November/msg00153.html v2: - Fix implementation of can_cache. - Add implementation of can_fua. - Add a very thorough test suite which tests every command + flag combination.
2019 Nov 25
7
[PATCH nbdkit v2 0/7] Implement nbdkit API v2 for Python plugins.
v3 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00209.html In v4: - Rebase on top of current master. Includes various fixes and updates required because of Nir's patches that went into master. - Fix api_version() -> API_VERSION in patch 2 noted previously on the mailing list. Rich.
2019 Nov 23
8
[PATCH nbdkit v3 0/7] Implement nbdkit API v2 for Python plugins.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00163.html I pushed patch 1 (with spelling fix), patch 4 and patch 5 since those were previously ACKed on the list. Differences in v3: - Add error checking to PyModule_AddIntConstant. - Use API_VERSION constant instead of function. - Add max API version supported to --dump-plugin output. - Print API_VERSION selected by
2019 Nov 22
0
[PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...it.FUA_EMULATE + elif fua == "native": + return nbdkit.FUA_NATIVE + +def can_cache(h): + cache = cfg.get ('can_cache', "none") + if cache == "none": + return nbdkit.CACHE_NONE + elif cache == "emulate": + return nbdkit.CACHE_EMULATE + elif cache == "native": + return nbdkit.CACHE_NATIVE + +def pread(h, count, offset, flags): + assert flags == 0 + return h['disk'][offset:offset+count] + +def pwrite(h, buf, offset, flags): + expect_fua = cfg.get ('pwrite_expect_fua', False) + ac...
2019 Nov 22
3
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...tive": > + return nbdkit.FUA_NATIVE > + > +def can_cache(h): > + cache = cfg.get ('can_cache', "none") > + if cache == "none": > + return nbdkit.CACHE_NONE > + elif cache == "emulate": > + return nbdkit.CACHE_EMULATE > + elif cache == "native": > + return nbdkit.CACHE_NATIVE > + > +def pread(h, count, offset, flags): > + assert flags == 0 > + return h['disk'][offset:offset+count] Very nice and simple test plugin! But this returns always a bytearray, which...
2019 Nov 21
10
[PATCH nbdkit 0/8] Implement nbdkit API v2 for Python plugins.
And fill out most of the missing bits of the API. Rich.
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each addressed to the appropriate single list, with proposed changes to: - the NBD protocol - qemu: both server and client - libnbd: client - nbdkit: server The feature in question adds a new optional NBD_INFO_ packet to the NBD_OPT_GO portion of handshake, adding up to 16 bits of information that the server can advertise to the