LU-1961 build: fix 'dereference before null check' errors

Fix 'dereference before null check' defects found by Coverity version
6.0.3:
Dereference before null check (REVERSE_INULL)
Null-checking variable suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I0c1be27ea443865fcb7640976839d95d0dc07b9a
Reviewed-on: http://review.whamcloud.com/4023
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1665 libcfs: alignment of hsb_head[0] can be suboptimal

On ia64, hsb_head[0] of struct cfs_hash_bucket could be aligned to a
4-byte boundary.  However, after allocating the hash bucket and
casting, the first member of the struct pointed to by hsb_head[0]
might prefer an 8-byte alignment.  This causes a constant stream
of unaligned access warnings from the kernel.

For other cpus this might waste some small amount of space, but
potentially produces more natural alignments (8 byte objects on 8
byte boundaries).

Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I4561ab3e6553b5dcef840b8e4e9aa3023b7c3586
Reviewed-on: http://review.whamcloud.com/4965
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2321 debug: Quiet uninitialized target connects

When a target is not fully initialized and receives a connection
attempt, it will refuse the connection and print a message to the
console stating this fact. This is "normal operation", so rather
than using LCONSOLE_WARN to convey this information, this patch
modifies it to use CDEBUG.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Ia5d098fcfe2ad9ae2a1406166087db8181496a7d
Reviewed-on: http://review.whamcloud.com/4640
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2072 ldiskfs: Leak of s_mb_prealloc_table in ldiskfs

ext4-prealloc-rhel[5,6] patches adds kmalloc'ed
sbi->s_mb_prealloc_table field which is never freed
in [ldiskfs,ext4]_mb_release()/ext4-vmalloc-rhel[5,6].patch

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I0ca3ff1e7ae8daa0260cd070c5ac52c843248a1b
Reviewed-on: http://review.whamcloud.com/4683
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2587 quota: bump version after migration

The global index version should be bumped to 2 if migration
happened, otherwise, the global index copy version on slave will
be same as the global index's (both equal to 1 after creation),
and the migrated limits will fail to be reintegrated.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2d596a33e2eb4495dfbb7bd63d37199297a9b214
Reviewed-on: http://review.whamcloud.com/4969
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>