[lustre-devel] [PATCH 29/29] lustre: centralize handling of PTLRPCD_SET

Andreas Dilger adilger at whamcloud.com
Wed Jan 9 18:23:13 PST 2019


On Jan 8, 2019, at 23:24, NeilBrown <neilb at suse.com> wrote:
> 
> Various places test if a given rqset is PTLRPCD_SET
> and call either ptlrpcd_add_req() or ptlrpc_set_add_req()
> depending on the result.
> 
> This can be unified by putting the test of PTLRPCD_SET in
> ptlrpc_set_add_req(), and always calling that function.
> 
> This results in the being only one place that tests PTLRPCD_SET.
> 
> Signed-off-by: NeilBrown <neilb at suse.com>
> ---
> 
> diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
> index 6d328b48a96b..e665f70e54a8 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_net.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_net.h
> @@ -1832,6 +1832,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set);
> int ptlrpc_set_wait(struct ptlrpc_request_set *);
> void ptlrpc_set_destroy(struct ptlrpc_request_set *);
> void ptlrpc_set_add_req(struct ptlrpc_request_set *, struct ptlrpc_request *);
> +#define PTLRPCD_SET ((struct ptlrpc_request_set*)1)

(style) space before that '*'

Nice cleanup otherwise.  Definitely removes a bunch of boilerplate code.

Reviewed-by: Andreas Dilger <adilger at whamcloud.com>

Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud









More information about the lustre-devel mailing list