LU-4345 osp: store valid bits in setattr record

We'd store LA_UID/LA_GID bit along with the UID/GID in the setattr
llog record, otherwise, osp could set a random uid/gid to the OST
object.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I17de21071127325ade8dea6f8618b622fec1768d
LU-4028 quota: fix output of 'lfs quota'

Fix the output of 'lfs quota' when '-h' option is specified:
- total allocated block limit should be converted after calculation;
- show 1~3 digit after the decimal point;

Lustre-commit: 69dda0cf5fb34a1a7ff93468ca1c155dd3a53060
Lustre-change: http://review.whamcloud.com/8407

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibed84a73b87cf741c9122216dc8c45f3a33a78d8
Reviewed-on: http://review.whamcloud.com/10412
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4382 ldiskfs: add quota credit for ldiskfs_delete_inode

In ldiskfs_delete_inode() we missed possible journal credits
for journaled quota change, this patch makes it up.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I317a348c93d8d4489d90c7b890e965a3d39993e4
LU-4943 obdclass: detach MGC dev on error

lustre_start_mgc() creates MGC device, if error happens later on
ll_fill_super(), this device is still attached, and later mount
fails by keep complaining that the MGC device's already in the
client node.

It turns out that the device was referenced by mgc config llog data
which is arranged in the mgc lock requeue thread re-trying to get its
mgc lock, and in normal case, this llog reference only released in
mgc_blocking_ast() when the system is umount.

This patch handles the error path when mgc connect fails, it releases
the config llog data reference in config_log_end() since there will
be no mgc_blocking_ast() happen in this case.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I3cd7afbdf733fd522aed4157098fbe1c72332a0a
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