Whamcloud - gitweb
fs/lustre-release.git
12 years agoLU-15 Strange slow IO messages and bad performance
yangsheng [Wed, 20 Apr 2011 10:05:51 +0000 (18:05 +0800)]
LU-15 Strange slow IO messages and bad performance

b=24183 slow I/O on new files via mballoc.

upstream patch to avoid loading bitmaps from full groups

Change-Id: I9b4de1b4b1942b0f084b6199d5ab3e1267c9e8e3
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/442
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-544 speed up filesystem formatting time in conf-sanity.sh
Yu Jian [Thu, 11 Aug 2011 10:34:27 +0000 (18:34 +0800)]
LU-544 speed up filesystem formatting time in conf-sanity.sh

Pass "-E lazy_itable_init" to mke2fs to speed up Lustre
filesystem formatting time in conf-sanity.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I29070e6c4b95028b12573d552a32ca04189c2c1d
Reviewed-on: http://review.whamcloud.com/1210
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-455 Replace DIST_SOURCES with EXTRA_DIST
Christopher J. Morrone [Fri, 22 Jul 2011 20:28:06 +0000 (13:28 -0700)]
LU-455 Replace DIST_SOURCES with EXTRA_DIST

Resolve autoconf-2.63 warnings mainly by replacing DIST_SOURCES
with EXTRA_DIST.  Additionally, the non-portable $(shell) contruct
was removed from tests/module.mk and the sources simply enumated.
Finally, the incorrect EXTRA_SOURCES instance was removed from
the top level autoMakefile.am.

  Running automake-1.11 -a -c -W no-portability
  libcfs/libcfs/autoMakefile.am:92:
          variable `DIST_SOURCES' is defined but no program or
  libcfs/libcfs/autoMakefile.am:92:
          library has `DIST' as canonical name (possible typo)
  lnet/klnds/mxlnd/autoMakefile.am:44:
          variable `DIST_SOURCES' is defined but no program or
  lnet/klnds/mxlnd/autoMakefile.am:44:
          library has `DIST' as canonical name (possible typo)
  ...

Also, as a result of the above changes, libcfs/libcfs/autoMakefile.am had to be
modified in order to allow 'make dist' to succeed.

As it turns out, libcfsutils_a_SOURCES was incorrect. That list contained
references to nonexistent 'util/[parser|platform].h' files. The assumption is
it intended to reference libcfs/include/libcfs/util/[parser|platform].h.

To fix the issue, both [parser|platform].h references were removed from the
list. This produces a simple solution that maintains consistency with the rest
of the build system. The caveat being that libcfsutil.a won't automatically be
rebuilt if either of the intended [parser|platform].h files are modified.

Change-Id: Ia81eb1e3fc219f6dac4c7da234f7e736754c5440
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1092
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Tested-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-550 incorrect quota hash function
Niu Yawei [Fri, 29 Jul 2011 04:00:09 +0000 (21:00 -0700)]
LU-550 incorrect quota hash function

Quota code uses 'uid' or '(1 << 32) + gid' as the hash key, however,
the quota hash function lqs_hash() always try to interpret such a
unsigned long long key as a 'quota_adjust_qunit' struct, then calculate
the hash value by quota_adjust_qunit->qaq_id.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I48dc7f276eb97f34b22097b4edc529d5f76acf37
Reviewed-on: http://review.whamcloud.com/1162
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-297 improve llverfs to display the current read/write performance
Yu Jian [Thu, 14 Jul 2011 03:07:34 +0000 (11:07 +0800)]
LU-297 improve llverfs to display the current read/write performance

This patch changes show_filename() to show_rate() in llverfs.c to
display the current read/write file name and performance, along with
an estimate of how long the whole read/write operation will continue.

The patch also changes "fast" to "partial" and fixes some typos in
the comments of llverdev.c and llverfs.c.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I94cb112ae9a38b1128e53021aa0c1f1e8e5411af
Reviewed-on: http://review.whamcloud.com/1110
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-560 Fixup intent status on ENOENT in mdt_intent_reint
John Hammond [Mon, 1 Aug 2011 15:28:48 +0000 (10:28 -0500)]
LU-560 Fixup intent status on ENOENT in mdt_intent_reint

Clear -ENOENT from rep->lock_policy_res2 for non existent files so
that clients may cache negative dentries if they hold
MDS_INODELOCK_UPDATE on the parent directory.

Change-Id: I238f1001782923a595f9f7ee1c094d53ab1422ae
Signed-off-by: John Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1173
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-574 Fix whitespace issues in conf-sanity.sh
Andreas Dilger [Tue, 9 Aug 2011 21:17:02 +0000 (15:17 -0600)]
LU-574 Fix whitespace issues in conf-sanity.sh

Move "run_one test_41b" to immediately follow declaration of test_41b.
Fix some whitespace problems (space before tab, space at end of line)
that I noticed while inspecting LU-574.

Change-Id: I18a80a55c9895cf8a6647a01ffa646f5ca499795
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1200
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-321 Don't assume file system name for some test
James Simmons [Fri, 13 May 2011 13:25:01 +0000 (09:25 -0400)]
LU-321 Don't assume file system name for some test

Some of the test assume the file system name is lustre
which is not always the case.

Change-Id: I582aa81fce5d1a881837dfa28bb0d6d84cfb5547
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/253
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-556: Fix config_log_find() in mgc_request.c
Jinshan Xiong [Sat, 30 Jul 2011 07:24:51 +0000 (00:24 -0700)]
LU-556: Fix config_log_find() in mgc_request.c

This issue was imported by lu-411. Actually after checking
the code, I found we can make things a bit simpler.

Change-Id: Iad212782a5f0357b73014baf7766c77637fb47db
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1168
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
12 years agoLU-292 srv_n_queued_reqs is screwed up by ptlrpc_unregister_service
Liang Zhen [Mon, 1 Aug 2011 13:07:58 +0000 (21:07 +0800)]
LU-292 srv_n_queued_reqs is screwed up by ptlrpc_unregister_service

service::srv_n_queued_reqs is counter for pre-unpack request on
service::srv_req_in_queue, we shouldn't change it for unpacked request
returned by ptlrpc_server_request_get()

Change-Id: I770411fa8f986fa387a1790f87e6a265abc469f1
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1172
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-553 add checkpatch.pl for Lustre coding style
Andreas Dilger [Fri, 29 Jul 2011 10:59:12 +0000 (04:59 -0600)]
LU-553 add checkpatch.pl for Lustre coding style

Add a modified version of the Linux kernel checkpatch.pl script (from 2.6.38)
to Lustre for validating patches against the Lustre coding style. The Lustre
coding style is largely the same as the kernel, except using spaces instead of
tabs for indenting.

Change-Id: I2d116c6769f9211825dc8ddaead05914f2116c60
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1164
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-559 Keep the o_seq unchanged for 1.8 client
Niu Yawei [Thu, 4 Aug 2011 06:31:10 +0000 (23:31 -0700)]
LU-559 Keep the o_seq unchanged for 1.8 client

