From 3f5742e20b30010ef88e19b6ee41c6b071258aee Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 29 May 2007 14:49:19 +0000 Subject: r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr branch, please check if it fulfils your needs. Two changes: The validation is not done inside the brlock.c traverse_fn, it's done as a separate routine. Secondly, this patch does not call the checker routines in smbcontrol directly but depends on a running smbd. (This used to be commit 7e39d77c1f90d9025cab08918385d140e20ca25b) --- source3/utils/smbcontrol.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 2b927adb96..1a1a190957 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -698,6 +698,34 @@ static BOOL do_closeshare(struct messaging_context *msg_ctx, strlen(argv[1]) + 1); } +/* force a blocking lock retry */ + +static BOOL do_lockretry(struct messaging_context *msg_ctx, + const struct server_id pid, + const int argc, const char **argv) +{ + if (argc != 1) { + fprintf(stderr, "Usage: smbcontrol lockretry\n"); + return False; + } + + return send_message(msg_ctx, pid, MSG_SMB_UNLOCK, NULL, 0); +} + +/* force a validation of all brl entries, including re-sends. */ + +static BOOL do_brl_revalidate(struct messaging_context *msg_ctx, + const struct server_id pid, + const int argc, const char **argv) +{ + if (argc != 1) { + fprintf(stderr, "Usage: smbcontrol brl-revalidate\n"); + return False; + } + + return send_message(msg_ctx, pid, MSG_SMB_BRL_VALIDATE, NULL, 0); +} + /* Force a SAM synchronisation */ static BOOL do_samsync(struct messaging_context *msg_ctx, @@ -1037,6 +1065,8 @@ static const struct { { "debuglevel", do_debuglevel, "Display current debuglevels" }, { "printnotify", do_printnotify, "Send a print notify message" }, { "close-share", do_closeshare, "Forcibly disconnect a share" }, + { "lockretry", do_lockretry, "Force a blocking lock retry" }, + { "brl-revalidate", do_brl_revalidate, "Revalidate all brl entries" }, { "samsync", do_samsync, "Initiate SAM synchronisation" }, { "samrepl", do_samrepl, "Initiate SAM replication" }, { "pool-usage", do_poolusage, "Display talloc memory usage" }, -- cgit