diff --git a/debian.azure-6.14/config/annotations b/debian.azure-6.14/config/annotations index c518bd1d767f..7a61ced84eea 100644 --- a/debian.azure-6.14/config/annotations +++ b/debian.azure-6.14/config/annotations @@ -1,7 +1,7 @@ # Menu: HEADER # FORMAT: 4 -# ARCH: amd64 arm64 -# FLAVOUR: amd64-azure arm64-azure +# ARCH: amd64 +# FLAVOUR: amd64-azure include "../../debian.azure/config/annotations" diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 726caba7e07c..c73f20304305 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -206,7 +206,7 @@ kmake = make ARCH=$(build_arch) \ KERNELRELEASE=$(abi_release)-$* \ CONFIG_DEBUG_SECTION_MISMATCH=y \ KBUILD_BUILD_VERSION="$(uploadnum)" \ - CFLAGS_MODULE="-DPKG_ABI=$(abinum)" \ + CFLAGS_MODULE='-DPKG_ABI=\"$(abinum)\"' \ PYTHON=$(PYTHON) ifneq ($(LOCAL_ENV_CC),) kmake += CC="$(LOCAL_ENV_CC)" DISTCC_HOSTS="$(LOCAL_ENV_DISTCC_HOSTS)" diff --git a/debian/scripts/control-create b/debian/scripts/control-create index 887f28633d4b..b363ee0238f6 100755 --- a/debian/scripts/control-create +++ b/debian/scripts/control-create @@ -73,8 +73,8 @@ gen_per_flavour () { if [ "${#signed_arch[@]}" != 0 ]; then sed "${sed_common_patterns[@]}" \ -e "s/ARCH/${signed_arch[*]}/g" \ - -e "s/=SIGN-ME-PKG=/-unsigned/g" \ - -e "s/=SIGN-ME-TXT=/ unsigned/g" \ + -e "s/=SIGN-ME-PKG=//g" \ + -e "s/=SIGN-ME-TXT=//g" \ -e "s/=SIGN-PEER-PKG=//g" \ "${DEBIAN}/control.d/flavour-signed-control.stub" fi @@ -82,8 +82,8 @@ gen_per_flavour () { if [ "${#unsigned_arch[@]}" != 0 ]; then sed "${sed_common_patterns[@]}" \ -e "s/ARCH/${unsigned_arch[*]}/g" \ - -e "s/=SIGN-ME-PKG=//g" \ - -e "s/=SIGN-ME-TXT=//g" \ + -e "s/=SIGN-ME-PKG=/-unsigned/g" \ + -e "s/=SIGN-ME-TXT=/-unsigned/g" \ -e "s/=SIGN-PEER-PKG=/-unsigned/g" \ "${DEBIAN}/control.d/flavour-signed-control.stub" fi diff --git a/delphix b/delphix new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 620ba6e0ab07..95b44e29c800 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3870,6 +3870,7 @@ int iscsi_target_tx_thread(void *arg) * connection recovery / failure event can be triggered externally. */ allow_signal(SIGINT); + complete(&conn->kthr_start_comp); while (!kthread_should_stop()) { /* @@ -4116,6 +4117,7 @@ int iscsi_target_rx_thread(void *arg) * connection recovery / failure event can be triggered externally. */ allow_signal(SIGINT); + complete(&conn->kthr_start_comp); /* * Wait for iscsi_post_login_handler() to complete before allowing * incoming iscsi/tcp socket I/O, and/or failing the connection. diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c index d9a6242264b7..5a56ba3c36af 100644 --- a/drivers/target/iscsi/iscsi_target_erl1.c +++ b/drivers/target/iscsi/iscsi_target_erl1.c @@ -1101,6 +1101,18 @@ void iscsit_handle_dataout_timeout(struct timer_list *t) iscsit_inc_conn_usage_count(conn); + /* + * If the command was aborted, for instance following a LUN RESET, + * a dataout timeout might be normal. + */ + if (target_cmd_interrupted(&cmd->se_cmd)) { + pr_debug("DataOut timeout on interrupted cmd with" + " ITT[0x%08llx]\n", cmd->se_cmd.tag); + cmd->dataout_timer_flags &= ~ISCSI_TF_RUNNING; + iscsit_dec_conn_usage_count(conn); + return; + } + spin_lock_bh(&cmd->dataout_timeout_lock); if (cmd->dataout_timer_flags & ISCSI_TF_STOP) { spin_unlock_bh(&cmd->dataout_timeout_lock); @@ -1114,19 +1126,22 @@ void iscsit_handle_dataout_timeout(struct timer_list *t) if (!sess->sess_ops->ErrorRecoveryLevel) { pr_err("Unable to recover from DataOut timeout while" " in ERL=0, closing iSCSI connection for I_T Nexus" - " %s,i,0x%6phN,%s,t,0x%02x\n", + " %s,i,0x%6phN,%s,t,0x%02x, cmd ITT[0x%08llx]\n", sess->sess_ops->InitiatorName, sess->isid, - sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt); + sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt, + cmd->se_cmd.tag); goto failure; } if (++cmd->dataout_timeout_retries == na->dataout_timeout_retries) { pr_err("Command ITT: 0x%08x exceeded max retries" " for DataOUT timeout %u, closing iSCSI connection for" - " I_T Nexus %s,i,0x%6phN,%s,t,0x%02x\n", + " I_T Nexus %s,i,0x%6phN,%s,t,0x%02x," + " cmd ITT[0x%08llx]\n", cmd->init_task_tag, na->dataout_timeout_retries, sess->sess_ops->InitiatorName, sess->isid, - sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt); + sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt, + cmd->se_cmd.tag); goto failure; } diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index c2ac9a99ebbb..78632713785a 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -619,6 +619,7 @@ int iscsit_start_kthreads(struct iscsit_conn *conn) ret = PTR_ERR(conn->tx_thread); goto out_bitmap; } + wait_for_completion(&conn->kthr_start_comp); conn->tx_thread_active = true; conn->rx_thread = kthread_run(iscsi_target_rx_thread, conn, @@ -628,6 +629,7 @@ int iscsit_start_kthreads(struct iscsit_conn *conn) ret = PTR_ERR(conn->rx_thread); goto out_tx; } + wait_for_completion(&conn->kthr_start_comp); conn->rx_thread_active = true; return 0; @@ -1023,6 +1025,7 @@ static struct iscsit_conn *iscsit_alloc_conn(struct iscsi_np *np) init_completion(&conn->rx_half_close_comp); init_completion(&conn->tx_half_close_comp); init_completion(&conn->rx_login_comp); + init_completion(&conn->kthr_start_comp); spin_lock_init(&conn->cmd_lock); spin_lock_init(&conn->conn_usage_lock); spin_lock_init(&conn->immed_queue_lock); @@ -1091,7 +1094,7 @@ void iscsi_target_login_sess_out(struct iscsit_conn *conn, if (!new_sess) goto old_sess_out; - pr_err("iSCSI Login negotiation failed.\n"); + pr_debug("iSCSI Login negotiation failed.\n"); iscsit_collect_login_stats(conn, ISCSI_STATUS_CLS_INITIATOR_ERR, ISCSI_LOGIN_STATUS_INIT_ERR); if (!zero_tsih || !conn->sess) diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 16e3ded98c32..0645fd660448 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -1227,7 +1227,7 @@ int iscsi_target_locate_portal( */ tiqn = iscsit_get_tiqn_for_login(t_buf); if (!tiqn) { - pr_err("Unable to locate Target IQN: %s in" + pr_debug("Unable to locate Target IQN: %s in" " Storage Node\n", t_buf); iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE); diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 05d29201b730..0b89895564bc 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -882,7 +882,7 @@ static void target_abort_work(struct work_struct *work) target_handle_abort(cmd); } -static bool target_cmd_interrupted(struct se_cmd *cmd) +bool target_cmd_interrupted(struct se_cmd *cmd) { int post_ret; @@ -901,6 +901,7 @@ static bool target_cmd_interrupted(struct se_cmd *cmd) return false; } +EXPORT_SYMBOL(target_cmd_interrupted); /* May be called from interrupt context so must not sleep. */ void target_complete_cmd_with_sense(struct se_cmd *cmd, u8 scsi_status, diff --git a/fs/namespace.c b/fs/namespace.c index dc433dedf538..97a8b23f4e40 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -306,7 +306,7 @@ void mnt_release_group_id(struct mount *mnt) /* * vfsmount lock must be held for read */ -static inline void mnt_add_count(struct mount *mnt, int n) +static noinline __noclone void mnt_add_count(struct mount *mnt, int n) { #ifdef CONFIG_SMP this_cpu_add(mnt->mnt_pcp->mnt_count, n); @@ -1870,7 +1870,8 @@ static int do_umount_root(struct super_block *sb) return ret; } -static int do_umount(struct mount *mnt, int flags) +/* force a bpftrace dynamic function probe here */ +static noinline __noclone int do_umount(struct mount *mnt, int flags) { struct super_block *sb = mnt->mnt.mnt_sb; int retval; diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index 5cf2fa480617..6d7b784edc1b 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -17,6 +17,7 @@ #ifndef _ASM_GENERIC_MSHYPERV_H #define _ASM_GENERIC_MSHYPERV_H +#include #include #include #include @@ -133,7 +134,7 @@ static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, u16 varhead_size, * Preserve the ability to 'make deb-pkg' since PKG_ABI is provided * by the Ubuntu build rules. */ -#define PKG_ABI 0 +#define PKG_ABI "0" #endif /* Generate the guest OS identifier as described in the Hyper-V TLFS */ @@ -143,7 +144,15 @@ static inline u64 hv_generate_guest_id(u64 kernel_version) guest_id = (((u64)HV_LINUX_VENDOR_ID) << 48); guest_id |= (kernel_version << 16); - guest_id |= PKG_ABI; + /* + * Delphix mutates the ABI number by appending a date and the commit hash. Strip it. + */ + char *token; + char *pkg_abi_str = PKG_ABI; + token = strsep(&pkg_abi_str, "-"); + unsigned long abi_number = simple_strtoul(token, NULL, 10); + guest_id |= (abi_number << 8); + return guest_id; } diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index 51ca80abacf7..93f7650309ff 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h @@ -550,6 +550,7 @@ struct iscsit_conn { struct completion conn_logout_comp; struct completion tx_half_close_comp; struct completion rx_half_close_comp; + struct completion kthr_start_comp; /* socket used by this connection */ struct socket *sock; void (*orig_data_ready)(struct sock *); diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 3378ff9ee271..4f136a98df63 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -191,6 +191,7 @@ sense_reason_t transport_generic_new_cmd(struct se_cmd *); void target_put_cmd_and_wait(struct se_cmd *cmd); void target_execute_cmd(struct se_cmd *cmd); +bool target_cmd_interrupted(struct se_cmd *cmd); int transport_generic_free_cmd(struct se_cmd *, int);