ost_validate_obdo() arbitrarily change the o_seq to 0 for the requests
from 1.8 client, which will make the 1.8 echo client use the 0 group
mistakenly. In fact, I think we needn't do anything special for the 1.8
client here.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I93cd3bdbf984f8aef0f5b68f5ee8640f31ded337
Reviewed-on: http://review.whamcloud.com/1182
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
12 years agoLU-540 misc patch for user identity upcall/downcall
nasf [Tue, 2 Aug 2011 16:26:18 +0000 (00:26 +0800)]
LU-540 misc patch for user identity upcall/downcall

1) l_getidentity forgets to allocate supplementary group info space, but access
   such non-allocated memoey without checking.
2) In structure "identity_downcall_data", "idd_gid" is same as "idd_groups[0]",
   remove such redundant information.
3) More sanity check for lprocfs_wr_identity_info().
4) Drop unnecessary memory allocation to simplify mdt_identity_do_upcall().
5) Add padding field in "identity_downcall_data" to resolve align issues.
6) Use new magic to distinguish old version/format downcall.

Change-Id: Ib0dfb37c39a7cb335e29557b68b885afa726789e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1160
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-540 quota: add compatibility for 1.8 userspace
Andreas Dilger [Wed, 27 Jul 2011 08:30:19 +0000 (02:30 -0600)]
LU-540 quota: add compatibility for 1.8 userspace

The LL_IOC_QUOTACTL ioctl data structure if_quotactl changed size
in 2.x by adding new fields in the middle of the structure.  Add
compatibility for the old 1.8 quotactl userspace ioctl so that it
is possible for existing quotactl tools to run on both 1.x and 2.x.

This requires renumbering the LL_IOC_QUOTACTL ioctl, since it had
incorrectly used "struct if_quotactl *" as the "size" parameter,
but the _pointer_ size did not change.  ioctl() values should always
take a struct as the size parameter, not a pointer to the struct,
so that issues like this can be caught earlier.

Change-Id: I0bce98327a276c0c9a49ce78efd3f45e00df7168
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1152
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-533 Include posix-types.h in headers and distribution
Christopher J. Morrone [Mon, 8 Aug 2011 12:30:44 +0000 (08:30 -0400)]
LU-533 Include posix-types.h in headers and distribution

Include libcfs/posix/posix-types.h in the main rpm, and
add #include statements in lustre_user.h and ll_fiemap.h.
This will allow user-space applications that include these
files to compile.

Change-Id: Ibe391bf28afe91b3914ca1eb07fe66e408b21b4a
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1138
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-429 Fix and quiet debug message in filter_connect
yangsheng [Fri, 5 Aug 2011 09:54:40 +0000 (17:54 +0800)]
LU-429 Fix and quiet debug message in filter_connect

The comment refers to mds_connect(), which no longer exits.  So I
just removed the comment.

The message says "Received MDS connection", but this function is
used when clients connect to OSTs as well.  We don't need to see
this message on the console all of the time, so I changed it to
D_INFO.

Change-Id: Iebfbaafe39df702862ade126b979528855173d5c
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/963
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-350 fix bug in mgs to allow starting OST before MDT
hongchao.zhang [Thu, 28 Jul 2011 05:43:59 +0000 (13:43 +0800)]
LU-350 fix bug in mgs to allow starting OST before MDT

in mgs_steal_llog_for_mdt_from_client, it forgets to add the "index" and
"svname" of the existing OST to the config log of the MDT's lov, then cause
Lustre fails to mount if the OSTs start before MDT.

Change-Id: I0e68bf51c88517dbd42790e7e4447a186cf268f3
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/595
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-333: Make read_bytes in llite/*/stats report bytes read.
John Hammond [Thu, 14 Jul 2011 00:48:40 +0000 (19:48 -0500)]
LU-333: Make read_bytes in llite/*/stats report bytes read.

Move ll_stats_ops_tally(..., LPROC_LL_{READ,WRITE}_BYTES, ...) from
vvp_io_init() to the end of ll_file_io_generic(), and tally by the
actual number of bytes read rather than the number requested.

Test 127b, client stats are correctly tallied with this patch.

Change-Id: Icad0bc09630b8c1775f2ec59326902aa88215498
Signed-off-by: John Hammond <jhammond@tacc.utexas.edu>
Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1094
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-487 brw_[read|write] stats to correctly counts number of pages.
Richard Henwood [Wed, 6 Jul 2011 20:21:01 +0000 (16:21 -0400)]
LU-487 brw_[read|write] stats to correctly counts number of pages.

brw_[read|write] now correctly counts the number of pages. Before
this change, the number of pages multiplied by the page size was
counted.

Change-Id: I069c18cf46c67285de1ae2afc48f7fb4ab92df3c
Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1056
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-530 group quotas not enforced
Niu Yawei [Thu, 28 Jul 2011 10:47:46 +0000 (03:47 -0700)]
LU-530 group quotas not enforced

In filter_quota_getflag(), we shouldn't break the loop when the file's owner
doesn't have quota limit, otherwise, the check for file's group will be skipped
and the out of quota flag will not be returned to client at the end.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I3e92ba4c061409d5a911d46916535c71f7843e0b
Reviewed-on: http://review.whamcloud.com/1156
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
12 years agoLU-541 Fix liblustreapi.c usage of errno and rc.
Bobi Jam [Thu, 28 Jul 2011 10:11:54 +0000 (18:11 +0800)]
LU-541 Fix liblustreapi.c usage of errno and rc.

* fix liblustreapi.c usage of errno and rc, llapi_xxx() functions should
  return negative value on error.
* enable sanity subtest 65.

Change-Id: I30d172c49b60f6f77ea57c3082d0c68f4c141dea
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1155
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-540 remove file flags definition conflict between 1.8 and 2.x
nasf [Sun, 31 Jul 2011 16:26:46 +0000 (00:26 +0800)]
LU-540 remove file flags definition conflict between 1.8 and 2.x

There is file flags definition conflict between 1.8 "LL_FILE_LOCKED_DIRECTIO"
and 2.x "LL_FILE_RMTACL". Redefine the later one to erase such conflict.

Change-Id: I1f4b96382f865f8548bf1a54fb1c74d3649b0daf
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1159
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
12 years agoLU-451 Workaround for lockd (nfsv3) locking
Oleg Drokin [Tue, 2 Aug 2011 03:08:19 +0000 (23:08 -0400)]
LU-451 Workaround for lockd (nfsv3) locking

It seems that lockd works in a different way lock-wise compared
to everybody else. They actually don't use lock owner to determine
conflicts and install their own owner compare that compares specially
crafted pids (duh!).
As a workaround if a custom owner compare is detected, assign pid to
owner field (not intersecting with kernel pointer space anyway).
svclock is the only place using custom owner compare function ATM.

Change-Id: Ia89e2327705f2afbe200fdbadd0f86038fda936d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1174
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
12 years agoLU-290 Reconnects are not throttled
Lai Siyao [Wed, 15 Jun 2011 02:52:55 +0000 (19:52 -0700)]
LU-290 Reconnects are not throttled

bz22423
Client should not try to reconnect to the same nid in a busy loop,
but instead rely on pinger to issue reconnect.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I878093030d62173071192ca816e037464cc9248d
Reviewed-on: http://review.whamcloud.com/944
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-407 Fix lustre-modules rpm name in spec file.
Christopher J. Morrone [Thu, 9 Jun 2011 20:14:11 +0000 (13:14 -0700)]
LU-407 Fix lustre-modules rpm name in spec file.

