Message ID | 20170202005853.23456-14-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Wed, Feb 01, 2017 at 04:58:30PM -0800, Bart Van Assche wrote: > + * transport_wait_for_tasks - set CMD_T_STOP and wait for t_transport_stop_comp > + * @cmd: command to wait on > * > - * Called from frontend fabric context to wait for storage engine > - * to pause and/or release frontend generated struct se_cmd. > + * Returns immediately if CMD_T_ACTIVE has not been set. If CMD_T_ACTIVE has > + * been set, sets the CMD_T_STOP flag, waits for t_transport_stop_comp and > + * clears CMD_T_STOP and CMD_T_ACTIVE. > */ > bool transport_wait_for_tasks(struct se_cmd *cmd) I don't think this adds any value over reading the code just below it. I would suggest to just remove the comment. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2017-02-06 at 01:10 -0800, Christoph Hellwig wrote: > I don't think this adds any value over reading the code just below > it. I would suggest to just remove the comment. OK, I will drop the comment. Bart.-- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 3f54ec6d7f66..daf85bc6ce18 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2770,11 +2770,12 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop, } /** - * transport_wait_for_tasks - wait for completion to occur - * @cmd: command to wait + * transport_wait_for_tasks - set CMD_T_STOP and wait for t_transport_stop_comp + * @cmd: command to wait on * - * Called from frontend fabric context to wait for storage engine - * to pause and/or release frontend generated struct se_cmd. + * Returns immediately if CMD_T_ACTIVE has not been set. If CMD_T_ACTIVE has + * been set, sets the CMD_T_STOP flag, waits for t_transport_stop_comp and + * clears CMD_T_STOP and CMD_T_ACTIVE. */ bool transport_wait_for_tasks(struct se_cmd *cmd) {