A race can occur on Server during Client connection and
concurent eviction, when Client's last_rcvd slot index has still
not been assigned (-1).
This patch adds a check to address such condition.
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ifead82719a0dc9411f1b79d6c8c59eb9ef339fa5
Reviewed-on: http://review.whamcloud.com/20328
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Grégoire Pichon <gregoire.pichon@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
RETURN(0);
exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
RETURN(0);
+ /* Slot may be not yet assigned, use case is race between Client
+ * reconnect and forced eviction */
+ if (ted->ted_lr_idx < 0) {
+ CWARN("%s: client with UUID '%s' not in bitmap\n",
+ tgt->lut_obd->obd_name, ted->ted_lcd->lcd_uuid);
+ RETURN(0);
+ }
+
CDEBUG(D_INFO, "%s: del client at idx %u, off %lld, UUID '%s'\n",
tgt->lut_obd->obd_name, ted->ted_lr_idx, ted->ted_lr_off,
ted->ted_lcd->lcd_uuid);
CDEBUG(D_INFO, "%s: del client at idx %u, off %lld, UUID '%s'\n",
tgt->lut_obd->obd_name, ted->ted_lr_idx, ted->ted_lr_off,
ted->ted_lcd->lcd_uuid);