RHEL and Fedora kernels include ".%{_arch}" in the kernel's version
string.  Since Lustre includes the kernel version in its rpms, it
can appear that a double architecture name appears at the end.  Really
one is from the kernel, and one is from Lustre.  Trying to change that
is probably more trouble than it is worth.

This seems to cause problems with rpm's understanding of rpm names.  To
fix that this patch takes Andreas's suggestion of grep'ing the full
rpm name from "rpm -q kernel-modules".

We also add "|| true" to the last line of the %preun scriptlet so that
failure does not aport installation.

Finally, we also remove the redundant greps in the postun scriptlet.

Change-Id: I2c71e853e28ec6e0907eb4ea7c3205ca6e5dd873
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/934
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
12 years agoLU-327 cleanup the client import of mgc
hongchao.zhang [Thu, 28 Jul 2011 07:46:47 +0000 (15:46 +0800)]
LU-327 cleanup the client import of mgc

the client import will not have been cleaned if it is setup but never
connected, adding such cleanup code in mgc_precleanup.

define a new inline function "obd_cleanup_client_import" in "obd_class.h"
to be used by mgc, mdc and osc.

Change-Id: If033de3fe81b9a565a7af40a7b93e395fb0bd659
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/917
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-409 Oops: RIP: _spin_lock_irq+0x15/0x40
yangsheng [Wed, 27 Jul 2011 08:01:10 +0000 (16:01 +0800)]
LU-409 Oops: RIP: _spin_lock_irq+0x15/0x40

Skip sanity test_68a since llite_loop module disabled in rhel6.

Change-Id: I213b435e64ac3816f1a3d564522a8c8797fc387c
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1150
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-539 obd_data_connect server side could be corrupted
Bobi Jam [Tue, 26 Jul 2011 17:36:18 +0000 (01:36 +0800)]
LU-539 obd_data_connect server side could be corrupted

In target_handle_connect(), we use assignment to copy client's connect
data to its server counterpart, and we define the pointers pointing to
a big buffer (struct obd_connect_data), while server's reply connect
data could be a smaller buffer (struct obd_connect_data_v1), the
assignment could corrupt the request's obd_connect_data reply buffer.

Change-Id: Ib72776d3dee8a2a836fda5b29ab49c3bbc026cab
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1144
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-207 adding stats for some operations in MDT
hongchao.zhang [Fri, 29 Jul 2011 03:33:13 +0000 (11:33 +0800)]
LU-207 adding stats for some operations in MDT

Adding stats for getattr, setattr, statfs and sync in MDT

Change-Id: I4790bb2eb6bc756a24942224506c7306429243bc
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/427
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-527 Update RHEL6 kernel to 2.6.32-131.6.1 security update
yangsheng [Fri, 22 Jul 2011 18:50:33 +0000 (02:50 +0800)]
LU-527  Update RHEL6 kernel to 2.6.32-131.6.1 security update

Change-Id: I5a84a5240ed8e4d119ae3094beb575666c69f7c6
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1135
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-540 lloop: fix LLOOP_INFO to return FID
Andreas Dilger [Wed, 27 Jul 2011 05:25:18 +0000 (23:25 -0600)]
LU-540 lloop: fix LLOOP_INFO to return FID

Instead of returning an inode number to userspace for the LLOOP_INFO
ioctl, instead return a FID value.

This does not pose compatibility problems, because the ioctl() number
was already different between Lustre 1.x and 2.x, and the lctl needed
for using lloop devices is always built with the kernel modules.

Change-Id: Ia3ee6dab830ad65e2a11d9248982c82ce76221f1
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1149
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-540 quota: move quota ioctl handling to helper
Andreas Dilger [Wed, 27 Jul 2011 07:54:20 +0000 (01:54 -0600)]
LU-540 quota: move quota ioctl handling to helper

The ll_dir_ioctl()::OBD_IOC_QUOTACTL handling is very large, and
is moved to a helper routine quotactl_ioctl() instead of being inline.
This will also facilitate the compatibility handling for the 1.x
QUOTACTL ioctl handling, by being able to share quotactl_ioctl() code.

Also, check for LL_IOC_QUOTACTL in ll_dir_ioctl(), since this is the
ioctl() number exported to userspace, and it also facilitates being
able to find the kernel-side ioctl handler for llapi_quotactl().

Add comments to show the duplicate user/kernel ioctl definitions.
Keep these separate for now, to allow the kernel/userspace values
to be defined differently for compatibility reasons.

There should be no functional differences with this change.

Change-Id: Iecfaf20ddbd78d77a546e1ba5a60b281732a85d9
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1151
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-20 remove unnecessary DMU export patch
Andreas Dilger [Wed, 13 Jul 2011 03:41:39 +0000 (21:41 -0600)]
LU-20 remove unnecessary DMU export patch

The patch for kernel symbol export for DMU back-ends was added to
facilitate upgrading servers.  However, the upstream ZFS code will
no longer be working on RHEL5 kernels, so this patch is not needed.

Change-Id: Icf443a366fd51c06cb5d02df27b7e70f476fcb63
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1086
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-228 kernel: remove more unused kernel patches
Andreas Dilger [Fri, 17 Jun 2011 20:01:44 +0000 (14:01 -0600)]
LU-228 kernel: remove more unused kernel patches

The filterdata patches have been unused and unnecessary for some
time already.  The jbd-slab-race and include-fixes patches were
merged into the upstream kernel and back-ported into RHEL5.

Change-Id: I01851a60ecf453f6eb5dbfc4f573444f4f220861
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-73 kernel: remove wrong jbd2 commit timer patch
Andreas Dilger [Fri, 17 Jun 2011 18:36:23 +0000 (12:36 -0600)]
LU-73 kernel: remove wrong jbd2 commit timer patch

The bug that this patch was originally fixing (incorrectly rounding
down the jiffies timer, which might cause it to be skipped) was
fixed in the upstream kernel by using round_jiffies_up(), which
always moves the timer into the future.

Remove this patch entirely, since it is no longer needed.

Change-Id: I3b4f30e0565cf64b95fc87babf1f54a9ab190754
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-528 Update RHEL5 kernel to 2.6.18-238.19.1 security update
yangsheng [Fri, 22 Jul 2011 18:47:43 +0000 (02:47 +0800)]
LU-528  Update RHEL5 kernel to 2.6.18-238.19.1 security update

Change-Id: I13974999954ae1806c48f75fa6d35f4e98cf2a75
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1134
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-278 build: Only warn for tag/version mismatch
Andreas Dilger [Thu, 14 Jul 2011 19:07:29 +0000 (13:07 -0600)]
LU-278 build: Only warn for tag/version mismatch

The configure process should NOT abort just because the most
recent tag is not of the form that upstream uses to tag Lustre.
Downstream developers may use their own tags, or just add
extensions to upsteam's version tags.

Change-Id: I9a98bfd4475d3df2694f536ba0352779a62650c7
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/510
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-411 Kernel panic when running conf-sanity on RHEL5/i686
yangsheng [Tue, 14 Jun 2011 20:12:06 +0000 (04:12 +0800)]
LU-411 Kernel panic when running conf-sanity on RHEL5/i686

