LU-1198 idl: move FID VER to DLM resource name[1]

Until Lustre 1.8.7/2.1.1 the FID version was packed into name[2].

However, this leaves very little room in the LDLM resource name
for other uses.  The upcoming quota code needs to store another
FID into the LDLM resource to allow directory tree quotas, and
managed by the DLM.

The 32-bit VER, which is currently always 0, is moved into the high
bits of name[1] along with the 32-bit OID, to avoid consuming the
name[2] field.  Since future use of the FID version (including
snapshots, pools, etc) will need changes on the client side anyway,
there will never be non-zero VER on an existing client.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If1e500cfb277dfc25bc056bb0c5763e48e7d500c
Reviewed-on: http://review.whamcloud.com/2275
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1221 ldiskfs: Replace sysname with nodename in MMP

sysname holds "Linux" by default, i.e. what appears when
doing a "uname -s"; nodename should be used to print the
machine's hostname, i.e. what is returned when doing a
"uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to
notify the administrator of the node which is contending
to mount the filesystem.

Andreas says this was introduced when porting the MMP
patches from RHEL5 to RHEL6, and then also pushed upstream
to ext4; a patch for upstream ext4 has already been
submitted.

MRP-222
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ie5c8e99ae536c2239134140589d678d3a4f92639
Reviewed-on: http://review.whamcloud.com/2337
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-554 LNet: add gnilnd awareness to LNet

This allows servers on any network to talk to gnilnd routers.
See Oracle 23884 attachment 31892

Change-Id: I6989c987b2bd0d60058a290567f8ef0bee56420b
Signed-off-by: Chris Horn <hornc@cray.com>
Reviewed-on: http://review.whamcloud.com/1179
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1018 test: Reduce compilebench run time

We decided to reduce the run time for compilebench
so it would run under 1h on VM nodes. This is similar
to master

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ie664ad131e4fbce9443eb78d06cbe36d6002b881
Reviewed-on: http://review.whamcloud.com/2005
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-249 mds: Increase the maximum number of threads on MDS

Currently the largest number of the threads that can exist on
the MDS is 512. For very large system is those threads can
easily be exhausted and end up back logging the system. This
patch allows the user to define the upper limit of how many
threads are created on the MDS. If not selected the default
behavior of 512 is kept.

Change-Id: Ie48eb00f48ddcd98cc518178ba5e1da9ea1e40eb
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/2354
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-649 io: DIO doesn't need lock i_mutex

Revert "LU-649 io: DIO doesn't need lock i_mutex"
This reverts commit 4ebec99e309fcafd1be8a0b10673d69a083ae87f.

There is a concern that this patch is wrong, so i'm reverting it until
the situation is clarified.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Ia7e12eaeeb87ef30d073e28391a25ffcd8ad146f
Reviewed-on: http://review.whamcloud.com/2398
LU-974 protocol: change OBD_CONNECT_GRANT_PARAM

Change the OBD_CONNECT_GRANT_PARAM flag value to avoid conflict
with the OBD_CONNECT_UMASK flag from LU-974.  While that patch is
not yet landed to our release tree, it is in use in production at
some customers.  While the risk of conflict is currently low, it
is easier to change the GRANT_PARAM value since only in use on the
orion branch, and isn't even handled by the client there yet.

Add (hopefully) clear comments for OBD_CONNECT and obd_connect_data
to ensure that they are not modified in some incompatible way across
branches.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I503892c3b595c0272b0941fa58a16a496318cab0
Reviewed-on: http://review.whamcloud.com/2298
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-847 quota: client retrieve quota usage directly

Current 'lfs quota' sends getquota RPC to MDS, and MDS is responsible
for retrieving disk usage from all targets, this scheme will be
changed to client retrieving disk usage from all targets directly.

This patch addresses the compatibility issue as well: If the getquota
returned by MDS has QIF_SPACE, client just trust the disk usage
returned by MDS, otherwise, client has to issue RPCs to collect disk
usage by itself.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I35526c453033809d2f23b1806b4783f5011e3fa2
Reviewed-on: http://review.whamcloud.com/1570
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1241 kernel: Kernel update [RHEL6.2 2.6.32-220.7.1.el6]

Update RHEL6.2 kernel to 2.6.32-220.7.1.el6.(patchless client)

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I0933095b4e412dbb4ff826f45196d3b6aa80aecc
Reviewed-on: http://review.whamcloud.com/2401
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-935 quota: break early when b/i_unit_sz exceeded upper limit

While expanding b/i_unit_sz in dquot_create_oqaq(), we'd break the loop
early when the b/i_unit_sz exceeded upper limit, otherwise, qaq_b/iunit_sz
could be overflow and result in endless loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I6046c8b86cad00c8c2fa2d24d0e21821a3c02209
Reviewed-on: http://review.whamcloud.com/1887
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1052 kernel: Kernel update [RHEL5.8 2.6.18-308.1.1.el5]

