LU-2513 osc: compute grant targets in bytes

In osc_shrink_grant() and osc_shrink_grant_to_target() convert page
unit target values to bytes before comparing to cl_avail_grant.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie8e6e8b4b3245efa3b14777608f3a48bbab7e4e2
Reviewed-on: http://review.whamcloud.com/5495
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2484 mgs: remove unused md_stats

Do not allocate md_stats or create /proc/.../MGS/md_stats for mgs
devices since they do not implement the md_ops interface.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8b417bc2433484a0e008ff9bf7fef69ba1e62416
Reviewed-on: http://review.whamcloud.com/4813
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1798 tests: don't set jobid if not changing

Don't set jobid_var conf_param if the value would not change.  This
avoids setting the same parameter in the config log multiple times,
and avoids the extra delay on each startup waiting for the conf_param
to propagate from the MGS to the client each time.

Fix the console error printing if the jobid_env does not exist.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I36ed60451a875bcd46fd0d6f3d7068d1b1398df5
Reviewed-on: http://review.whamcloud.com/3867
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1994 kernel: fix reference counting with l_dentry_open

Commit 78b1d1bd (LU-1994 kernel: 3.6 dentry_open uses struct path
as first arg) added support for the new dentry_open call that
accepts struct path instead of a dentry/vfsmount pair, but missed
the new reference counting rules that go along with it.

Upstream commit 765927b2 also makes dentry_open grab references itself
so it no longer frees references that weren't passed to it.

On failure, we'll end up with an extra reference to the dentry
that was passed in.

Since new dentry_open is the one that will be around for the
foreseeable future, let's just map to that directly for the path case.

For the other two cases, we'll take the references ourselves in
ll_dentry_open, free them on failure, and adjust callers to expect
that it won't free any references passed to it.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I05a95cf735a5b2d70273a485335d571fcda7a6b0
Reviewed-on: http://review.whamcloud.com/5330
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-812 ldiskfs: super_operations->dirty_inode now takes a flag

Currently this flag is unused by ext4, so just pass in 0.  This change
happened in kernel commit aa38572954ade525817fe88c54faebf85e5a61c0.
Apparently the flag is used to tell the difference between timestamp
updates and anything else.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I24536546256f5f043c1f53e15220b0c956be343f
Reviewed-on: http://review.whamcloud.com/4966
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1434 llog: remove unused llog_create_rec struct

Remove the unused llog_create_rec and llog_orphan_rec definitions
from wireshark.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I21c1215b627fb972d8da89a7ff1965848027cab0
Reviewed-on: http://review.whamcloud.com/2877
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2961 build: Fix commit-msg to love new files

It is annoying to receive errors like this when the changes being
committed include new files:

  $ git commit -asv --amend
  line 65: diff --git a/lustre/include/lustre_errno.h
  b/lustre/include/lustre_errno.h
  new file mode 100644
  error: commit message invalid signoff section line
  line 66: index 0000000..89b8d1b
  error: commit message invalid signoff section line
  line 67: --- /dev/null
  error: commit message invalid signoff section line
  ...

This patch adds the "new file mode" pattern to commit-msg.  Hopefully,
this is enough.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I39c985d51afb04184322a8fc725bcef3938bf419
Reviewed-on: http://review.whamcloud.com/5712
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2396 ofd: Remove unmaintained brw_stats

Remove unused nid_brw_stats member from struct nid_stat and the files
/proc/fs/lustre/obdfilter/*/{brw_stats,exports/*/brw_stats}.  If the
corresponding osd has a brw_stats proc entry then add a symlink from
the ofd proc dir.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I79a10816c612f67b80172d679b875ca94157b5f4
Reviewed-on: http://review.whamcloud.com/4689
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
LU-2675 cleanup: remove unused recov_thread.c and llog code

Remove recov_thread.c and the following exported functions:
  llog_cat_process_thread
  llog_obd_origin_add
  llog_catalog_list
  llog_receptor_accept
  llog_origin_connect
  llog_handle_connect
  llog_obd_repl_cancel
  llog_obd_repl_sync
  llog_obd_repl_connect
  llog_get_cat_list
  llog_put_cat_list
  llog_recov_thread_start
  llog_recov_thread_stop

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I620c641646294fcf697f1e2d4d1f389d71bb3ddd
Reviewed-on: http://review.whamcloud.com/5190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-2335 lnet: remove unnecessary libcfs include

libcfs_pack/unpack.h are only needed for WINNT.
Only include them when necessary.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibe6230d37534fd087c2afe6166d10259fd59c076
Reviewed-on: http://review.whamcloud.com/4647
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
LU-2929 build: fix unused/uninitilized virables error

As reported by gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2).

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I05aeb88dbd00b6b005ddde543a527339a9d66ce0
Reviewed-on: http://review.whamcloud.com/5656
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
LU-2743 llite: Fix a negative hpk_errval assignment

The hpk_errval field should store positve errnos.  This patch fixes a
place where errnos are assigned to hpk_errval as negative numbers.

Change-Id: I77b1f9e6a19a64aedcdcc5fe38b08babb810a472
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5729
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2743 mgs: Add a missing rc reset

Current mgs_write_log_target() does not reset rc when EALREADY is
found.  This may cause the positive errno to leak to upper layers and
eventually to wire.  This patch adds the missing rc reset.

Change-Id: I0ba8a0decdb9583224a5de02f630742ae94fff39
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5730
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2783 include: Fix a conditional indentation

Just an indentation fix to make the conditional expression in
fid_is_sane() easier to read.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I1112d7d43c29f032c79277c6434d4c02e96e49bd
Reviewed-on: http://review.whamcloud.com/5466
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2813 hsm: Add user credential information to copy tool RPC

Add MDT_BODY data to the RPC used for coytool, so the
coordinator can make some check based on the user

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ia45aacfdc78411f7c202bafb6bd6411f686606a6
Reviewed-on: http://review.whamcloud.com/5436
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2405 tests: account for inter-op testing sanity/17g

Account for where patch hasn't been applied and skip known broken
servers.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I1dd354c36c38e2569ce0cfaf57d4cd35a65117ff
Reviewed-on: http://review.whamcloud.com/5754
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2955 tests: make replay-ost-single/8b SLOW for ZFS

This test runs dd with osync, which is currently a VERY slow
operation, so mark it slow until LU-2887 is addressed.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I3f55278490bd3c2e3bce8a2de58828a3a716b2fe
Reviewed-on: http://review.whamcloud.com/5767
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2398 osc: ignore layout for osc_lru_shrink()

osc_lru_shrink() doesn't need to check verify layout change
because layout can't be destroyed if a page already exists.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I034c15cbecfaf1491d7d7fcb992b74e3d94d9fa5
Reviewed-on: http://review.whamcloud.com/4701
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
New tag 2.3.63

Change-Id: I02e9d699d3a7c5dc4253ad24dee0b10651cb4ba7
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>