Reduce stack usage to avoid stack overflow on
RHEL5/i686 patchless client.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I54d3a19734ab089f44f43943b80a2e7ad1f3335f
Reviewed-on: http://review.whamcloud.com/950
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-372 add $TMP/mgsactive to indicate the active combined MGS/MDS node
Yu Jian [Wed, 8 Jun 2011 13:23:32 +0000 (21:23 +0800)]
LU-372 add $TMP/mgsactive to indicate the active combined MGS/MDS node

The current test-framework could not figure out the active MGS node
correctly while the MGS and MDS nodes are combined under a failover
configuration. We need add a $TMP/mgsactive file to indicate the
active MGS node like what we did for the MDS node.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I74bbf9293f9a290573c4b9fcbf9fea0fcc0aad95
Reviewed-on: http://review.whamcloud.com/913
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-221 don't use a/c/m time for newly allocated object in OST
hongchao.zhang [Sat, 16 Jul 2011 22:16:55 +0000 (06:16 +0800)]
LU-221 don't use a/c/m time for newly allocated object in OST

in OST, the a/c/m time is unusable for newly allocated object for
it has not gotten valid time info from clients. by setting the a/c/m
time as LONG_MIN at creation will make the clients ignore the time.

Change-Id: I0d6094e4257626ffd1128b3540837deaf230e056
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1084
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-394: LND failure casued by discontiguous KIOV
Jinshan Xiong [Tue, 26 Jul 2011 23:42:34 +0000 (16:42 -0700)]
LU-394: LND failure casued by discontiguous KIOV

Fix the problem of assigning starting_offset twice. This is imported
in combining patchset of lu-394 and lu-523.

Change-Id: Ia4ea205f211c70965101507906b02799a65694be
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1146
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-502 don't allow to kill service threads by OOM killer.
Alexey Lyashkov [Wed, 13 Jul 2011 03:16:12 +0000 (07:16 +0400)]
LU-502 don't allow to kill service threads by OOM killer.

OOM can produce a many issues like requests processing counter.

Change-Id: I8d417d148b589ea6de84c5d16bc2607a59852564
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1088
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoNew version 2.0.66 2.0.66.0 v2_0_66_0
Oleg Drokin [Tue, 26 Jul 2011 15:50:15 +0000 (11:50 -0400)]
New version 2.0.66

Change-Id: Ic2aa5252ec569efefd00255440c5465cae633e1c
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-394: LND failure casued by discontiguous KIOV
Jinshan Xiong [Tue, 12 Jul 2011 17:55:19 +0000 (10:55 -0700)]
LU-394: LND failure casued by discontiguous KIOV

This issue was imported by bug 18881 where I moved the urgent
pages to front of lop_pending to fix a deadlock issue.
I reverted bug 18881 in this patch and came up with a new solution:
cl_page_gang_lookup() only blocks on the first page. This is also
for deadlock avoid since we should never grab multiple pages' lock
without try method.

Change-Id: I5dce35e3929e4f79a350e56ddc9e752269db060e
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/911

12 years agoLU-523: No prepare_write for lockless IO
Jinshan Xiong [Sat, 23 Jul 2011 03:52:46 +0000 (20:52 -0700)]
LU-523: No prepare_write for lockless IO

For page unaligned write, CLIO does prepare_write even for lockless IO
and then write full page back, this will cause data corruption since
data is not covered by lock.

In this patch, we don't do prepare_write for lockless IO, and then submit
exact bytes in the page to OST.

Change-Id: I4aa5afeb82cb717de499c8a8c004078b279302c7
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1130
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-456 Force commit to reuse the just-deleted blocks
Niu Yawei [Mon, 27 Jun 2011 10:55:10 +0000 (03:55 -0700)]
LU-456 Force commit to reuse the just-deleted blocks

In ext4 non-writeback journal mode, the just-deleted blocks are not
useable until the transaction committed, this could cause filter
return -ENOSPC mistakenly when the just-deleted blocks are not committed.

Whenever block allocation fails for -ENOSPC on filter, we should wait
for the previous deleted blocks committed, then retry the allocation.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I678b05ae9aa1b9e9d0aa29f48279bc7daedebbb2
Reviewed-on: http://review.whamcloud.com/1022
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-507 check_write_rcs() return -EPROTO instead of -ENOSPC
Johann Lombardi [Tue, 19 Jul 2011 12:15:58 +0000 (14:15 +0200)]
LU-507 check_write_rcs() return -EPROTO instead of -ENOSPC

remote_rcs[i] is an unsigned value so the check remote_rcs[i] < 0 is
always false.

Change-Id: I5468d9185e4c8de819f58693375e9d96722b9fbb
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1115
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-476 Run run-llog.sh on MGS in sanity 60a
Li Wei [Tue, 5 Jul 2011 08:44:36 +0000 (16:44 +0800)]
LU-476 Run run-llog.sh on MGS in sanity 60a

sanity 60a had been effectively skipped during lab testing, in which the
MGS is not running on the host where sanity.sh is executed.  This patch
fixes the subtest by requesting run-llog.sh to be run on the MGS
explicitly.

Change-Id: I9dc47d856cd42bfe0cd5b5b71e3fd7d4f7c0e561
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1050
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-16 Allow objects larger than 2TB in size
Bobi Jam [Tue, 22 Mar 2011 04:41:17 +0000 (12:41 +0800)]
LU-16 Allow objects larger than 2TB in size

Use OST superblock sb->s_maxbytes telling LOV the maxmimum object size
it supports, and LOV records the minimum of the per-OSC maxbytes values
to determine the lov_stripe_md.lsm_maxbytes.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ice920dc59f5cc5855393bb7031fa089757b3314d
Bugzilla: 20128
Reviewed-on: http://review.whamcloud.com/241
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-477 allocate memory for s_group_desc and s_group_info by vmalloc()
Yu Jian [Thu, 14 Jul 2011 06:32:14 +0000 (14:32 +0800)]
LU-477 allocate memory for s_group_desc and s_group_info by vmalloc()

Add the patch to the RHEL6 ldiskfs patch series.

Large kmalloc() for sbi->s_group_desc and sbi->s_group_info can fail
for large filesystems, which will cause the "not enough memory" error
while mounting. This patch makes it fall back to vmalloc() if the
kmalloc() failed, as what was done for sbi->s_flex_groups.

To avoid colliding with an valid on-disk inode number, EXT4_BAD_INO
is used as the number of the buddy cache inode.

The patch also incorporates the following upstream kernel fix:

commit 32a9bb57d7c1fd04ae0f72b8f671501f000a0e9f
ext4: fix missing iput of root inode for some mount error paths
https://bugzilla.kernel.org/show_bug.cgi?id=26752

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia263c90759e96710702e4afff3ba19e77455386f
Reviewed-on: http://review.whamcloud.com/1095
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-121 Fixup yaml.sh and test-framework.sh so that it only ever uses the first
Chris [Thu, 10 Mar 2011 11:05:37 +0000 (11:05 +0000)]
LU-121 Fixup yaml.sh and test-framework.sh so that it only ever uses the first
part of the host name for log files.
This means stripping of everything off the name after and including the first .

This change is only designed to make the .yml files consistent. The log files
will append the fully qualified name and appear to do this consitantly.

We can create a jira to make the log and yml files consistant, but the reality
is that the yml files have a short life and are only used to send to Maloo.

