Whamcloud - gitweb
LU-3360 osc: check ostid if no OBD_CONNECT_FID
authorHongchao Zhang <hongchao.zhang@intel.com>
Wed, 20 Mar 2013 15:16:10 +0000 (23:16 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 24 May 2013 19:37:07 +0000 (15:37 -0400)
in lustre_set_wire_obdo, if "ocd->ocd_connect_flags" doesn't contain
OBD_CONNECT_FID, use "ost_id" to check the type of the object
instead of using ost_id.oi_fid only.

Change-Id: I4d9ef133c3d26c3f8f36d5b5b9430e941e445068
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/6426
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lustre/lustre_idl.h

index 1b1928d..6210ff8 100644 (file)
@@ -3231,7 +3231,7 @@ static inline void lustre_set_wire_obdo(struct obd_connect_data *ocd,
                return;
 
        if (unlikely(!(ocd->ocd_connect_flags & OBD_CONNECT_FID)) &&
                return;
 
        if (unlikely(!(ocd->ocd_connect_flags & OBD_CONNECT_FID)) &&
-           fid_seq_is_echo(fid_seq(&lobdo->o_oi.oi_fid))) {
+           fid_seq_is_echo(ostid_seq(&lobdo->o_oi))) {
                /* Currently OBD_FL_OSTID will only be used when 2.4 echo
                 * client communicate with pre-2.4 server */
                wobdo->o_oi.oi.oi_id = fid_oid(&lobdo->o_oi.oi_fid);
                /* Currently OBD_FL_OSTID will only be used when 2.4 echo
                 * client communicate with pre-2.4 server */
                wobdo->o_oi.oi.oi_id = fid_oid(&lobdo->o_oi.oi_fid);