Whamcloud - gitweb
LU-6747 osd-zfs: initialize obd_statfs in osd_statfs() 46/15346/8
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 19 Jun 2015 07:43:03 +0000 (01:43 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 10 Jul 2015 03:27:19 +0000 (03:27 +0000)
commit1ef0185e8c12aa11a4c87c4956b1ba408c0e3d08
treeceda248797b6814f1e7977b94425e934d70a98c0
parent1c7f9caa99df3082a3e506673721d359147843d3
LU-6747 osd-zfs: initialize obd_statfs in osd_statfs()

The osd-zfs osd_statfs() method wasn't initializing all of the fields
of struct obd_statfs, and in some cases could be returning random
data to the client.  For most of the fields this doesn't matter, but
the os_state field could contain OS_STATE_READONLY and prevent the
MDS from allocating objects there.

Reorder the assignment of struct obd_statfs fields to be in struct
order so that it is more clear which fields have already been set.

Also fixup osd-ldiskfs obd_statfs() to initialize os_maxbytes as
osd-zfs does, even though it currently isn't used.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If4ec6b5fc9c31676267e63be34d00275b4ac8dfb
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/15346
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c