Whamcloud - gitweb
LU-6874 out: missing noop in out_update_ops 92/15692/2
authorwang di <di.wang@intel.com>
Tue, 21 Jul 2015 13:37:19 +0000 (06:37 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 3 Aug 2015 02:00:36 +0000 (02:00 +0000)
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 <di.wang@intel.com>
Change-Id: I967ffefcd1499801fa1890ed8d97ce70190c1902
Reviewed-on: http://review.whamcloud.com/15692
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/target/out_handler.c

index 7052504..9ee9e73 100644 (file)
@@ -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)