Update RHEL5.8 kernel to 2.6.18-308.1.1.el5.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Id8394bc1cb57d9555e4cda1312200a23b0915c84
Reviewed-on: http://review.whamcloud.com/2175
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-313 tests: re-enable lfsck test to run by default

Due to bug 13698, the lfsck part of the lfsck.sh test script was
disabled by default. After the fixes in LU-113 were landed, lfsck
should work again. Remove SKIP_LFSCK checks so lfsck.sh actually runs
lfsck instead of silently skipping it unless SKIP_LFSCK=no is set.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I430f7398b2d21db0d0755726fdcb6053f25b4b10
Reviewed-on: http://review.whamcloud.com/2497
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-427 test: Test failure on test suite lfsck

- Reset $MDSDB & $OSTDB in generate_db(). Else they will
  stale if user redefine $SHARED_DIRECTORY.
- Add a function check_shared_dir() to ensure
  $SHARED_DIRECTORY is shared among tests nodes.
- Fix check_logdir() and check_write_access() to avoid using
  node.$(hostname).yml files which should not be deleted.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ie7d1d08c0d2c701fa9fb74ef8b252fa8b31bf111
Reviewed-on: http://review.whamcloud.com/2498
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1062 tests: incorrect path to configuration file

this is a bit modified port of the
http://review.whamcloud.com/#change,1877
(author Andreas Dilger)

Xyratex-bug-id: MRP-480

Reviewed-by: Sergey Glushchenko <Sergey_Glushchenko@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>

Signed-off-by: Iurii Golovach <iurii_golovach@xyratex.com>
Change-Id: I10b42de2c2d453e23142c01290742153dff7262a
Reviewed-on: http://review.whamcloud.com/2419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-577 tests: FAIL replay-single test_70b rundbench load

Test 70b for replay-single assumes that lustre is mounted on
/mnt/lustre which is not the case for us. This patch passes
the proper MOUNT. The test also was not using the standard
DIR/tdir setup which had generated data files not being
cleaned up. Increased the sleep period to match dbench's
warm up period. This gives dbench a change to start up when
using many clients.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I3a793db35aa21d57220d0de1a9e92486e65ae21a
Reviewed-on: http://review.whamcloud.com/2518
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-734 tests: add sub-tests into recovery-*-scale tests

This patch adds sub-tests into the recovery-*-scale tests
so that test results and logs could be gathered properly
and uploaded to Maloo.

The patch also does some cleanup works on the test scripts
and moves some common functions into test-framework.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I514143e1fa29aad289d215174dbc68d2740da73b
Reviewed-on: http://review.whamcloud.com/2508
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-891 test: waiting import state for next step.

Anyway, There still has a rare chance that the request meet
a invalid import after recovery. So we should waiting import
restore to a certain state and then doing next operation.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I20bed347a16755ccaf102d4c67b0a7e87b1318a1
Reviewed-on: http://review.whamcloud.com/2248
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-995 utils: make lfs getstripe directory output consistent.

"lfs getstripe" should report the global default for any fields with
a value that means "use the default". This patch introduces the
following functionality:

1. If "lfs getstripe" is called on a directory and finds that striping
   EA is not set, the filesystem's defaults are looked up and printed.
2. If the striping EA is set, but the striping count and/or striping
   size has a value that means "use the default" (count = 0 and/or
   size = 0), the filesystem's default for that specific striping
   attribute is looked up and printed.
3. A new option to "lfs getstripe" is introduced; the "--raw" or
   "-R" option. If this option is specified, the previous two checks
   are skipped. In other words, if the striping EA is not set, 0, 0,
   -1, will be printed for the striping count, size, and offset
   respectively. Also, if the striping EA is set, the values will be
   printed without first converting them into their respective
   defaults.

This patch relies on the /proc filesystem to determine each
filesystem's default striping attributes, and a cache is maintained
which holds the default values for the last filesystem queried.

See Also:
Bugzilla #23802, https://bugzilla.lustre.org/show_bug.cgi?id=23802

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ic5b616dd83775c0a15be5c060b11cfbba05c4fbb
Reviewed-on: http://review.whamcloud.com/2117
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1340 release: bump version to 1.8.7.81-wc1

Yet another build which brings us closer to 1.8.8-wc1 RC1.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I7bac34ab4d29dc459171265319807c221a564c1a
Reviewed-on: http://review.whamcloud.com/2590
LU-447 add lctl --net XXX push

In order to clear out peer/conn data in the gnilnd for testing after
adding lnet_notify(see LU-446), we need an alternative to
lctl --net gni del_peer - as this nukes the peer and results in false
lnd_query failures.

Change-Id: Ie8029953a2881c0d6e3ac250101d2d4374bbf3c1
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1311
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>