This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit b501ca4439ec7e92e05ee5b1de9ab69feb0ecbe5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Oct 22 15:20:34 2018 -0500
sanlock: add sector/align sizes to client read output
enabled with -D
---
src/main.c | 14 +++++++++++---
src/sanlock.8 | 11 ++++-------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/main.c b/src/main.c
index 7a62b1d..1767328 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2040,8 +2040,7 @@ static void print_usage(void)
printf("sanlock client log_dump\n");
printf("sanlock client shutdown [-f 0|1] [-w 0|1]\n");
printf("sanlock client init -s LOCKSPACE | -r RESOURCE [-z 0|1] [-Z 512|4096 -A
1M|2M|4M|8M]\n");
- printf("sanlock client read -s LOCKSPACE | -r RESOURCE\n");
- printf("sanlock client align -s LOCKSPACE\n");
+ printf("sanlock client read -s LOCKSPACE | -r RESOURCE [-D]\n");
printf("sanlock client add_lockspace -s LOCKSPACE\n");
printf("sanlock client inq_lockspace -s LOCKSPACE\n");
printf("sanlock client rem_lockspace -s LOCKSPACE\n");
@@ -2798,7 +2797,11 @@ static int do_client_read(void)
(unsigned long long)com.lockspace.host_id,
com.lockspace.host_id_disk.path,
(unsigned long long)com.lockspace.host_id_disk.offset);
- log_tool("io_timeout %u", io_timeout);
+ if (com.debug) {
+ log_tool("io_timeout %u", io_timeout);
+ log_tool("sector_size %d",
sanlk_lsf_sector_flag_to_size(com.lockspace.flags));
+ log_tool("align_size %d",
sanlk_lsf_align_flag_to_size(com.lockspace.flags));
+ }
goto out;
}
@@ -2810,6 +2813,11 @@ static int do_client_read(void)
log_tool("r %s", res_str);
+ if (com.debug) {
+ log_tool("sector_size %d",
sanlk_res_sector_flag_to_size(com.res_args[0]->flags));
+ log_tool("align_size %d",
sanlk_res_align_flag_to_size(com.res_args[0]->flags));
+ }
+
free(res_str);
if (!hss)
diff --git a/src/sanlock.8 b/src/sanlock.8
index aeb016d..7f5f4b7 100644
--- a/src/sanlock.8
+++ b/src/sanlock.8
@@ -674,20 +674,17 @@ size, and both should be set together.
Tell the sanlock daemon to read a lockspace from disk. Only the
LOCKSPACE path and offset are required. If host_id is zero, the first
-record at offset (host_id 1) is used. The complete LOCKSPACE and io
-timeout are printed.
+record at offset (host_id 1) is used. The complete LOCKSPACE is printed.
+Add -D to print other details.
+(Also see sanlock direct read_leader.)
.BR "sanlock client read -r" " RESOURCE"
Tell the sanlock daemon to read a resource lease from disk. Only the
RESOURCE path and offset are required. The complete RESOURCE is printed.
+Add -D to print other details.
(Also see sanlock direct read_leader.)
-.BR "sanlock client align -s" " LOCKSPACE"
-
-Tell the sanlock daemon to report the required lease alignment for a storage
-path. Only path is used from the LOCKSPACE argument.
-
.BR "sanlock client add_lockspace -s" " LOCKSPACE"
Tell the sanlock daemon to acquire the specified host_id in the lockspace.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.