From 43f6843136149bb8f0a2b5a08bf47febe9232bbc Mon Sep 17 00:00:00 2001 From: Wouter Verhelst Date: Thu, 5 Aug 2010 20:51:06 -0400 Subject: [PATCH] Document differences with old style exports --- nbd-server.5.sgml | 10 ++++++++++ nbd-server.c | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/nbd-server.5.sgml b/nbd-server.5.sgml index babf619..cfa07f3 100644 --- a/nbd-server.5.sgml +++ b/nbd-server.5.sgml @@ -161,6 +161,16 @@ manpage.1: manpage.sgml specified). The server will only export devices on the standard port. + + For upgrades from pre-2.9.17 versions of nbd, it may be + appropriate to enable the oldstyle parameter until all + clients have been converted to using name-based exports. + + + Note that exports specified on the command line will + always use the old handshake protocol and will not allow + name-based exports. + diff --git a/nbd-server.c b/nbd-server.c index 7e97e45..ea446db 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -834,6 +834,10 @@ GArray* parse_cfile(gchar* f, GError** e) { g_key_file_free(cfile); return NULL; } + if(s.port && !do_oldstyle) { + g_warning("A port was specified, but oldstyle exports were not requested. This may not do what you expect."); + g_warning("Please read 'man 5 nbd-server' and search for oldstyle for more info"); + } } else { s.virtstyle=VIRT_IPLIT; } -- 1.7.10.4