Whamcloud - gitweb
LU-4223 utils: fixing loop leaking in utils 09/8409/9
authorwang di <di.wang@intel.com>
Sat, 30 Nov 2013 15:40:22 +0000 (07:40 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Dec 2013 22:59:22 +0000 (22:59 +0000)
commit98ac0fe3a45dde62759ecaa4c84e6250ac2067f8
tree55ec574343e12261b712a1455b9ea04be0f386e7
parent9761d5c52aeef31a8c3112c3fb3ec9e24b37c800
LU-4223 utils: fixing loop leaking in utils

1. If the file is being opened by popen, it should use
pclose instead of fclose to close the file, to make sure
the process created by popen is closed after pclose, then
to avoid loop device is being hold on release.

2. Give another try in loop_cleanup in case there are still
some process going on with the loop.

3. wait loop device to release before continue conf-sanity
32c.

4. Add losetup -a to list loop dev information when the
test(conf-sanity 32) fails.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0051de9b5a39d487fe34554c79773de4635178cc
Reviewed-on: http://review.whamcloud.com/8409
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/conf-sanity.sh
lustre/utils/mkfs_lustre.c
lustre/utils/mount_lustre.c
lustre/utils/mount_utils.c
lustre/utils/mount_utils_ldiskfs.c