LU-5871 lod: Do not return EAGAIN in lod_object_init

Convert EAGAIN to EIO if fld_client_rpc() fails in
lod_object_init(), otherwise it will confuse
lu_object_find_at(), and make it wait there for no
reason, which should only wait if the object is dying.
See call chain lu_object_find_at()-> lu_object_find_try()
->lu_object_alloc()->lod_object_init()->lod_fld_lookup()
->fld_client_rpc(), and even worse waitq is not being
initialized yet when the failure happened here.

Change-Id: Ieae434b34c239efea86a4a471fb01e397336a31c
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/12586
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5551 lustre: fix messages with missisng newlines

Add missisng newlines to four CERROR() messages. Restore the trailing
newline in the definition of OSC_DUMP_GRANT(). Remove an unnecessary
CDEBUG() from ldlm_pool_recalc().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I549de59dd9cd205e1a6d0fbcd70ccd1cbf5e389b
Reviewed-on: http://review.whamcloud.com/11996
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 libcfs: remove libcfs posix headers

Remove libcfs/include/libcfs/posix/. Include what was needed from
libcfs/posix/libcfs.h into libcfs/libcfs.h or in the appropriate .c
file.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia3016c83f13554b617c5f4a6dcc86adf222d4e49
Reviewed-on: http://review.whamcloud.com/11987
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5329 mgs: Remove nibtbl swab code for 2.2 clients

Remove obsolete code that allows compatibility with
Lustre 2.2 clients.

Due to a bug, Lustre 2.2 clients always swab nidtbl
entries even if the server and client are using the
same endian. The fix was to allow the servers to do
the swabbing for the client.

Now, clients will do the swabbing.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I420ca986c0a68343be07272bb419cbdb1cebf148
Reviewed-on: http://review.whamcloud.com/12010
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
LU-4730 utils: lctl get_param, set_param cleanup

Cleanup "lctl get_param" and "lctl set_param" code and error handling.
Deny "parameters" with embedded relative paths to avoid strangeness.
Return an error consistently if multiple parameters are set but the
last one did not fail.  Remove deprecated full-path handling.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1004b5b4da4dc9b5825ef498758e248ed52f4141
Reviewed-on: http://review.whamcloud.com/9545
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Chao Wang <chao.ornl@gmail.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5848 lnet: fix inconsistent seq_no names

When YAML output is printed the literal "seqno" is used,
when it's parsed, the literal "seq_no" is expected.
This patch makes it consistent.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Iabf5394e858007c7f6e87c7baf892887da88f8e3
Reviewed-on: http://review.whamcloud.com/12562
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-5006 mdd: don't call attr_set on object create

The object attr has been initialzed in OSD layer when create
object, it's not necessary to initialize it again in MDD layer.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I6f4094d4384b2c153d4dad2666d64281c0450059
Reviewed-on: http://review.whamcloud.com/12243
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4217 build: Remove ACL mount options

The "acl" mount option on the client has been
depricated since Lustre 1.8. The "acl" mount
option code is now obsolete and is removed.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ib765476a71ebb732d9ffda60b336530e0a758943
Reviewed-on: http://review.whamcloud.com/12154
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5831 lfsck: extend lfsck_request::lr_pool_name

Fix some issues found during Lustre source static analysis:

1) Extend lfsck_request::lr_pool_name size to match the
   lmv_mds_md_v1::lmv_pool_name.
2) Check lfsck->li_obj_dir inside lfsck_close_dir() before using.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I84443089135c5de1b9fa89eb76e5cd623412a01f
Reviewed-on: http://review.whamcloud.com/12534
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
LU-5854 lnet: make YAML output/input consistent

The YAML format used for configuring and showing networks was not
consistent. This patch makes both formats consistent.

EX:
net:
    - net: tcp
      nid: 192.168.206.130@tcp
      status: up
      interfaces:
          0: eth0
      tunables:
          peer_timeout: 180
          peer_credits: 8
          peer_buffer_credits: 0
          credits: 256
      CPT: [0,1]

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id4314679930709ac43104f1ba544bb6d1ca8cb0a
Reviewed-on: http://review.whamcloud.com/12556
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5654 osp: Call obd_fid_fini() on osp_init0() error path

osp_init0() should call obd_fid_fini() on its error path to avoid
leaks.

Change-Id: I1a679db172ae60c74049d2dd3e111c93cfcbeda2
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/12037
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-181 ptlrpc: reorganize ptlrpc_request

ptlrpc_request has some structure members are only for client side,
and some others are only for server side, this patch moved these
members to different structure then putting into an union.

By doing this, size of ptlrpc_request is decreased about 300 bytes,
besides saving memory, it also can reduce memory footprint while
processing.

Another change in this patch is, osp will not use rq_exp_list anymore
because it is a server only member now.
osp will use ptlrpc_req_async_args to store commit_cb parameters in
this patch.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Id910ac225b8e9d33a0cae40b3124ce55f1a3fbc9
Reviewed-on: http://review.whamcloud.com/8806
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
LU-5865 lfsck: avoid NULL pointer

NOT pass "NULL" as the parameter of @lmv for lfsck_record_lmv(),
then the subsequent handling inside lfsck_record_lmv() needs NOT
to worry about the case of "lmv == NULL".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5f308818edd5ded2c4ccc7d59fb0908791b8aae3
Reviewed-on: http://review.whamcloud.com/12597
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5778 lod: Fix lod_qos_statfs_update()

When an OST is sick, or unactivate, lod cannot fetch its statfs
information. In lod_qos_statfs_update() this was preventing lod
to get information for other OST because refresh was stopped at
first error.
This patch fixes this behaviour.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Id0217f228381ef7a41fdbfd99f5499dcc97ace0e
Reviewed-on: http://review.whamcloud.com/12617
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>