[LU-7064] llog_cancel_rec() does not detect errors from llog_declare_destroy() Created: 31/Aug/15  Updated: 02/Jun/16  Resolved: 02/Jun/16

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: easy, patch

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In llog_cancel_rec() the return values of llog_declare_destroy() and llog_write_rec() are never used:

        if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY))
                rc = llog_declare_destroy(env, loghandle, th);

        th->th_wait_submit = 1;
        rc = dt_trans_start_local(env, dt, th);
        if (rc < 0)
                GOTO(out_trans, rc);

...

        rc = llog_write_rec(env, loghandle, &llh->llh_hdr, NULL,
                            LLOG_HEADER_IDX, th);
        if (rc == 0)
                loghandle->lgh_hdr->llh_count--;
        else
                ext2_set_bit(index, LLOG_HDR_BITMAP(llh));

        if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) &&
            (llh->llh_count == 1) &&
            (loghandle->lgh_last_idx == LLOG_HDR_BITMAP_SIZE(llh) - 1)) {
                rc = llog_trans_destroy(env, loghandle, th);


 Comments   
Comment by Gerrit Updater [ 14/Jan/16 ]

Parinay Kondekar (parinay.kondekar@seagate.com) uploaded a new patch: http://review.whamcloud.com/17999
Subject: LU-7064 detect errors from llog_declare_destroy()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8151a65b2d3b047e440fffe049221faa3df38423

Comment by parinay v kondekar (Inactive) [ 14/Jan/16 ]

git hash 339e9adc - LU-6968 takes care of return value from llog_write_rec() .

Comment by Gerrit Updater [ 02/Jun/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17999/
Subject: LU-7064 obd: detect errors from llog_declare_destroy()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5d9275e2784942266f2c9cd03f9ad2f17fba0af4

Comment by Peter Jones [ 02/Jun/16 ]

Landed for 2.9

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