* this leads to losing user settings done before such as
* disable lru_resize, etc. */
if (old_connect_flags != exp_connect_flags(exp) || init_connect) {
+ struct ldlm_namespace *ns = imp->imp_obd->obd_namespace;
+ __u64 changed_flags;
+
+ changed_flags =
+ ns->ns_connect_flags ^ ns->ns_orig_connect_flags;
CDEBUG(D_HA, "%s: Resetting ns_connect_flags to server "
"flags: %#llx\n", imp->imp_obd->obd_name,
ocd->ocd_connect_flags);
- imp->imp_obd->obd_namespace->ns_connect_flags =
- ocd->ocd_connect_flags;
- imp->imp_obd->obd_namespace->ns_orig_connect_flags =
- ocd->ocd_connect_flags;
+ ns->ns_connect_flags = (ns->ns_connect_flags & changed_flags) |
+ (ocd->ocd_connect_flags & ~changed_flags);
+ ns->ns_orig_connect_flags = ocd->ocd_connect_flags;
}
if (ocd->ocd_connect_flags & OBD_CONNECT_AT)
}
run_test 815 "zero byte tiny write doesn't hang (LU-12382)"
+test_816() {
+ $LFS setstripe -c 1 -i 0 $DIR/$tfile
+ # ensure ost1 is connected
+ stat $DIR/$tfile >/dev/null || error "can't stat"
+ wait_osc_import_state client ost1 FULL
+ # no locks, no reqs to let the connection idle
+ cancel_lru_locks osc
+ lru_resize_disable osc
+ local before
+ local now
+ before=$($LCTL get_param -n \
+ ldlm.namespaces.$FSNAME-OST0000-osc-[^M]*.lru_size)
+
+ wait_osc_import_state client ost1 IDLE
+ dd if=/dev/null of=$DIR/$tfile bs=1k count=1 conv=sync
+ now=$($LCTL get_param -n \
+ ldlm.namespaces.$FSNAME-OST0000-osc-[^M]*.lru_size)
+ [ $before == $now ] || error "lru_size changed $before != $now"
+}
+run_test 816 "do not reset lru_resize on idle reconnect"
+
#
# tests that do cleanup/setup should be run at the end
#