LU-4703 mdd: do not skip xattr sanity check for all cases

xattr sanity check should be done at all times.
Otherwise we are risking letting a non root user setting
access acl on any file.

Cherry-picked-by: Ned Bass <bass6@llnl.gov>
Path-set: 1

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: I5f44d38f2589f0758548d8ccae5efef27205f0a0
LU-4704 acl: fix permission problem of setfacl

Setxattr does not check the permission when setting ACL xattrs. This
will cause security problem because any user can walk around
permission checking by changing ACL rules.

Patch-set: 2
Cherry-picked-by: Ned Bass <bass6@llnl.gov>

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I1e5c44674f2e22ecbe29a589a219bed52d037b9b
LU-4624 llite: Avoid statahead thread start/stop deadlocks

The statahead and statahead agl threads blindly set their
thread state to SVC_RUNNING without checking the state first.  If, for
instance, another thread sets the state to SVC_STOPPING that
stop signal will now have been lost.  Deadlock ensues.

We also partly improve the sai reference counting, because a race exists
where the ll_stop_statahead thread can drop the default reference, and
the statahead thread can exit and drop its reference as well.  With no
references on the sai, the final put will poison and free the buffer.  The
original do_statahead_enter() function may then continue to access
the buffer after it is freed because it did not take a reference of its
own.  We add a local reference to address that.

Change-Id: I531f17966d49ba1e6ebd99abe9cb8b128eeac4f9
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
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>
Patch-Set: 4
LU-4008 mdt: Don't allocate unused unlink cookie buffer

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.

Additionally for lockless getattr, try to allocate just
as much EA space in the reply as needed (based on the
EA size of the inode).

Change-Id: I4c5bfb5f2d39653d5612c90967d5e1ac83d441e6
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Patch-Set: 5
LU-4008 mdt: Shrink default LOVEA reply buffer

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.

Change-Id: I2c5e09ab5288769484837d4f7c32361e316eb7e2
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Patch-Set: 2
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>
Patch-Set: 1
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.

Change-Id: I2fffdaefad2a6b05247676441451fffdca620dcd
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Patch-Set: 2