Whamcloud - gitweb
LU-10650 obd: add check to obd_statfs 52/31752/2
authorAlexander Boyko <c17825@cray.com>
Fri, 9 Feb 2018 12:07:19 +0000 (07:07 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 12 Apr 2018 16:14:19 +0000 (16:14 +0000)
commit5e47249b04ebec318b3589f43830c665fe0d8448
tree3d092f15c92a8f043095b691b2193bafe0d0a82c
parent8c6371e3f0c3f67ff88402a0b19964ecb1c2601a
LU-10650 obd: add check to obd_statfs

The race could happend between mount and lctl get_param.
Because procfs files are ready before a full obd initialization.
For example:
3372:0:(dt_object.h:2509:dt_statfs()) ASSERTION( dev )
3372:0:(dt_object.h:2509:dt_statfs()) LBUG
Pid: 3372, comm: lctl
Call Trace:
libcfs_call_trace+0x4e/0x60[libcfs]
lbug_with_loc+0x4c/0xb0[libcfs]
tgt_statfs_internal+0x2ea/0x350[ptlrpc]
ofd_statfs+0x66/0x470 [ofd]
lprocfs_filesfree_seq_show+0xf6/0x520 [obdclass]
ofd_filesfree_seq_show+0x12/0x20 [ofd]

The patch adds a check of completed obd_setup to obd_statfs().
The patch adds the sanity 276 test.

Lustre-change: https://review.whamcloud.com/31243
Lustre-commit: 4f40429775c49468d9ec1fec34d5e7500ac01116

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-2665
Change-Id: I55a9ffa7e036f486388a8f548051d28974d47951
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31752
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/obd_class.h
lustre/tests/sanity.sh