search for: cmd_flags

Displaying 20 results from an estimated 169 matches for "cmd_flags".

2014 Sep 18
3
[PATCH] blk-mq: Avoid race condition with uninitialized requests
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. Test is still pending. David Hildenbrand (1): blk-mq: Avoid race condition with uninitialized requests block/blk-mq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.8.5.5
2014 Sep 18
3
[PATCH] blk-mq: Avoid race condition with uninitialized requests
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. Test is still pending. David Hildenbrand (1): blk-mq: Avoid race condition with uninitialized requests block/blk-mq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.8.5.5
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...Bool | RStaticString @@ -1485,7 +1485,11 @@ Future NBD extensions may result in additional C<size_type> values. "pread", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset" ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + (* We could silently accept flag DF, but it really only makes sense + * with callbacks, because otherwise there is no observable change + * except that the server may fail where it would otherwise succeed. + *) + optargs = [ OFlags ("flags", cmd_flags, Some []) ];...
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...ART state *) | Connecting (* can be called when connecting/handshaking *) @@ -906,6 +910,18 @@ let non_blocking_test_call_description = "\n This call does not block, because it returns data that is saved in the handle from the NBD protocol handshake." +(* Flags. *) +let cmd_flags = { + flag_prefix = "CMD_FLAG"; + flags = [ + "FUA", 1 lsl 0; + "NO_HOLE", 1 lsl 1; + "DF", 1 lsl 2; + "REQ_ONE", 1 lsl 3; + ] +} +let all_flags = [ cmd_flags ] + (* Calls. * * The first parameter [struct nbd_handle *nbd...
2019 Aug 13
0
[PATCH libnbd 6/6] lib: Make all completion callbacks into OClosures.
...rator @@ -1836,9 +1836,8 @@ C<nbd_pread>."; "aio_pread_callback", { default_call with - args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistOut ("buf", "count"); UInt64 "offset" ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = "read from the NBD server, with...
2019 Aug 13
0
[PATCH libnbd v2 2/3] lib: Make all completion callbacks into OClosures.
...rator @@ -1836,9 +1836,8 @@ C<nbd_pread>."; "aio_pread_callback", { default_call with - args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistOut ("buf", "count"); UInt64 "offset" ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = "read from the NBD server, with...
2014 Sep 17
2
blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)
...is is > > safer/cleaner. > > That may not be easy or enough to check if hw_ctx/tag_sets are > fully initialized if you mean all requests have been used one time. > > On Wed, Sep 17, 2014 at 10:11 PM, David Hildenbrand > > I was playing with a simple patch that just sets cmd_flags and action_flags to > > What is action_flags? atomic_flags, sorry :) Otherwise e.g. REQ_ATOM_STARTED could already be set due to the randomness. I am not sure if this is really necessary, or if it is completely shielded by the tag-handling code, but seemed to be clean for me to do it (and...
2014 Sep 17
2
blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)
...is is > > safer/cleaner. > > That may not be easy or enough to check if hw_ctx/tag_sets are > fully initialized if you mean all requests have been used one time. > > On Wed, Sep 17, 2014 at 10:11 PM, David Hildenbrand > > I was playing with a simple patch that just sets cmd_flags and action_flags to > > What is action_flags? atomic_flags, sorry :) Otherwise e.g. REQ_ATOM_STARTED could already be set due to the randomness. I am not sure if this is really necessary, or if it is completely shielded by the tag-handling code, but seemed to be clean for me to do it (and...
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...args=[CBBytesIn ("subbuf", "count"); - CBUInt64 "offset"; CBUInt "status"; - CBMutable (Int "error")] } ]; + Closure chunk_closure ]; optargs = [ OFlags ("flags", cmd_flags) ]; ret = RErr; permitted_states = [ Connected ]; @@ -1641,13 +1663,7 @@ punching a hole."; "block_status", { default_call with - args = [ UInt64 "count"; UInt64 "offset"; - Closure { cbname="extent"; -...
2014 Sep 22
1
[PATCH] blk-mq: Avoid race condition with uninitialized requests
On 09/18/2014 11:04 AM, David Hildenbrand wrote: > This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. > > We have to initialize at least the atomic_flags and the cmd_flags when > allocating storage for the requests. > > Otherwise blk_mq_timeout_check() might dereference uninitialized pointers when > racing with the creation of a request. > > Also move the reset of cmd_flags for the initializing code to the point where a > request is freed. So w...
2014 Sep 22
1
[PATCH] blk-mq: Avoid race condition with uninitialized requests
On 09/18/2014 11:04 AM, David Hildenbrand wrote: > This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. > > We have to initialize at least the atomic_flags and the cmd_flags when > allocating storage for the requests. > > Otherwise blk_mq_timeout_check() might dereference uninitialized pointers when > racing with the creation of a request. > > Also move the reset of cmd_flags for the initializing code to the point where a > request is freed. So w...
2014 Sep 18
0
[PATCH] blk-mq: Avoid race condition with uninitialized requests
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. We have to initialize at least the atomic_flags and the cmd_flags when allocating storage for the requests. Otherwise blk_mq_timeout_check() might dereference uninitialized pointers when racing with the creation of a request. Also move the reset of cmd_flags for the initializing code to the point where a request is freed. So we will never end up with pending fl...
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2: - now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE - four flags instead of two: STRICT_FLAGS is new (patch 4), and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5) - various refactorings for more shared code and less duplication Eric Blake (5): api: Add xxx_MASK constant for each Flags type generator: Refactor filtering of accepted OFlags api: Add
2014 Sep 17
2
blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)
...blk_mq_tag_set *set, > left -= to_do * rq_size; > for (j = 0; j < to_do; j++) { > tags->rqs[i] = p; > + > + /* Avoiding early access from timeout handler */ > + tags->rqs[i]->tag = -1; > + tags->rqs[i]->q = NULL; > + tags->rqs[i]->cmd_flags = 0; > + > if (set->ops->init_request) { > if (set->ops->init_request(set->driver_data, > tags->rqs[i], hctx_idx, i, Another way would be to ensure that the timeout handler doesn't touch hw_ctx or tag_sets that aren't fully initialized yet....
2014 Sep 17
2
blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)
...blk_mq_tag_set *set, > left -= to_do * rq_size; > for (j = 0; j < to_do; j++) { > tags->rqs[i] = p; > + > + /* Avoiding early access from timeout handler */ > + tags->rqs[i]->tag = -1; > + tags->rqs[i]->q = NULL; > + tags->rqs[i]->cmd_flags = 0; > + > if (set->ops->init_request) { > if (set->ops->init_request(set->driver_data, > tags->rqs[i], hctx_idx, i, Another way would be to ensure that the timeout handler doesn't touch hw_ctx or tag_sets that aren't fully initialized yet....
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator. Enum maps to enumerated types (like enum in C). The only current use for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural equivalents in other programming languages). Flags maps to any uint32_t bitmask. It is basically a non-optional, generalized
2019 Aug 13
7
[PATCH libnbd v2 0/3] Implement OClosures.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-August/msg00168.html I pushed uncontroversial patches 1-4 v2: - The implementation of OClosure (new patch 1) in Python is fixed. - Patch 2 (old patch 5) is unchanged. - I added a new API for removing debug callbacks. I think this approach has some advantages over using OClosure. - I didn't yet do any work on changing the
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring and IMHO we should just push them. Possibly 1-3 should be squashed together, but I posted them separately so they are easier to review. Patches 5 and 6 together implement OClosure. Patch 5 adds the feature and is simple to understand. Patch 6 changes the Closure completion callbacks into OClosure, but because it doesn't
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
Commit-ID: 166a88f4568067378ddce23b91be7b4ec9a9dfb4 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=166a88f4568067378ddce23b91be7b4ec9a9dfb4 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:52 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: eval: Add
2019 Aug 10
1
Re: [PATCH libnbd 2/9] generator: Generalize OFlags.
...turns the size in bytes of the NBD export." > "pread", { > default_call with > args = [ BytesOut ("buf", "count"); UInt64 "offset" ]; > - optargs = [ OFlags "flags" ]; > + optargs = [ OFlags ("flags", cmd_flags) ]; Do we want to use this as a chance to document which flags a given API supports? For example, pread supports DF but not FUA, REQ_ONE, or MAY_TRIM. Then again, there's still a dynamic element - the API supports the DF flag for compilation, but the server must also support it (nbd_can_df)...