[LU-7025] lfsck_layout_scan_stripes suspicious rc assignment Created: 20/Aug/15  Updated: 24/Aug/15  Resolved: 24/Aug/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

We seem to be having this sort of code there:

                if (lso == NULL) {
                        struct lu_attr *attr = &info->lti_la;

                        rc = dt_attr_get(env, parent, attr);
                        if (rc != 0) {
                                rc = PTR_ERR(lso);
                                goto next;
                        }

Now note that lso is already NULL - meaning we reset nonzero rc into zero in quite a roundabout way.
Are you sure this is what was desired? I think we should just reuse the rc with the error instead?



 Comments   
Comment by Gerrit Updater [ 20/Aug/15 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16042
Subject: LU-7025 lfsck: Invalid return value assignment
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 91b228fa7fc04884848c4e4fb3407881626266ea

Comment by Gerrit Updater [ 24/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16042/
Subject: LU-7025 lfsck: Invalid return value assignment
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 604c7396b25c8e3a8e3ecf415d9f6f2bf1cbc6fd

Comment by Joseph Gmitter (Inactive) [ 24/Aug/15 ]

Patch has landed for 2.8.

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