This change will allow automated posting of results and automated testing to
begin.

1. Carries out the above using hostname -s [Thanks Andreas]
2. Adds in a quick change so that LUSTRE_BUILD in yaml.sh can be a reference to
the source rather than just the lustre version string which is recorded and
written to the yaml anyway as LUSTER_VERSION

Additionally a couple of other changes sneaked in.

1. Allows the review information to be applied to the yaml output file
by way of exporting the variable CODE_REVIEW_YAML to be a yaml description
for maloo

2. The addition of a couple of fixes to make the permissions for yaml
files be allow-all. This permissions are bracketed and so do not change any
other parts of the code.

Change-Id: Ied9a2117cd1b68e048bbc2bf1bffe782485c6150
Signed-off-by: Chris Gearing <chris@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/312
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
12 years agoLU-484 Don't do error cleanup in ext4_add_dot_dotdot()
Niu Yawei [Mon, 11 Jul 2011 06:50:15 +0000 (23:50 -0700)]
LU-484 Don't do error cleanup in ext4_add_dot_dotdot()

The ext4_add_dot_dotdot() will do cleanup work (zeroing i_nlink, iput)
when ext4_bread() fails, that will mess up the i_nlink and i_count if
the ext4_add_dot_dotdot() is called from lustre.

The error cleanup work should be moved from ext4_add_dot_dotdot() to
it's caller: ext4_mkdir().

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I8e8a328c26bf5d603ca26c94a5a04cf8bd1c7b4f
Reviewed-on: http://review.whamcloud.com/1079
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-85 build: update main bug report URL
Andreas Dilger [Sun, 19 Jun 2011 06:39:16 +0000 (00:39 -0600)]
LU-85 build: update main bug report URL

Update bug reporting URL in autoconf and other documentation
to reflect source of release.

Change-Id: I7a4017bd55e9e3f8de6adca0e9a030c94f0db9ec
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/971
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-464 obdfilter-survey test 2a ASSERT(imp->imp_sec == NULL)
Lai Siyao [Wed, 13 Jul 2011 08:00:40 +0000 (16:00 +0800)]
LU-464 obdfilter-survey test 2a ASSERT(imp->imp_sec == NULL)

There is a race in echo client:
1. `lctl --device $echo_client_dev detach`
     -> class_detach() puts last refcount of export
       -> obd_zombie_add_export() adds this export in zombie list, and
            wake up zombie thread.
2. zombie thread culls this export:
     class_destroy_export() put last refcount of echo_client_dev
       -> obd_cleanup()
         -> echo_device_free()
           -> echo_client_cleanup()
             -> osc_disconnect()
               -> client_disconnect_export() will clear cli->cl_import
