LU-4006 lnet: abort messages whose MD has been unlinked

If LNetMDUnlink has been called, all outgoing messages
on that MD should be aborted before lnet_ni_send() is
called.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Change-Id: I3ebe6d3f4ecc21cd6f00aebfb98b90109501df5a
Reviewed-on: http://review.whamcloud.com/8041
Tested-by: Jenkins
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4008 mdt: Shrink default LOVEA reply buffers

Instead of allocating maximum possible LOVEA for intent requests,
allocate a sane default to fit up to 100 stripes, should the size
be bigger, the buffer reallocation code will kick in.

Additionally, since quite awhile ago we no longer send
unlink cookies or EA data to the clients from unlinks/renames,
so we no longer need to allocate reply buffer for them in
mdt_close() and other such places.
Also clean up unused fields related to these buffers in
md_attr structure.

Change-Id: I4c5bfb5f2d39653d5612c90967d5e1ac83d441e6
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9322
Tested-by: Jenkins
Reviewed-by: Matt Ezell <ezellma@ornl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-4008 mdt: Shrink default LOVEA reply buffers

Instead of allocating maximum possible LOVEA for intent requests,
allocate a sane default to fit up to 100 stripes, should the size
be bigger, the buffer reallocation code will kick in.

Additionally, since quite awhile ago we no longer send
unlink cookies or EA data to the clients from unlinks/renames,
so we no longer need to allocate reply buffer for them in
mdt_close() and other such places.
Also clean up unused fields related to these buffers in
md_attr structure.

Lustre-commit: 00260466f9c84f21e6db55d5dd6e87e8a9906438
Lustre-change: http://review.whamcloud.com/9322

Change-Id: I06b9f5665ec2616cd9a5d483872369d710400d22
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9942
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-4008 mdt: Use actual size for layout lock intents

The intent for layout looks up the size of the lov xattr. That size
should be used for the reply buffer instead of the maximum size ever
seen.

Signed-off-by: Matt Ezell <ezellma@ornl.gov>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9550aa47313502288b018f5cac0d59931ce76d21
Reviewed-on: http://review.whamcloud.com/9571
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
LU-4019 ofd: setattr don't udpate lvbo with object referenced

we shouldn't allow recursive lu_object_find() while object
can be destroyed. so release the reference to the object
before calling to ldlm_res_lvbo_update() which lookups the
object on its own.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If34d89834e352b6d0b8129a6fb4377317833a78a
Reviewed-on: http://review.whamcloud.com/7795
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4260 lod: free striping if striping initialization fails

It should free striping if striping information initialization is
faild, otherwise the later object find will pick up this wrong lod
object, and hit LBUG

ASSERTION( lc->ldo_stripenr == 0 ) failed:

[<ffffffffa0349895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[<ffffffffa0349e97>] lbug_with_loc+0x47/0xb0 [libcfs]
[<ffffffffa0e3f78f>] lod_ah_init+0x57f/0x5c0 [lod]
[<ffffffffa0b73a83>] mdd_object_make_hint+0x83/0xa0 [mdd]
[<ffffffffa0b7feb2>] mdd_create_data+0x332/0x7d0 [mdd]
[<ffffffffa0d9cc2c>] mdt_finish_open+0x125c/0x18a0 [mdt]
[<ffffffffa0d984f8>] ? mdt_object_open_lock+0x1c8/0x510 [mdt]
[<ffffffffa0d9ee8d>] mdt_reint_open+0x115d/0x20c0 [mdt]

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4ce418cdf505e61d3be47350478ece531249d425
LU-4403 mds: extra lock during resend lock lookup.

1. If the request does not require open lock, MDT does not
need to search the lock in exp_hash_lock list, because the MDT
will release the lock anyway, and it can always re-enqueue the
request during resend.

2. Lock the resource when the MDS is trying to lookup the lock for
resend request(in mdt_intent_fixup_resent). Otherwise, if the
lock is being released, fixup_resent will return a released lock,
which will cause LBUG when this lock is being released later.

3. Missing initialized ibits in mdt_reint_open.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I3c1aab345fcbb971a85aaa6aac92f22439560ff3
LU-4719 mdt: Don't try to print non-existent objects

mdt_dump_lmm() needs to make sure it's not trying to print
objects for a default striping from a directory, since there
are not objects in this case.

Return early if the D_INFO debug mask is disenabled, so it
doesn't iterate through the LOV/LMV layout at all.  That is
just a waste of effort.

Lustre-change: http://review.whamcloud.com/#/c/9520
Lustre-commit: ebfc6f4b54961e5e0762af7d2555f2dc5d1e1ec3

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ifbda7c0bfdec74c5ee4c097ea24613a4ce692572
Reviewed-on: http://review.whamcloud.com/10021
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Matt Ezell <ezellma@ornl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4791 lod: subtract xattr overhead in max EA size

1. It needs to subtract the xattr overhead when calculate the max
EA size, otherwise, it might get oversize stripe_count, which cause
ENOSPC error in the following xattr_set.
2. Release stripe information, if xattr set fails.

Lustre-change: http://review.whamcloud.com/9835
Lustre-commit: a11c69ad81ca8071b9d97d5032539dd7b36873ee

Signed-off-by: wang di <di.wang@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I6cde84b7f467ac21be56c6b110fef46e93266ce1
LU-4858 ofd: ofd_osd is always valid

ofd_osd is valid in its life time because ofd is released before
osd, so it should never be cleared.

Lustre-commit: I3cb6d82b71b3018b4fc9e885eb6533b064179238
Lustre-change: http://review.whamcloud.com/10082

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I931cd45f17dd5dc3223e755ce0b40f87ec09e789
LU-4858 ofd: ofd_osd is always valid

ofd_osd is valid in its life time because ofd is released before
osd, so it should never be cleared.

Lustre-commit: I3cb6d82b71b3018b4fc9e885eb6533b064179238
Lustre-change: http://review.whamcloud.com/10082

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I931cd45f17dd5dc3223e755ce0b40f87ec09e789
LU-4570 ldlm: Add some extra checks for ldlm timeout handling

This is a testing only change not intended for landing.

Change-Id: I69dfe095fda7904d14d6ef034928b9d96dde2add
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>