search for: flags_string

Displaying 6 results from an estimated 6 matches for "flags_string".

2003 Sep 29
1
Handling of X-Status flags
Hi all, I've done a bit of searching and haven't seen anybody else coming across this problem yet: I noticed that Dovecot uses the opposite flags for marking messages as deleted and draft to most other MUAs I've seen or used: With PINE, mutt and uw-imapd at least, messages are marked with X-Status 'D' for Deleted, and 'T' for drafT. Dovecot reverses this behaviour,
2018 Dec 15
0
[PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.
...gs) { char *h = handle; char cbuf[32], obuf[32]; @@ -403,16 +407,53 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset) } } +/* Convert NBDKIT_FLAG_* to flags string. */ +static void flag_append (const char *str, bool *comma, char **buf, size_t *len); + +static void +flags_string (uint32_t flags, char *buf, size_t len) +{ + bool comma = false; + + if (flags & NBDKIT_FLAG_FUA) + flag_append ("fua", &comma, &buf, &len); + + if (flags & NBDKIT_FLAG_MAY_TRIM) + flag_append ("may_trim", &comma, &buf, &len); +} + +stati...
2018 Dec 15
5
[PATCH nbdkit v2 0/4] tests: Test export flags (eflags).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-December/thread.html#00123 v2: - Document "-" instead of "script=-" and use it in the test; and verify this also works on FreeBSD; and verify that it doesn't depend on the particular behaviour of our wrapper script and should work with installed nbdkit too. - Fix handling of zero flags parameter. -
2019 Aug 02
5
[nbdkit PATCH 0/3] sh plugin fixes
I'm pushing the first one as blatantly obvious. The second one is also simple enough, but not enough of a bug for me to push tonight. The third is something I noticed while working on sh, but is really more about docs vs. plugins in general. There, we could either change the code to match the docs (breaking backwards behavior for a plugin that set .errno_is_preserved=2) [what my patch did],
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
...n_fast_zero) + #undef SET static void @@ -836,6 +859,8 @@ remove_roots (void) REMOVE (thread_model); + REMOVE (can_fast_zero); + #undef REMOVE } diff --git a/plugins/sh/sh.c b/plugins/sh/sh.c index c73b08b7..d5db8b59 100644 --- a/plugins/sh/sh.c +++ b/plugins/sh/sh.c @@ -478,6 +478,9 @@ flags_string (uint32_t flags, char *buf, size_t len) if (flags & NBDKIT_FLAG_REQ_ONE) flag_append ("req_one", &comma, &buf, &len); + + if (flags & NBDKIT_FLAG_FAST_ZERO) + flag_append("fast", &comma, &buf, &len); } static void @@ -536,7 +539,7...
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a