3. `lctl --device $osc_dev cleanup`
     -> osc_precleanup() find scli->cl_import is not NULL (this means
          import is never connected, but it's not true here)
       -> class_destroy_import()
         -> class_import_put()
           -> LASSERT(imp->imp_sec == NULL) fails

It's expected that step 2 is done before step 3, but this can't be
guaranteed currently. To ensure this, osc_precleanup() calls
obd_zombie_barrier() to ensure step 2 is finished.

Change-Id: I2d044c3ac45a72d305a369a1f31c315f36a7ce02
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1093
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-387 Minor fix for mmp.sh test_9
Niu Yawei [Wed, 22 Jun 2011 02:18:26 +0000 (19:18 -0700)]
LU-387 Minor fix for mmp.sh test_9

Remove the redundant "kill -9 $debugfspid" in test_9

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I72d64f28212bb9706ca3249bac2c39a329a13f5a
Reviewed-on: http://review.whamcloud.com/992
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
12 years agoLU-470 remove 24-bits mask for logic block number of IAM dir
Liang Zhen [Tue, 28 Jun 2011 04:17:35 +0000 (12:17 +0800)]
LU-470 remove 24-bits mask for logic block number of IAM dir

dx_get_block() will mask logic block number to 24-bits, which means we
can only have 16-M blocks and a few giga FIDs, this is not enough
because we have one single IAM container to save all (fids, ino) for MDT

Change-Id: I188efc65ed68caf12149f03c431481cd603effc1
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1024
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
12 years agoLU-5 readdir read multiple pages per rpc
Lai Siyao [Thu, 26 May 2011 13:44:47 +0000 (06:44 -0700)]
LU-5 readdir read multiple pages per rpc

add support for readdir to read multiple pages per rpc:
* because client has no idea how many directory pages it can read, it
  tries to read maximum pages each time, but will only store pages
  read from mds into page cache.
* add a flag LDF_COLLIDE to mark a dir page hash collides with the
  next page, and client will remove this page from page cache after
  processing.
* upon readpage bulk io failure, client won't be evicted, and client
  will resend the bulk request.
* support large page size on client: MDS_READPAGE RPC will fill reply
  with page size LU_PAGE_SIZE(4k), and if client page is bigger than
  LU_PAGE_SIZE, several pages will be integrated into one dir page with
  CFS_PAGE_SIZE.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Id6bc36fbcec79993d49bbe9a535851e5e3ebd876
Reviewed-on: http://review.whamcloud.com/604
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
12 years agoLU-498 pass oap instead of cookie to osc_teardown_async_page/osc_queue_async_io
Johann Lombardi [Tue, 5 Jul 2011 18:29:35 +0000 (20:29 +0200)]
LU-498 pass oap instead of cookie to osc_teardown_async_page/osc_queue_async_io

Now that queue_async_io & teardown_async_page are not obd operations any
more, we don't need to use a cookie and can just pass the correct type.

Change-Id: Iaf2ddf48bfee5c386064bb30e5392345c074c827
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1081
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-471 fix mkfs.lustre to avoid creating duplicate options
Bobi Jam [Wed, 29 Jun 2011 08:31:27 +0000 (16:31 +0800)]
LU-471 fix mkfs.lustre to avoid creating duplicate options

Also make user specified options overwrite default internal default
options.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic946b4bc93b2941bd05761a6783f01cf94fb1431
Reviewed-on: http://review.whamcloud.com/1035
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-426 Server failover never finishes
Bobi Jam [Tue, 21 Jun 2011 04:34:55 +0000 (12:34 +0800)]
LU-426 Server failover never finishes

Make sure obd_zomebie_impexp_thread get zombie add notification.
It is possible this signal is only get by obd_zombie_barrier, and
barrier gulps this notification and sleeps away and hangs ensues.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic4a7b9de19aa5e6a9aaa8fb54e7083629b88119b
Reviewed-on: http://review.whamcloud.com/986
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-369 assert(t_watchdog) failed in quota_chk_acq_common()
Niu Yawei [Mon, 30 May 2011 06:30:06 +0000 (23:30 -0700)]
LU-369 assert(t_watchdog) failed in quota_chk_acq_common()

Remove the incorrect assert(t_watchdog) in quota_chk_acq_common()
and schedule_dqacq(), since they might be called from recovery
thread, which doesn't have t_watchdog attached.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I22e65c66827811309e43910e9a4d34251aad99c3
Reviewed-on: http://review.whamcloud.com/870
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-113: make lustre_{idl,user}.h nice to userspace
Andreas Dilger [Mon, 16 May 2011 06:07:54 +0000 (00:07 -0600)]
LU-113: make lustre_{idl,user}.h nice to userspace

Remove uses of LASSERT() inside lustre_user.h, since it should be
directly usable by userspace (e.g. lfsck).

Don't include <libcfs/libcfs.h> into lustre_idl.h if the needed
helper macros are already availables, so that lustre_idl.h can
be more userspace friendly.

Change-Id: I4da00758ec8625f3040f5dc0d78c423a9f59793d
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/909
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-196 set debug_mb size for every node
Yu Jian [Tue, 24 May 2011 08:51:03 +0000 (16:51 +0800)]
LU-196 set debug_mb size for every node

commit 01e1bdcec4af985791b40e1fbfaa77a2d5427fce
Date: Mon Feb 14 20:25:35 2011 +0300

b=19944 adjust debug size to be -gt num_possible_cpus()

a=Landen <zhiyong.tian@oracle.com>
i=Elena.Gryaznova

Change-Id: Idc8c3d2db243c5ddd0ba95ef1be4680c4af9c411
Signed-off-by: YangSheng <ys@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/407
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-346 "kill -s SIGTERM" does not work on some system
Bobi Jam [Sat, 9 Jul 2011 04:59:54 +0000 (12:59 +0800)]
LU-346 "kill -s SIGTERM" does not work on some system

Change it to "kill -s TERM".

Change-Id: Ib5f5a3042d082a5b82018078b17ca82a269b4592
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1076
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-481 Don't store 'transient' page in radix tree
Niu Yawei [Fri, 8 Jul 2011 06:44:00 +0000 (23:44 -0700)]
LU-481 Don't store 'transient' page in radix tree

- We currently store both 'transient' page and inode page in the
  same radix tree, which will cause trouble for the race handling
  of concurrent dio and buffered read, imagine the following case:

  dio created a 'transient' page for a given file offset in the
  radix tree, while a concurrent buffered read on the same offset
  happened, the reader will try to find the exsting cached page by
  searching the radix tree, however, the 'transient' page is found,
  and the read will fail for -EBUSY at the end.

  To make the situation worse, there are two level of radix trees for
  a give file page (object and sub-object), above race can happen
  in both levels and we have to make sure page type consistence
  between these two levels.

  Actually, it doesn't make sense to store these disposable 'transient'
  page in the radix tree, so we just remove them in this patch.

- In cl_page_alloc(), if the coo_page_init() fails, we should call
  cl_page_delete0() to break the linkage between vmpage and cl_page
  before calling cl_page_free().

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: If2fa85495e6e78b330571b3348ac55a7796a4a9f
Reviewed-on: http://review.whamcloud.com/1072
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoNew version 2.0.65 2.0.65.0 v2_0_65_0
Oleg Drokin [Fri, 8 Jul 2011 21:30:01 +0000 (17:30 -0400)]
New version 2.0.65

Change-Id: Iab44e6d976cf13d12d525d16c8aeaf2c4bc2d423
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-469 Build with lustre own kernel config file.
yangsheng [Tue, 28 Jun 2011 19:39:47 +0000 (03:39 +0800)]
LU-469 Build with lustre own kernel config file.

-- Use lustre own rhel6 kernel config files in lbuild.
-- Rebase config files in latest vendor update.
-- Correct config file diff output.

Change-Id: I9ee5115009de5bcb00084dcac2e204774178a8c1
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1034
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-479 sanity 124a failed
Lai Siyao [Tue, 5 Jul 2011 16:13:39 +0000 (09:13 -0700)]
LU-479 sanity 124a failed

add message to help debug.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I4e675ed3eeb509c9ba4f1c25420596c0d5357459
Reviewed-on: http://review.whamcloud.com/1052
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-136 change "force_over_16tb" mount option to "force_over_128tb"
Yu Jian [Fri, 8 Jul 2011 08:11:18 +0000 (16:11 +0800)]
LU-136 change "force_over_16tb" mount option to "force_over_128tb"

Change the "force_over_16tb" mount option to "force_over_128tb" and
rename the ext4-force_over_16tb-*.patch to ext4-force_over_128tb-*.patch
after testing and validating the 128TB LUN.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I19c73280cf2934112aefab8976d7eac18915529a
Reviewed-on: http://review.whamcloud.com/1073
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-477 allocate memory for s_group_desc and s_group_info by vmalloc()
Yu Jian [Thu, 7 Jul 2011 12:55:51 +0000 (20:55 +0800)]
LU-477 allocate memory for s_group_desc and s_group_info by vmalloc()

Large kmalloc() for sbi->s_group_desc and sbi->s_group_info can fail
for large filesystems, which will cause the "not enough memory" error
while mounting. This patch makes it fall back to vmalloc() if the
kmalloc() failed, as what was done for sbi->s_flex_groups.

To avoid colliding with an valid on-disk inode number, EXT4_BAD_INO
is used as the number of the buddy cache inode.

The patch also incorporates the following upstream kernel fix:

commit 32a9bb57d7c1fd04ae0f72b8f671501f000a0e9f
ext4: fix missing iput of root inode for some mount error paths
https://bugzilla.kernel.org/show_bug.cgi?id=26752

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I3950425835ea7f2968ceb2edbc622e3ff3ed8545
Reviewed-on: http://review.whamcloud.com/1071
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-168 Fix schedule race in sanityn PDO lock tests
nasf [Fri, 8 Jul 2011 16:20:56 +0000 (00:20 +0800)]
LU-168 Fix schedule race in sanityn PDO lock tests

In sanityn PDO lock tests, even if the second operation is blocked by
the first one on server-side, after the blocking, the second one may
be finished earlier than the first one because of client-side schedule
order. So sleep a sec before check_pdo_conflict() to ensure the first
operation is finished after OBD_FAIL_MDS_PDO_LOCK barriers.

Change-Id: I62412d74e17be012ee6660179ad77375c196671d
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1030
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-492 fix sanity-quota test_29
Bobi Jam [Thu, 7 Jul 2011 06:32:45 +0000 (14:32 +0800)]
LU-492 fix sanity-quota test_29

* Send a RPC to MDS to confine at_current time of MDS service time
* Sleep enough seconds

Change-Id: I09ed7aa5a2103ef3a3a03c72d5c09e6769bf9248
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1069
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoNew tag 2.0.64 2.0.64.0 v2_0_64_0
Oleg Drokin [Thu, 7 Jul 2011 22:38:36 +0000 (18:38 -0400)]
New tag 2.0.64

Change-Id: Id7a958a1b543adcbffca5f5b6bd8dcce6b2ce22d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-467 Not reinitialize "cl_io" in "llu_file_prwv()"
nasf [Wed, 29 Jun 2011 06:46:48 +0000 (14:46 +0800)]
LU-467 Not reinitialize "cl_io" in "llu_file_prwv()"

In "llu_file_prwv()", the calling "ccc_env_thread_io(env)" will
erases all valid values assigned before into "llu_file_prwv()",
then the "io->ci_obj" and "io->ci_lockreq" become unspecified,
and then causes subsequent "cl_object_top()" to access NULL pointer
and triggers "slp_io_rw_lock()" assertion.

Change-Id: I0e878c39d6fb21c5f4d93d037763ae68ee8f102e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1031
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-346 fix conf-sanity test_23a
Bobi Jam [Tue, 5 Jul 2011 09:19:40 +0000 (17:19 +0800)]
LU-346 fix conf-sanity test_23a

ctrl-c sends SIGINT signal, and the SIGINT will be delivered to the
process tree, but it does not work on non-job-controlled (usually in
script) child process.

SIGTERM works on child process, but it does not spread offspring
processes, so we send it to all lustre mount processes.

excerpt from bash manpage:

set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...]
set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]
 -m      Monitor mode. Job control is enabled. This option is on by
         default for interactive shells on systems that support it.
