LU-4768 tests: Update ost-survey script

Currently, ost-survey hangs due to calling
'lfs setstripe' in an old (positional) style and
setting max_cached_mb to zero.

The call to 'lfs setstripe' is updated to use the
'-S', '-i' and '-c' flags. max_cached_mb is now
set to pagesize * 256 (in MB). The patch also gets
parameters for the correct file system if more
than one Lustre file system is mounted, and
corrects a few typos in comments.

In ll_max_cached_mb_seq_write(), the number of
pages requested is set to the max of pages requested
or PTLRPC_MAX_BRW_PAGES to allow the client to make
well formed RPCs.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ib0adb0dc363a3b885d1566fda2ac3b9da013c238
Reviewed-on: http://review.whamcloud.com/11971
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5613 lustre: unused variable in tgt_brw_read()

Local variable niocount in tgt_brw_read() is assigned a value
but never used again, and thus can be removed.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Change-Id: Ide032596e6877a7bc6d3cbd6eaf3cfd7e582eb23
Reviewed-on: http://review.whamcloud.com/11888
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5003 llog: do not fix remote llogs

prevent llog_process_thread() from trying to fix
remote llog by a direct write to the header.

Xyratex-bug-id: MRP-2076
Change-Id: I4f8b758a38ce3f51c24fa7397ad5c4b341e27ed0
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-on: http://review.whamcloud.com/11955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4821 osd: cleanups in osd-zfs

many small changes to get rid of udmu wrappers.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ic8746345da1e6695149bacf066be10bf284aecdf
Reviewed-on: http://review.whamcloud.com/9721
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5666 llapi: LLAPI helpers for group lock.

Introduced llapi_group_{lock,unlock} functions to abstract the ioctl
implementation to manipulate group lock. Updated lfs accordingly.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I9c0c75029cd0d159e353a2c925cecc9b4ba9a6de
Reviewed-on: http://review.whamcloud.com/12053
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3703 tests: skip test for getfattr 2.4.44-6 or less

Non-SLES distros may also have an older version of getfattr,
so sanity.sh test_234 should also be skipped on those systems.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I012554dd840715d336d3286cc46c56f53d500c1e
Reviewed-on: http://review.whamcloud.com/10867
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4976 doc: comments to osp_sync.c

comments to the functions in osp/osp_sync.c

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ia261c8d4412f7cdfcb9938be132c53f5f5ba45cd
Reviewed-on: http://review.whamcloud.com/11150
Tested-by: Jenkins
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5458: libcfs: protect kkuc_groups from write access

Since reg->kr_fp can be changed inside the foreach loop,
kkuc_groups must be write protected, and not just read protected.

This should fix the following oops, which could happen if two different
threads simultaneously execute the function, and EPIPE is returned.

PID: 24385  TASK: ffff88012da5f500  CPU: 1   COMMAND: "ldlm_cb00_056"
 #0 [ffff88012db55810] machine_kexec at ffffffff81038f3b
 #1 [ffff88012db55870] crash_kexec at ffffffff810c59f2
 #2 [ffff88012db55940] oops_end at ffffffff8152b7f0
 #3 [ffff88012db55970] no_context at ffffffff8104a00b
 #4 [ffff88012db559c0] __bad_area_nosemaphore at ffffffff8104a295
 #5 [ffff88012db55a10] bad_area_nosemaphore at ffffffff8104a363
 #6 [ffff88012db55a20] __do_page_fault at ffffffff8104aabf
 #7 [ffff88012db55b40] do_page_fault at ffffffff8152d73e
 #8 [ffff88012db55b70] page_fault at ffffffff8152aaf5
    [exception RIP: fput+9]
    RIP: ffffffff8118a509  RSP: ffff88012db55c20  RFLAGS: 00010246
    RAX: 00000000ffffffe0  RBX: ffff8800a8ea4fc0  RCX: 0000000000000000
    RDX: ffffffffa03c9eb0  RSI: 0000000000000000  RDI: 0000000000000000
    RBP: ffff88012db55c20   R8: 00000000ffffff0a   R9: 00000000fffffffc
    R10: 0000000000000001  R11: 282064656c696166  R12: ffffffffa03c9c60
    R13: ffff88005df240f8  R14: 0000000000000000  R15: ffff88013b4ca000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #9 [ffff88012db55c28] libcfs_kkuc_group_put at ffffffffa0388044 [libcfs]
