* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (rc == 0) {
check_lcd(tgt->lut_obd->obd_name, index, &tti->tti_lcd);
lcd_le_to_cpu(&tti->tti_lcd, lcd);
+ lcd->lcd_last_result = ptlrpc_status_ntoh(lcd->lcd_last_result);
+ lcd->lcd_last_close_result =
+ ptlrpc_status_ntoh(lcd->lcd_last_close_result);
}
CDEBUG(D_INFO, "%s: read lcd @%lld uuid = %s, last_transno = "LPU64
{
struct tgt_thread_info *tti = tgt_th_info(env);
+ lcd->lcd_last_result = ptlrpc_status_hton(lcd->lcd_last_result);
+ lcd->lcd_last_close_result =
+ ptlrpc_status_hton(lcd->lcd_last_close_result);
lcd_cpu_to_le(lcd, &tti->tti_lcd);
tti_buf_lcd(tti);
OBD_FREE_PTR(ccb);
}
- if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ if (exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
/* report failure to force synchronous operation */
return -EPERM;
mutex_init(&ted->ted_lcd_lock);
- if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ if (exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
RETURN(0);
/* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
LASSERTF(idx >= 0, "%d\n", idx);
if (!strcmp(ted->ted_lcd->lcd_uuid, tgt->lut_obd->obd_uuid.uuid) ||
- (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
RETURN(0);
if (test_and_set_bit(idx, tgt->lut_client_bitmap)) {
/* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
if (!strcmp((char *)ted->ted_lcd->lcd_uuid,
(char *)tgt->lut_obd->obd_uuid.uuid) ||
- (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT)
RETURN(0);
CDEBUG(D_INFO, "%s: del client at idx %u, off %lld, UUID '%s'\n",