Timofey Titovets wrote:
Yang Dongsheng wrote:
Timofey Titovets wrote:
Hi, we have CEPH_OSD_REQUEST_TIMEOUT_DEFAULT in kernel to workaroung unmap problems with in-flight requests,
but for now to use it, users must patch kernel module.
https://elixir.bootlin.com/linux/v4.16-rc2/source/include/linux/ceph/libceph.h#L74
As rbd can't force unmap rbd with in-flight requests, that will be useful to allow set that on mount time.
Thansk!
Hi Timofeu, if you want to set the mount_timeout of your rbd image in mapping, you can try this:
rbd map -o mount_timeout=xxx rbd/test
Yang
Thanks, but that not what i ask.
CEPH_MOUNT_TIMEOUT_DEFAULT != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT
That a completely different things.
Does mount_timeout allow me umount device, when it lose connection to ceph? I don't think so.
mount_timeout fully useless, when rbd already mapped and mounted.
I has describe very accurately, what i ask and for what.
Thanks.
Oops, my bad. but, osd_request_timeout is also already supported in kernel.
that means we don't need to patch kernel module at all, what we need is just
making rbd command to pass this option to kernel as that:
[root@atest-guest ceph]# git diff src/tools/rbd/action/Kernel.cc
diff --git a/src/tools/rbd/action/Kernel.cc b/src/tools/rbd/action/Kernel.cc
index 4f58cc2..6bad4fd 100644
--- a/src/tools/rbd/action/Kernel.cc
++ b/src/tools/rbd/action/Kernel.cc
@ -120,6 +120,9
@ static int parse_map_options(char *options)
} else if (!strcmp(this_char, "mount_timeout")) {
if (put_map_option_value("mount_timeout", value_char, map_option_int_cb))
return -EINVAL;
} else if (!strcmp(this_char, "osd_request_timeout")) {
+ if (put_map_option_value("osd_request_timeout", value_char, map_option_int_cb))
+ return -EINVAL;
} else if (!strcmp(this_char, "osdkeepalive")) {
if (put_map_option_value("osdkeepalive", value_char, map_option_int_cb))
return -EINVAL;
I will consider to send a pr for rbd command for this.
Thanx