search for: new_opt

Displaying 20 results from an estimated 36 matches for "new_opt".

Did you mean: new_op
2007 Aug 30
1
alias_method_chain stack level too deep in Rake test only
...less base.method_defined?(:url_for) unless base.respond_to?(:url_for_without_ssl_supprt) base.send :include, InstanceMethods base.send :alias_method_chain, :url_for, :ssl_support end end module InstanceMethods def url_for_with_ssl_support(options) new_options = options.dup if options.kind_of?(Hash) new_options.merge!({ :only_path => false }) if request.ssl? ^ url_ssl?(new_options) if url_ssl?(new_options) new_options.merge!({ :protocol => ''https'' }) if [''developmen...
2018 Dec 21
1
[nbdkit PATCH] connections: Don't use uninit memory on early client EOF
...be called on all non-error paths out of the options for-loop * in that function. @@ -639,10 +664,9 @@ _negotiate_handshake_newstyle_options (struct connection *conn) const char *optname; for (nr_options = 0; nr_options < MAX_NR_OPTIONS; ++nr_options) { - if (conn->recv (conn, &new_option, sizeof new_option) == -1) { - nbdkit_error ("read: %m"); + if (conn_recv_full (conn, &new_option, sizeof new_option, + "read: %m") == -1) return -1; - } version = be64toh (new_option.version); if (version != NEW_VERSION...
2018 Apr 30
0
[PATCH 3/4] common/qemuopts: use the old pointer as realloc pointer
...git a/common/qemuopts/qemuopts.c b/common/qemuopts/qemuopts.c index c40d44783..b3e69e306 100644 --- a/common/qemuopts/qemuopts.c +++ b/common/qemuopts/qemuopts.c @@ -168,8 +168,7 @@ extend_options (struct qemuopts *qopts) qopts->nr_alloc = 1; else qopts->nr_alloc *= 2; - new_options = qopts->options; - new_options = realloc (new_options, + new_options = realloc (qopts->options, qopts->nr_alloc * sizeof (struct qopt)); if (new_options == NULL) return NULL; @@ -421,8 +420,7 @@ qemuopts_append_arg_list (struct qemuopts *q...
2016 Jan 11
1
[PATCH] Add support for newstyle NBD protocol (RHBZ#1297100).
Experimental and only very lightly tested so far. Rich.
2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
..._t version; /* NBD_NEW_VERSION */ uint16_t gflags; /* global flags */ } __attribute__((packed)); -#define NEW_VERSION UINT64_C(0x49484156454F5054) +#define NBD_NEW_VERSION UINT64_C(0x49484156454F5054) /* New-style handshake option (sent by the client to us). */ -struct new_option { +struct nbd_new_option { uint64_t version; /* NEW_VERSION */ uint32_t option; /* NBD_OPT_* */ uint32_t optlen; /* option data length */ /* option data follows */ } __attribute__((packed)); +/* Newstyle handshake OPT_EXPORT_NAME reply message. */ +...
2006 Jan 03
0
Extending association options
...th ''reflections'' for the associations stuff. I would like to plug into some of this development with an ''acts'' module and am wondering where best to find docs on it. Say, for example, I''d like to add an option to belongs_to: belongs_to :account, :new_option => ''name'' Where I have added "new_option" to the options on belongs_to. Can this be done easily within a module of some sort? My module will then look for "belongs_to" associations for a model and possibly look for this :new_option to override a defa...
2020 Sep 29
1
[nbdkit PATCH] server: Adjust limit on max NBD_OPT_* from client
..._reply (uint32_t option, uint32_t reply) /* Reply to NBD_OPT_LIST with the plugin's list of export names. */ static int -send_newstyle_option_reply_exportnames (uint32_t option) +send_newstyle_option_reply_exportnames (uint32_t option, size_t *nr_options) { GET_CONN; struct nbd_fixed_new_option_reply fixed_new_option_reply; - size_t i; + size_t i, list_len; CLEANUP_EXPORTS_FREE struct nbdkit_exports *exps = NULL; + int r; exps = nbdkit_exports_new (); if (exps == NULL) @@ -91,7 +95,8 @@ send_newstyle_option_reply_exportnames (uint32_t option) if (backend_list_exports (t...
2018 Nov 29
2
[nbdkit PATCH] connections: Implement NBD_OPT_INFO
...col enhancement allows a client to inspect details about +the export without actually connecting. + =item Structured Replies I<Not supported>. diff --git a/src/protocol.h b/src/protocol.h index 792a905..088dcab 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -98,6 +98,7 @@ struct fixed_new_option_reply { #define NBD_OPT_ABORT 2 #define NBD_OPT_LIST 3 #define NBD_OPT_STARTTLS 5 +#define NBD_OPT_INFO 6 #define NBD_OPT_GO 7 #define NBD_REP_ACK 1 diff --git a/src/connections.c b/src/connections.c index 1b40e46..410a893 100644 --- a/src/conn...
2019 Mar 18
0
[PATCH nbdkit 2/2] server: Split out NBD protocol code from connections code.
...shake, sizeof handshake) == -1) { - nbdkit_error ("write: %m"); - return -1; - } - - return 0; -} - -/* Receive newstyle options. */ - -static int -send_newstyle_option_reply (struct connection *conn, - uint32_t option, uint32_t reply) -{ - struct fixed_new_option_reply fixed_new_option_reply; - - fixed_new_option_reply.magic = htobe64 (NBD_REP_MAGIC); - fixed_new_option_reply.option = htobe32 (option); - fixed_new_option_reply.reply = htobe32 (reply); - fixed_new_option_reply.replylen = htobe32 (0); - - if (conn->send (conn, - &a...
2007 Oct 27
2
Current value of object.method in helper
Hi, I am currently working to generate selection from my validation table where code and description pairs are stored. This works fine except when the current value is not exist in validation table. There are some old data which contains values that are no longer used and not in my validation table. I do not want to add old values in my validation table; however, I would like to display these
2019 Mar 18
3
[PATCH nbdkit 0/2] server: Split out NBD protocol code from connections code.
These are a couple of patches in preparation for the Block Status implementation. While the patches (especially the second one) are very large they are really just elementary code motion. Rich.
2019 Aug 30
0
[nbdkit PATCH 5/9] server: Cache per-connection size
...tic int send_newstyle_option_reply_info_export (struct connection *conn, uint32_t option, uint32_t reply, - uint16_t info) + uint16_t info, uint64_t exportsize) { struct fixed_new_option_reply fixed_new_option_reply; struct fixed_new_option_reply_info_export export; @@ -127,7 +127,7 @@ send_newstyle_option_reply_info_export (struct connection *conn, fixed_new_option_reply.reply = htobe32 (reply); fixed_new_option_reply.replylen = htobe32 (sizeof export); export.info...
2018 Aug 06
0
[PATCH nbdkit v2] protocol: Implement NBD_OPT_GO.
...tyle_option_reply_exportname (struct connection *conn, return 0; } +static int +send_newstyle_option_reply_info_export (struct connection *conn, + uint32_t option, uint32_t reply, + uint16_t info) +{ + struct fixed_new_option_reply fixed_new_option_reply; + struct fixed_new_option_reply_info_export export; + + fixed_new_option_reply.magic = htobe64 (NBD_REP_MAGIC); + fixed_new_option_reply.option = htobe32 (option); + fixed_new_option_reply.reply = htobe32 (reply); + fixed_new_option_reply.replylen = htobe32 (si...
2019 Sep 24
11
[PATCH nbdkit 0/4] common/protocol: Unify public <nbd-protocol.h>
We should have only one NBD protocol file. Let's make nbdkit's version the canonical one, and use it in libnbd. Rich.
2019 Sep 28
0
[nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
...("client option data too long (%" PRIu32 ")", optlen); return -1; } + data = malloc (optlen + 1); /* Allowing a trailing NUL helps some uses */ + if (data == NULL) { + nbdkit_error ("malloc: %m"); + return -1; + } option = be32toh (new_option.option); optname = name_of_nbd_opt (option); @@ -448,9 +453,6 @@ negotiate_handshake_newstyle_options (struct connection *conn) /* As with NBD_OPT_EXPORT_NAME we print the export name and * save it in the connection. */ - /* FIXME: Our current MAX_OPTION_...
2018 Aug 04
3
[PATCH nbdkit] protocol: Implement NBD_OPT_GO.
This is only lightly tested (against just qemu NBD client), and the code might be structured a little better as the _negotiate_handshake_newstyle_options function has now grown to be huge. Anyway works for me. Rich.
2018 Aug 06
3
[PATCH nbdkit v2] protocol: Implement NBD_OPT_GO.
There's no substantial difference over v1, I simply fixed a few whitespace issues, moved one struct around and tidied up the comments. Rich.
2019 Aug 19
2
[nbdkit PATCH] noextents: Add hook to cripple SR advertisement
...+233,7 @@ negotiate_handshake_newstyle_options (struct connection *conn) char data[MAX_OPTION_LENGTH+1]; struct new_handshake_finish handshake_finish; const char *optname; + int r; for (nr_options = 0; nr_options < MAX_NR_OPTIONS; ++nr_options) { if (conn_recv_full (conn, &new_option, sizeof new_option, @@ -481,6 +482,20 @@ negotiate_handshake_newstyle_options (struct connection *conn) debug ("newstyle negotiation: %s: client requested structured replies", name_of_nbd_opt (option)); + r = backend->can_sr (backend, conn); + if (r =...
2017 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command line (used only by ‘virt-v2v -o qemu’). However we also generate a qemu command line in ‘lib/launch-direct.c’, and we might in future need to generate a ‘-readconfig’-compatible configuration file if we want to go beyond 10,000 drives for scalability testing. Therefore this patch series reimplements the qemu command line code as
2019 Apr 23
0
[nbdkit PATCH 6/7] nbd: Implement NBD_OPT_GO client request
...or without * modification, are permitted provided that the following conditions are @@ -453,6 +453,158 @@ nbd_reply (struct handle *h, int fd) return err ? -1 : 0; } +static int +nbd_newstyle_recv_option_reply (struct handle *h, uint32_t option, + struct fixed_new_option_reply *reply, + char **payload) +{ + char *buffer; + + if (payload) + *payload = NULL; + if (read_full (h->fd, reply, sizeof *reply)) { + nbdkit_error ("unable to read option reply: %m"); + return -1; + } + reply->magic = be64toh (repl...