[LU-8378] unused but set variables Created: 07/Jul/16  Updated: 08/Nov/18  Resolved: 25/Oct/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0, Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Yang Sheng
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-8671 bad error handling in mgs_object_init Resolved
Related
is related to LU-7950 Suspicious dereference of pointer bef... Resolved
is related to LU-8354 soft lockup in ldlm_plain_compat_queue Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There are several unused but set variables. A few represent real bugs and some others are addressed under other issues. Here is a list I collected last week:

/root/lustre-release/ldiskfs/inode.c:3352: warning: variable ‘to’ set but not used
/root/lustre-release/ldiskfs/inode.c:6189: warning: variable ‘entry’ set but not used
/root/lustre-release/ldiskfs/inode.c:6479: warning: variable ‘blocksize’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:1966: warning: variable ‘bsbits’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:2965: warning: variable ‘orig_size’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:2966: warning: variable ‘orig_start’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:3710: warning: variable ‘start’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:4899: warning: variable ‘es’ set but not used
/root/lustre-release/ldiskfs/mballoc.c:4904: warning: variable ‘grp’ set but not used
/root/lustre-release/ldiskfs/move_extent.c:478: warning: variable ‘new_phys_end’ set but not used
/root/lustre-release/ldiskfs/namei.c:1475: warning: variable ‘inode’ set but not used
/root/lustre-release/ldiskfs/resize.c:945: warning: variable ‘o_groups_count’ set but not used
/root/lustre-release/ldiskfs/super.c:4516: warning: variable ‘resv_blocks’ set but not used

/root/lustre-release/lnet/lnet/nidstrings.c:252: warning: variable ‘tmp’ set but not used

/root/lustre-release/lustre/fid/lproc_fid.c:71: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/mdd/mdd_dir.c:3642: warning: variable ‘recsize’ set but not used
/root/lustre-release/lustre/mdt/mdt_coordinator.c:1524: warning: variable ‘hcad’ set but not used
/root/lustre-release/lustre/mdt/mdt_coordinator.c:875: warning: variable ‘ptr’ set but not used
/root/lustre-release/lustre/mdt/mdt_hsm_cdt_actions.c:366: warning: variable ‘count’ set but not used
/root/lustre-release/lustre/mgs/lproc_mgs.c:181: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/mgs/mgs_handler.c:1298: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/ofd/ofd_grant.c:1078: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/ofd/ofd_obd.c:1089: warning: variable ‘info’ set but not used
/root/lustre-release/lustre/osc/osc_request.c:1072: warning: variable ‘err’ set but not used
/root/lustre-release/lustre/osd-ldiskfs/osd_iam.c:1070: warning: variable ‘c’ set but not used
/root/lustre-release/lustre/osd-ldiskfs/osd_iam.c:1411: warning: variable ‘object’ set but not used
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lfix.c:492: warning: variable ‘result’ set but not used
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lvar.c:743: warning: variable ‘result’ set but not used
/root/lustre-release/lustre/osp/lwp_dev.c:364: warning: variable ‘imp’ set but not used
/root/lustre-release/lustre/osp/osp_dev.c:1324: warning: variable ‘imp’ set but not used
/root/lustre-release/lustre/ptlrpc/../../lustre/ldlm/ldlm_plain.c:77: warning: variable ‘tmp’ set but not used
/root/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_handler.c:1734: warning: variable ‘err’ set but not used
/root/lustre-release/lustre/ptlrpc/../../lustre/target/update_trans.c:175: warning: variable ‘params’ set but not used
/root/lustre-release/lustre/quota/qmt_lock.c:545: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/quota/qmt_lock.c:605: warning: variable ‘rc’ set but not used
/root/lustre-release/lustre/quota/qsd_lock.c:382: warning: variable ‘qsd’ set but not used
/root/lustre-release/lustre/quota/qsd_request.c:161: warning: variable ‘lit’ set but not used


 Comments   
Comment by Peter Jones [ 08/Jul/16 ]

Yang Sheng

Could you please look into this?

Thanks

Peter

Comment by Gerrit Updater [ 18/Oct/16 ]

Yang Sheng (yang.sheng@intel.com) uploaded a new patch: http://review.whamcloud.com/23221
Subject: LU-8378 all: remove set but unused variables
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 561a2681d3f051621c0f4631bb9e5446e6ee3a26

Comment by Gerrit Updater [ 25/Oct/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/23221/
Subject: LU-8378 all: remove set but unused variables
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b1ff338ede34421acfc2cdbfe0dbe7b293ebd3b2

Comment by Peter Jones [ 25/Oct/16 ]

Landed for 2.9

Comment by Gerrit Updater [ 16/Nov/16 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/23820
Subject: LU-8378 obd: move s3 in lmd_parse to inner loop
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 79f032e952a2c966366f7ea70badea5efec6d4e7

Comment by Gerrit Updater [ 09/Jan/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/23820/
Subject: LU-8378 obd: move s3 in lmd_parse to inner loop
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6867d7abdb9905da98d8e90b8dc65d84a7656363

Generated at Sat Feb 10 02:17:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.