LU-2598 tests: check nr_local in ofd_preprw()

This patch checks the number of bulk I/O RPC pages with
PTLRPC_MAX_BRW_PAGES in ofd_preprw() to avoid
LASSERT(iobuf->dr_npages < iobuf->dr_max_pages) occurring
while larger I/O size is specified.

The patch also fixes echo_client_prep_commit() to reuse
the env context so as to avoid LASSERT(info->fti_exp == NULL)
occurring while the bulk I/O size is larger than
PTLRPC_MAX_BRW_SIZE.

The patch also improves obdfilter-survey to handle the
case while interoprating with old server.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
testlist=obdfilter-survey

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ifa7b720da1e3fc752f85bcfa6968eb16f93af2fa
Reviewed-on: http://review.whamcloud.com/6394
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-3360 osc: check ostid if no OBD_CONNECT_FID

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>
LU-2784 build: Provide RPMs build for Xeon Phi(TM) card

Enhance Lustre build to provide RPMs which can be installed on
Xeon Phi(TM) card automatically. This means the binaries
should be compiled by cross compiler and deployed into Xeon
Phi(TM) infrastructure on host to be automatically installed
on card after boot.

To produce Lustre client RPMs for Xeon Phi(TM) card just
execute the following commands:

export PATH=/usr/linux-k1om-4.7/bin:$PATH

sh ./autogen.sh

./configure --with-linux=/opt/intel/mic/src/card/kernel \
    --disable-server --without-o2ib \
    --host=x86_64-k1om-linux --build=x86_64-pc-linux

make rpms

NOTE: You should have "intel-mic-gpl-<version>.x86_64" package
installed and MIC GPL sources unpacked in /opt/intel/mic/src.

and the following RPMs will be produced:

lustre-client-mic-<version>.x86_64.rpm
lustre-client-mic-debuginfo-<version>.x86_64.rpm
lustre-client-mic-modules-<version>.x86_64.rpm
lustre-client-mic-source-<version>.x86_64.rpm
lustre-client-mic-tests-<version>.x86_64.rpm
lustre-client-mic-<version>.src.rpm

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I8d61133614443e2a6a33f5c1b1b097250b11d749
Reviewed-on: http://review.whamcloud.com/5324
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>