Non-builtin  commands run by bash have signal handlers set to the
values inherited by the shell from its parent.  When job control is
not in effect, asynchronous commands ignore SIGINT and SIGQUIT in
addition to these inherited handlers.

Change-Id: I099fe53373470ad2182f7bd20ff88cb896b1f955
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1049
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-491 conf-sanity/50g fails on a local setup
Bobi Jam [Wed, 6 Jul 2011 11:00:45 +0000 (19:00 +0800)]
LU-491 conf-sanity/50g fails on a local setup

get_clientosc_proc_path() should exclude MDT device's osc entry.

Change-Id: Ia62397aaab830b9f1318a200db660f541fc87104
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1064
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-386 fix replay_single test_65a
Bobi Jam [Tue, 28 Jun 2011 04:15:22 +0000 (12:15 +0800)]
LU-386 fix replay_single test_65a

Set debug level as concise as possible, too many log messages will wrap
around log buffer and overwrite what we need.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I08bfbe6c77d87afd13f46966c2ae8a3fffe2e19e
Reviewed-on: http://review.whamcloud.com/1025
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-478 Set tunables on lvm device
Niu Yawei [Mon, 4 Jul 2011 09:37:43 +0000 (02:37 -0700)]
LU-478 Set tunables on lvm device

- The set_blockdev_tunables() shouldn't chop the tail digit on
  the /dev/mapper/xxx device.
- Sometimes, the /sys/block/dm-x doesn't have the max_[hw]_sectors_kb,
  such errors should be tolerated.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I54c0e427772d8a1066a37d011d4cfd18240374b5
Reviewed-on: http://review.whamcloud.com/1046
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-413 limit used inodes for performance tests
Andreas Dilger [Tue, 14 Jun 2011 21:53:14 +0000 (15:53 -0600)]
LU-413 limit used inodes for performance tests

If doing wide stripe mdsrate tests, don't try to consume all of
the inodes on the OSTs.  The MDS does not consume inodes on OSTs
completely uniformly, and this only introduces spurious failures
when the inodes run out unevenly.

Change-Id: I74adf5ba6add7024ce7973d2850c3cb13f4da0cb
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/941
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-435 Add VM_FAULT_RETRY handling
Bobi Jam [Wed, 22 Jun 2011 04:14:15 +0000 (12:14 +0800)]
LU-435 Add VM_FAULT_RETRY handling

2.6.32 kernel add VM_FAULT_RETRY option in handle page fault, we
need handle it as well.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I71d1c51bc297d1e0e8cc38e11b8a724edf9d1ae7
Reviewed-on: http://review.whamcloud.com/997
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-442 assert failed in osc_set_lock_data_with_check()
Niu Yawei [Wed, 22 Jun 2011 04:27:42 +0000 (21:27 -0700)]
LU-442 assert failed in osc_set_lock_data_with_check()

In osc_enqueue_base(), the checking to l_ast_data of dlm lock isn't
protected by proper lock, which might cause assertion failure in
following osc_set_lock_data_with_check() when there are cocurrent
callers.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Idb2312003e93f4ab0687ed5b7e932de77b23efb7
Reviewed-on: http://review.whamcloud.com/993
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-419 mkfs: fix default ext4 filesystem tuneables
Andreas Dilger [Wed, 22 Jun 2011 04:21:28 +0000 (22:21 -0600)]
LU-419 mkfs: fix default ext4 filesystem tuneables

Enable the "64bit" feature flag for filesystems over 16TB (2^32
blocks, really).  Otherwise, the user needs to specify "-t ext4"
explicitly for such filesystems, or otherwise specify all of the
mke2fs features explicitly to format huge filesystems.

Porting the LU-255 patch to b1_8, I also wanted to make sure that
the new default inode ratio for OSTs was not too aggressive.  While
Lustre filesystems generally have average file sizes over 1MB, in
some limited number of cases the user filesystem statistics sent to
lustre-discuss had filesystems with an ratio of 600kB/inode region.

While the average FILE size may be > 1MB/file, if the default LOV
striping is 2 or 4 stripes/file then there may be a large number of
zero-length inodes on the OST that will be allocated and need space.

Reduce the default inode ratio to previously changed in commit
eb012d4a10208b26c2d3e795a90f1bb07dde6d91 from 1MB/inode down to
512kB/inode for filesystems between 4TB and 16TB, and only go up to
1MB/inode for filesystems over 16TB.  Since there are no existing
filesystems that large, there is no firm expectation for how many
inodes should be created for such filesystems, so this is safer.

Change-Id: I92139755468c5f58830849ebd44171951f8460e4
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/996
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoRevert "LU-15 shrink the cache to alleviate OST memory pressure"
Oleg Drokin [Mon, 27 Jun 2011 22:22:52 +0000 (18:22 -0400)]
Revert "LU-15 shrink the cache to alleviate OST memory pressure"

This introduced a significant performance problem on DDN hardware,
so reverting.

This reverts commit 491a448008d8f8a4dc61789c14bd96de205f856e.

Change-Id: Id19d9735ddc5daa852e4a388974f9a8f11208d05
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-371 call OBD_ALLOC_LARGE to allocate epp_pools
Liang Zhen [Sun, 29 May 2011 04:04:22 +0000 (12:04 +0800)]
LU-371 call OBD_ALLOC_LARGE to allocate epp_pools

enc_pools_alloc is using OBD_ALLOC to allocate memory, which can fail on
some systems and return ENOMEM, so we should replace it with
OBD_ALLOC_LARGE.

Change-Id: I90cfe8c03e6db013818553f34463ecd0edf566ab
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/869
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-432 multiop test needs $(PTHREAD_LIBS)
yangsheng [Wed, 22 Jun 2011 08:29:25 +0000 (16:29 +0800)]
LU-432 multiop test needs $(PTHREAD_LIBS)

Added $(PTHREAD_LIBS) to multiop_LDADD for multiop test.

Signed-off-by: Christos Triantafyllidis <ctria@grid.auth.gr>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Ibc41b2fdcc79ddadeaae8e4bde5c4cd4d1bb7b7d
Reviewed-on: http://review.whamcloud.com/994
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-409: only load llite_lloop module if kernel < 2.6.32 or LOAD_LLOOP
Richard Henwood [Wed, 22 Jun 2011 23:34:41 +0000 (19:34 -0400)]
LU-409: only load llite_lloop module if kernel < 2.6.32 or LOAD_LLOOP

A bug was introduced with change: I63ebc7a8e0a8de6d34ffce5fd625df6db7216d32
This fixes it.

