Re: NCPFS and brittle connections

From: Petr Vandrovec
Date: Mon Feb 19 2007 - 22:14:11 EST


Pierre Ossman wrote:
Sorry this took so long but I got occupied with other things and this
had to move down the pile a bit.

New patch which uses dedicated buffers for the currently active packet.
Also adds a new state RQ_ABANDONED which basically means "the caller no
longer cares about this request so the pointers are no longer valid". It
is used to determine if the global receive buffer should be copied to
the provided one upon completion.

Hello,
it would be nice if these two copies (request->txbuf, and rxbuf->reply) could be eliminated, but I see no easy way how to do that...

commit 166fb223f9507431fb97820549e3e41980987445
Author: Pierre Ossman <ossman@xxxxxxxxx>
Date: Mon Feb 19 11:34:43 2007 +0100

ncpfs: make sure server connection survives a kill
Use internal buffers instead of the ones supplied by the caller
so that a caller can be interrupted without having to abort the
entire ncp connection.
Signed-off-by: Pierre Ossman <ossman@xxxxxxxxx>

Acked-by: Petr Vandrovec <petr@xxxxxxxxxxxxxx>
(modulo one thing below)

diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h
index a503052..d5e7ffc 100644
--- a/include/linux/ncp_fs_sb.h
+++ b/include/linux/ncp_fs_sb.h
@@ -50,6 +50,8 @@ struct ncp_server {
int packet_size;
unsigned char *packet; /* Here we prepare requests and
receive replies */
+ unsigned char *txbuf; /* Storage for current requres */

Looks like a typo? requres => request ?

+ unsigned char *rxbuf; /* Storage for reply to current request */
int lock; /* To prevent mismatch in protocols. */
struct mutex mutex;

Petr
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/