LU-4941 lfsck: check LOV EA header properly

1) If the LFSCK does not recognize the magic, then check whether
   the magic's postfix match the LOV_MAGIC_MAGIC or not: if yes,
   then it is quite possible that the system was downgraded from
   a new release with new LOV magic, so it is better to keep the
   current LOV EA unchanged; otherwise, it is crashed LOV EA and
   should be repaired by the LFSCK.

2) Check the pattern with lov_pattern().

3) Drop redundant LOV EA header verification.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iad3a1d6fc50a5dfba977a534fdb253bc9f6373e5
Reviewed-on: http://review.whamcloud.com/10045
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4920 quota: always clear lqe_lockh on lock cancel

In the qsd_id_blocking_ast(), lqe_lockh should always be cleared,
otherwise, quota code will mistakenly assume the id lock is still
valid.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Iac73216d130aebe1b73226d260807f3a9cedc635
Reviewed-on: http://review.whamcloud.com/9965
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4924 llite: Only kill SGID/SUID bits

Check that attr mode is valid before using it when determining if to
clear SGID and SUID bits in ll_setattr.
Add regression test.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2b221e80a5bb167f8670f376ce97d62d720ad857
Reviewed-on: http://review.whamcloud.com/10071
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Revert "LU-4924 llite: Only kill SGID/SUID bits"

Did not notice that this introduces 100% failure all in itself.

This reverts commit 70c37954649fbc4fc2d0820d5d422f96144071f9.

Change-Id: If27762e2ffa9afc3857446a733ee3a8751fe6292
Reviewed-on: http://review.whamcloud.com/10151
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>