Change-Id: I001d348dd3233977a4e972ccf01ac51bc3bcbae9
Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1002
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-434 Add comment for $SHARED_DIRECTORY variable
Prakash Surya [Tue, 14 Jun 2011 21:33:52 +0000 (14:33 -0700)]
LU-434 Add comment for $SHARED_DIRECTORY variable

To try and avoid confusion, a comment was added to better explain how the
$SHARED_DIRECTORY variable is intended to be used. The explanation was taken
from the Lustre mailing list. Specifically, from this message by Andreas:
http://lists.lustre.org/pipermail/lustre-discuss/2011-June/015682.html

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I594283a5963a0ac83bbe88ce8258e361408ec57a
Reviewed-on: http://review.whamcloud.com/940
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
12 years agoLU-421 include lustre/BUIDING in dist tarball
Brian J. Murrell [Thu, 16 Jun 2011 11:25:38 +0000 (07:25 -0400)]
LU-421 include lustre/BUIDING in dist tarball

lustre/BUILDING is not currently included in the dist tarball.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: Ief40fab4bb80d9fe9967e433f2602f73880871ab
Reviewed-on: http://review.whamcloud.com/982
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-409: only load llite_lloop module if kernel < 2.6.32 or LOAD_LLOOP
Richard Henwood [Wed, 22 Jun 2011 02:38:28 +0000 (22:38 -0400)]
LU-409: only load llite_lloop module if kernel < 2.6.32 or LOAD_LLOOP

The change of block device interface in kernel 2.6.32-131 caused
the llite_lloop module to fail. llite_lloop module is currently
unsupported. This change introduces a test for kernel version
to prohibit loading a module with a kernel >= 2.6.32. A LOAD_LLOOP
flag (default false) is provided to ignore the kernel test and force
loading of llite_lloop if desired.

A related version of this change for b1_8 is:
http://review.whamcloud.com/954

Change-Id: I63ebc7a8e0a8de6d34ffce5fd625df6db7216d32
Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/956
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoNew tag 2.0.63 2.0.63.0 v2_0_63_0
Oleg Drokin [Wed, 22 Jun 2011 13:13:13 +0000 (09:13 -0400)]
New tag 2.0.63

Change-Id: I0c70ee5096c9ccbb5e3518004a086c805f9fcf09
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-388 modify kernel-ib spec file for openib RPM
Brian J. Murrell [Fri, 3 Jun 2011 20:25:45 +0000 (16:25 -0400)]
LU-388 modify kernel-ib spec file for openib RPM

The kernel-ib RPM from OFED 1.5.3.1 conflicts with RHEL5's
openib package.  Consider RHEL5's userspace as canonical and
Remove the conflicting portions from the kernel-ib RPM.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I9f6a768bc5ac30fdab589c1bdbc3154fa31c1405
Reviewed-on: http://review.whamcloud.com/981
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-387 mmp.sh test_9 failed
Niu Yawei [Mon, 20 Jun 2011 02:38:32 +0000 (19:38 -0700)]
LU-387 mmp.sh test_9 failed

The mmp.sh test_9 often fail for the script killing the e2fsck process
on wrong timing, so we use some tricky way to make sure the MMP block
stay in 'e2fsck' state before mounting the device.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Id8b13b67d6f0f1f0198b13bca55356ab95af1059
Reviewed-on: http://review.whamcloud.com/979
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-405 Don't assert on multiple disconnected dentries case
Oleg Drokin [Thu, 9 Jun 2011 16:00:25 +0000 (12:00 -0400)]
LU-405 Don't assert on multiple disconnected dentries case

NFS has a valid case for multiple disconnected dentries on the same
inode so we must not assert there as a workaround.
The proper fix is to adopt using of d_splice_alias eventually.

Change-Id: I28f7385d95523adf949a4e3b8887d79cdc4f2e37
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/923
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-395: obd_zombie_barrier is not barrier actually
Jinshan Xiong [Thu, 16 Jun 2011 05:30:27 +0000 (22:30 -0700)]
LU-395: obd_zombie_barrier is not barrier actually

a hotfix for avoiding deadlock:
sys_umount -> class_detach -> obd_zombie_impexp_cull -> filter_cleanup
-> obd_zombie_barrier, but the zombies_count will only be decreased after
obd_zombie_impexp_cull, so this process is waiting for itself, this is a
deadlock.

Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Change-Id: Id29deab4c85a7570ec59b2a20f70ccfae9440f01
Reviewed-on: http://review.whamcloud.com/945
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-304 Remove Cray-specific LICENSE files.
Christopher J. Morrone [Tue, 10 May 2011 23:38:59 +0000 (16:38 -0700)]
LU-304 Remove Cray-specific LICENSE files.

This reverts commit cbb0d69e53c0f928c5f43eeb125ba87283fe561b.

Change-Id: I8aa6a03dc78eeaffad64d5509c3ddab1cb4e56ee
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/529
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-404 bind umount /sbin/mount.lustre only if necessary
Bobi Jam [Thu, 9 Jun 2011 08:50:04 +0000 (16:50 +0800)]
LU-404 bind umount /sbin/mount.lustre only if necessary

On lustre release installed system, /sbin/mount.lustre will not
bind mount upon $LUSTRE/utils/mount.lustre, so don't need bind
umount it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I49e671f0acf991a54a01c4f2bb1e82c2db93aa3e
Reviewed-on: http://review.whamcloud.com/918
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-381 add in RHEL6 value for CONFIG_SECURITY_DMESG_RESTRICT
Richard Henwood [Thu, 2 Jun 2011 19:45:29 +0000 (15:45 -0400)]
LU-381 add in RHEL6 value for CONFIG_SECURITY_DMESG_RESTRICT

This silences interactive prompt during make oldconfig.

Change-Id: I9e555ece1d6acb7b793cf9eec5deb6d7fc2ab2af
Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/876
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-163 update ChangeLog for LU-163 patches
nasf [Thu, 9 Jun 2011 14:44:53 +0000 (22:44 +0800)]
LU-163 update ChangeLog for LU-163 patches

For lustre re-export through NFSv4, should specify the mount option of
"-o 32bitapi" on lustre client.

Change-Id: Ie5bcd8373c22fd0e9eaec27e7e60c2f6f4080018
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/920
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-403 Add support for RHEL5 kernel 2.6.18-238.12.1.el5
Oleg Drokin [Thu, 9 Jun 2011 22:59:27 +0000 (18:59 -0400)]
LU-403 Add support for RHEL5 kernel 2.6.18-238.12.1.el5

Change-Id: I0fcf8f9158659bbb8a9c53d7b0f22bcabc84ed66
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/931
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
12 years agoLU-397 Set 'lsr_flags' as 'LU_SEQ_RANGE_MDT' for old 2.0 client
nasf [Tue, 7 Jun 2011 03:41:24 +0000 (11:41 +0800)]
LU-397 Set 'lsr_flags' as 'LU_SEQ_RANGE_MDT' for old 2.0 client

Lustre 2.x introduces server identifier into lu_seq_range to distinguish
MDT and OST fids. But for old 2.0 client, it does not specify such
identifier/flags. So use 'OBD_CONNECT_SEQ_RANGE' to distinguish whether
it is old 2.0 client or not. For old 2.0 client, set the 'lsr_flags' as
'LU_SEQ_RANGE_MDT' by default.

Change-Id: I652caa637959268e1da499370a0efd356ff98bbe
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/902
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>