diff options
author | Peter Seebach <peter.seebach@windriver.com> | 2013-02-16 17:01:22 -0600 |
---|---|---|
committer | Peter Seebach <peter.seebach@windriver.com> | 2013-02-16 19:26:02 -0600 |
commit | 01bc8866a4aa5af17350b36e2347dc1695dbceb0 (patch) | |
tree | 590f8ed10ba2aa284e1cccbdbdefad105605a4b0 /enums | |
parent | 1b774e2f832fdbcb27ddeb2cd799d156aabefb85 (diff) | |
download | pseudo-01bc8866a4aa5af17350b36e2347dc1695dbceb0.tar.gz pseudo-01bc8866a4aa5af17350b36e2347dc1695dbceb0.tar.bz2 pseudo-01bc8866a4aa5af17350b36e2347dc1695dbceb0.zip |
If you don't want the answer, don't ask the question.
Most pseudo operations don't actually USE the server's response. So
why wait for a response?
This patch introduces a new message type, PSEUDO_MSG_FASTOP. It
also tags pseudo operation types with whether or not they need to
give a response. This requires updates to maketables to allow non-string
types for additional columns, and the addition of some quotes to the
SQL query enums/query_type.in table.
A few routines are altered to change their behavior and whether or not
they perform a stat operation. The only operations that do wait are
OP_FSTAT and OP_STAT, OP_MKNOD, and OP_MAY_UNLINK. Rationale:
You can't query the server for replacement information and not wait for
it. Makes no sense.
There's extra checking in mknod, because we really do want to fail out
if we couldn't do that -- that implies that we haven't created a thing
that will look like a node.
The result from OP_MAY_UNLINK is checked because it's used to determine
whether we need to send a DID_UNLINK or CANCEL_UNLINK. It might be cheaper
to send two messages without waiting than to send one, wait, and maybe
send another, but I don't want to send invalid messages.
This is highly experimental.
Diffstat (limited to 'enums')
-rw-r--r-- | enums/msg_type.in | 1 | ||||
-rw-r--r-- | enums/op.in | 46 | ||||
-rw-r--r-- | enums/query_type.in | 18 |
3 files changed, 33 insertions, 32 deletions
diff --git a/enums/msg_type.in b/enums/msg_type.in index 0313073..578d571 100644 --- a/enums/msg_type.in +++ b/enums/msg_type.in @@ -4,3 +4,4 @@ shutdown op ack nak +fastop diff --git a/enums/op.in b/enums/op.in index 65eb73c..3b8e23e 100644 --- a/enums/op.in +++ b/enums/op.in @@ -1,23 +1,23 @@ -op: OP -chdir -chmod -chown -chroot -close -creat -dup -fchmod -fchown -fstat -link -mkdir -mknod -open -rename -stat -unlink -symlink -exec -may-unlink -did-unlink -cancel-unlink +op: OP; int wait = 0 +chdir, 0 +chmod, 0 +chown, 0 +chroot, 0 +close, 0 +creat, 0 +dup, 0 +fchmod, 0 +fchown, 0 +fstat, 1 +link, 0 +mkdir, 0 +mknod, 1 +open, 0 +rename, 0 +stat, 1 +unlink, 0 +symlink, 0 +exec, 0 +may-unlink, 1 +did-unlink, 0 +cancel-unlink, 0 diff --git a/enums/query_type.in b/enums/query_type.in index 5bfc741..974e24f 100644 --- a/enums/query_type.in +++ b/enums/query_type.in @@ -1,9 +1,9 @@ -query_type: PSQT; sql = LITTLE BOBBY TABLES -exact, = -less, < -greater, > -bitand, & -notequal, != -like, LIKE -notlike, NOT LIKE -sqlpat, LIKE +query_type: PSQT; const char * sql = "LITTLE BOBBY TABLES" +exact, "=" +less, "<" +greater, ">" +bitand, "&" +notequal, "!=" +like, "LIKE" +notlike, "NOT LIKE" +sqlpat, "LIKE" |