[ptlrpc]

Change-Id: Ifaa861c0778e745f262cba5ab5f5661a3ad4fa9f
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11355
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5432 fld: don't loop forever on bogus FID sequences

In fld_client_rpc() if the FLD query RPC returns -ENOENT then break
the retry loop and return -ENOENT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id70a5d8f6c2105509149e72e8910fcb6c51732f0
Reviewed-on: http://review.whamcloud.com/11605
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5587 lustre: require HAVE_SERVER_SUPPORT in md_object.h

Move the definition of struct seq_server_site from md_object.h to
lustre_fid.h. Uninclude md_object.h from files that don't need it. In
md_object.h generate a preprocessor error if HAVE_SERVER_SUPPORT is
not defined.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie3fd464ef4a71f09ccaffae409901cb48705301b
Reviewed-on: http://review.whamcloud.com/11756
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-991 lmv: remove dead code

The member lmv_obd->server_timeout and function lmv_set_timeouts()
are not used.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I61f8a59d72244ca41e76c277002bce3e2c850f0a
Reviewed-on: http://review.whamcloud.com/11880
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5557 mdt: track reint operations in MDS service stats

In mdt_reint_rec() tally the appropriate ptlrpc service stat
(MDS_REINT_{CREATE,SETATTR,...}) for the requested operation.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idda44baa5720b1b3d7d38402c9abe322f3645b7f
Reviewed-on: http://review.whamcloud.com/11924
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5659 hsm: add timestamps to lhsmtool log messages

Add epoch timestamps (secs.usecs) to the log messages emitted by
lhsmtool_posix. Change the single use of CT_DEBUG() to
CT_TRACE(). Remove the unused macro CT_PRINTF().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I227d00c97f93a09ac9322213d255102b8a3cf612
Reviewed-on: http://review.whamcloud.com/12042
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396 libcfs: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: I07a40b3e2f5bf179923c57d9eda86b4921cd7699
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11817
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396 lnet: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: Iff822b1e6036709e3bd660fe14d8faa58b308995
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11819
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4976 doc: comments to osp_precreate.c

comments to the functions in osp/osp_precreate.c

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I657661ea13f1e455f8a01b15f5262049e9764521
Reviewed-on: http://review.whamcloud.com/11152
Tested-by: Jenkins
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2675 libcfs: remove unused libcfs.a code

Remove unused code from libcfs.a. Delete the files:

  libcfs/libcfs/posix/posix-adler.c
  libcfs/libcfs/posix/posix-crc32.c
  libcfs/libcfs/posix/posix-debug.c
  libcfs/libcfs/posix/posix-proc.c
  libcfs/libcfs/posix/rbtree.c
  libcfs/libcfs/user-bitops.c
  libcfs/libcfs/user-crc32pclmul.c
  libcfs/libcfs/user-crypto.c
  libcfs/libcfs/user-lock.c
  libcfs/libcfs/user-mem.c
  libcfs/libcfs/user-prim.c
  libcfs/libcfs/user-tcpip.c

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic7b6539147fc66a3cefa0caddfc995474014e098
Reviewed-on: http://review.whamcloud.com/10668
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: Oleg Drokin <oleg.drokin@intel.com>
LU-5474 hsm: Add test 90 to ALWAYS_EXCEPT list

Disable sanity-hsm test 90 from executing with the
ALWAYS_EXCEPT parameter.

Test 90 should be enabled in the patch that fixes
the issues with test.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ia0ed9925a311f3e24510e62842de88cf9c824f7a
Reviewed-on: http://review.whamcloud.com/12136
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4974 doc: comments to lprocfs_lod.c

comments to the functions in lod/lprocfs_lod.c.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I8722347aae3262db187b4a6fc30d83d18fee2978
Reviewed-on: http://review.whamcloud.com/11159
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2675 lustre: remove linux/lustre_net.h

Remove the (mostly) empty header lustre/include/linux/lustre_net.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I6ad41b94cf21803ac2f6602c5befea511d02937a
Reviewed-on: http://review.whamcloud.com/11503
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>