search for: actual_fua

Displaying 5 results from an estimated 5 matches for "actual_fua".

2019 Nov 22
0
[PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...ULATE + 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) + actual_fua = bool (flags & nbdkit.FLAG_FUA) + assert expect_fua == actual_fua + end = offset + len(buf) + h['disk'][offset:end] = buf + +def flush(h, flags): + assert flags == 0 + +def trim(h, count, offset, flags): + expect_fua = cfg.get ('trim_expect_fua', False) + actu...
2019 Nov 22
3
Re: [PATCH nbdkit v2 10/10] tests: Test the Python plugin thoroughly.
...()[:10] b'<!doctype ' I think the plugin should support both bytearray, memoryview, or bytes. Supporting objects implementing the buffer protocol would be best. > + > +def pwrite(h, buf, offset, flags): > + expect_fua = cfg.get ('pwrite_expect_fua', False) > + actual_fua = bool (flags & nbdkit.FLAG_FUA) > + assert expect_fua == actual_fua > + end = offset + len(buf) > + h['disk'][offset:end] = buf > + > +def flush(h, flags): > + assert flags == 0 > + > +def trim(h, count, offset, flags): > + expect_fua = cfg.get...
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