From: Emoly Liu Date: Mon, 2 Jul 2018 06:53:00 +0000 (+0800) Subject: LU-11110 ofd: remove obdfilter.*.* symlinks in few releases X-Git-Tag: 2.11.55~28 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=115bba9ffbe6aee32ff4e02a77c953bbc399339b;p=fs%2Flustre-release.git LU-11110 ofd: remove obdfilter.*.* symlinks in few releases Add a #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 14, 53, 0) check around the obdfilter.*.* symlinks creation code to keep them in place for another few releases, so that old test scripts that use them will not break, then remove them. Change-Id: I703c7ec3af8434b0de8b7cbed19c2c32611f6b18 Signed-off-by: Emoly Liu Reviewed-on: https://review.whamcloud.com/32752 Reviewed-by: Andreas Dilger Reviewed-by: James Nunez Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 685bdf0..d323cf6 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -766,6 +766,7 @@ obd_cleanup: return rc; } +#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 14, 53, 0) /** * Expose OSD statistics to OFD layer. * @@ -803,6 +804,7 @@ static void ofd_procfs_add_brw_stats_symlink(struct ofd_device *ofd) "../../%s/%s/writethrough_cache_enable", osd_obd->obd_type->typ_name, obd->obd_name); } +#endif /** * Cleanup all procfs entries in OFD. @@ -2959,7 +2961,9 @@ static int ofd_init0(const struct lu_env *env, struct ofd_device *m, GOTO(err_fini_proc, rc); } +#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 14, 53, 0) ofd_procfs_add_brw_stats_symlink(m); +#endif snprintf(info->fti_u.name, sizeof(info->fti_u.name), "%s-%s", "filter"/*LUSTRE_OST_NAME*/, obd->obd_uuid.uuid); diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 02df5f9..b5ef8a6 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1100,30 +1100,10 @@ test_28a() { # LU-4221 # In this test we will set three kinds of proc parameters with # lctl conf_param: - # 1. the ones moved from the OFD to the OSD, and only their - # symlinks kept in obdfilter - # 2. non-symlink ones in the OFD - # 3. non-symlink ones in the OSD + # 1. non-symlink ones in the OFD + # 2. non-symlink ones in the OSD # Check 1. - # prepare a symlink parameter in the OFD - name="writethrough_cache_enable" - param="$device.ost.$name" - cmd="$LCTL get_param -n obdfilter.$device.$name" - - # conf_param the symlink parameter in the OFD - old=$(do_facet ost1 $cmd) - new=$(((old + 1) % 2)) - set_conf_param_and_check ost1 "$cmd" "$param" $new || - error "lctl conf_param $device.ost.$param=$new failed" - - # conf_param the target parameter in the OSD - param="$device.osd.$name" - cmd="$LCTL get_param -n osd-*.$device.$name" - set_conf_param_and_check ost1 "$cmd" "$param" $old || - error "lctl conf_param $device.osd.$param=$old failed" - - # Check 2. # prepare a non-symlink parameter in the OFD name="client_cache_seconds" param="$device.ost.$name" @@ -1137,7 +1117,7 @@ test_28a() { # LU-4221 set_conf_param_and_check ost1 "$cmd" "$param" $old || error "lctl conf_param $device.ost.$param=$old failed" - # Check 3. + # Check 2. # prepare a non-symlink parameter in the OSD name="auto_scrub" param="$device.osd.$name" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index b5ffe45..c3713b0 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11835,8 +11835,7 @@ test_155_big_load() { save_writethrough() { local facets=$(get_facets OST) - save_lustre_params $facets "obdfilter.*.writethrough_cache_enable" > $1 - save_lustre_params $facets "osd-*.*.writethrough_cache_enable" >> $1 + save_lustre_params $facets "osd-*.*.writethrough_cache_enable" > $1 } test_155a() {