diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-22 12:39:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-25 14:14:17 +0100 |
commit | f887757541cc039e98ab95317b3c5f388658ad33 (patch) | |
tree | fc2eb0adc924a9acbf12bbb7c4cfabd12ca6a05c /meta/recipes-devtools/pseudo/files/toomanyfiles.patch | |
parent | 68fb77d2f6057a1c2c2a299bb18915c40d65e756 (diff) | |
download | poky-f887757541cc039e98ab95317b3c5f388658ad33.tar.gz |
pseudo: Add fastop reply fix
This changes the pseudo FASTOP functionality so that a reply to the
operation is required. This means we then cannot lose data if a connection
is closed. This in turn stops corruption if we run out of file handles
and have to close connections.
This tweaks the connection closure patch to update the comment there which
is now outdated.
(From OE-Core rev: eb49d50b4c342069087886f2aac546805647c066)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/toomanyfiles.patch')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/toomanyfiles.patch | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch index 7319ab29bf..b085a4505d 100644 --- a/meta/recipes-devtools/pseudo/files/toomanyfiles.patch +++ b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch | |||
@@ -9,7 +9,7 @@ a small risk of data loss here sadly but its better than hanging. | |||
9 | RP | 9 | RP |
10 | 2017/4/25 | 10 | 2017/4/25 |
11 | 11 | ||
12 | Upstream-Status: Pending [Peter is aware of the issue] | 12 | Upstream-Status: Submitted [Peter is aware of the issue] |
13 | 13 | ||
14 | Index: pseudo-1.8.2/pseudo_server.c | 14 | Index: pseudo-1.8.2/pseudo_server.c |
15 | =================================================================== | 15 | =================================================================== |
@@ -31,15 +31,12 @@ Index: pseudo-1.8.2/pseudo_server.c | |||
31 | 31 | ||
32 | pseudo_debug(PDBGF_SERVER, "server loop started.\n"); | 32 | pseudo_debug(PDBGF_SERVER, "server loop started.\n"); |
33 | if (listen_fd < 0) { | 33 | if (listen_fd < 0) { |
34 | @@ -663,10 +665,18 @@ pseudo_server_loop(void) { | 34 | @@ -663,10 +665,15 @@ pseudo_server_loop(void) { |
35 | message_time.tv_usec -= 1000000; | 35 | message_time.tv_usec -= 1000000; |
36 | ++message_time.tv_sec; | 36 | ++message_time.tv_sec; |
37 | } | 37 | } |
38 | + } else if (hitmaxfiles) { | 38 | + } else if (hitmaxfiles) { |
39 | + /* In theory there is a potential race here where if we close a client, | 39 | + /* Only close one per loop iteration in the interests of caution */ |
40 | + it may have sent us a fastop message which we don't act upon. | ||
41 | + If we don't close a filehandle we'll loop indefinitely thought. | ||
42 | + Only close one per loop iteration in the interests of caution */ | ||
43 | + close_client(i); | 40 | + close_client(i); |
44 | + hitmaxfiles = 0; | 41 | + hitmaxfiles = 0; |
45 | } | 42 | } |