From bf0b93a88479c3cb0bf2dc7cf890f60ae15ee05a Mon Sep 17 00:00:00 2001 From: wang di Date: Tue, 21 Jul 2015 06:37:19 -0700 Subject: [PATCH] LU-6874 out: missing noop in out_update_ops NOOP is missing in out_update_ops, though this NOOP operation will only exit inside the update log, i.e. out_handler should never handle noop update. But if we add new update in out_update_ops table, missing noop there might cause problems. Signed-off-by: wang di Change-Id: I967ffefcd1499801fa1890ed8d97ce70190c1902 Reviewed-on: http://review.whamcloud.com/15692 Reviewed-by: Niu Yawei Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/target/out_handler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/target/out_handler.c b/lustre/target/out_handler.c index 7052504..9ee9e73 100644 --- a/lustre/target/out_handler.c +++ b/lustre/target/out_handler.c @@ -665,6 +665,11 @@ out: RETURN(rc); } +static int out_noop(struct tgt_session_info *tsi) +{ + return 0; +} + #define DEF_OUT_HNDL(opc, name, flags, fn) \ [opc - OUT_CREATE] = { \ .th_name = name, \ @@ -703,7 +708,7 @@ static struct tgt_handler out_update_ops[] = { MUTABOR | HABEO_REFERO, out_index_delete), DEF_OUT_HNDL(OUT_WRITE, "out_write", MUTABOR | HABEO_REFERO, out_write), DEF_OUT_HNDL(OUT_READ, "out_read", HABEO_REFERO, out_read), - + DEF_OUT_HNDL(OUT_NOOP, "out_noop", HABEO_REFERO, out_noop), }; static struct tgt_handler *out_handler_find(__u32 opc) -- 1.8.3.1