[LU-4310]  __dquot_alloc_space() does not release i_lock in some cases Created: 26/Nov/13  Updated: 31/Dec/13  Resolved: 10/Dec/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0
Fix Version/s: Lustre 2.6.0, Lustre 2.4.2, Lustre 2.5.1

Type: Bug Priority: Blocker
Reporter: Johann Lombardi (Inactive) Assignee: Johann Lombardi (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 11804

 Description   

The patch removing the dqptr sem seems to have introduced a regression. In __dquot_alloc_space(), the i_lock is not released if we exit through the goto out_flush_warn.

int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
...
        spin_lock(&inode->i_lock);
...
        spin_lock(&dq_data_lock);
...
                if (check_bdq(dquot[cnt], number, warn, warntype+cnt)
                    == NO_QUOTA && !nofail) {
                        ret = NO_QUOTA;
                        spin_unlock(&dq_data_lock);
                        goto out_flush_warn;
                }
...
out_flush_warn:
        flush_warnings(dquot, warntype);
        for (cnt = 0; cnt < MAXQUOTAS; cnt++)
                dqput(dquot[cnt]);
out:
        return ret;
}

Many thanks to Andrew Perepechko for reporting the problem.



 Comments   
Comment by Niu Yawei (Inactive) [ 26/Nov/13 ]

patch for RHEL: http://review.whamcloud.com/8400

Hi, Bob

I don't have SLES kernel by hand, I see you just upload a fix for the sles quota patch (LU-4285), could you please make this fix for sles? Thanks in advance.

Comment by Andreas Dilger [ 29/Nov/13 ]

RHEL patch landed, trial patch for the SLES kernels http://review.whamcloud.com/8438 (hand-edited, but Jenkins build will tell us if they apply correctly).

Comment by Jian Yu [ 29/Nov/13 ]

patch for RHEL: http://review.whamcloud.com/8400

Back-ported to Lustre b2_4 branch: http://review.whamcloud.com/8442

Comment by Jian Yu [ 03/Dec/13 ]

The patch landed on Lustre b2_4 branch for 2.4.2.

Comment by Jodi Levi (Inactive) [ 04/Dec/13 ]

can this ticket be closed?

Comment by James A Simmons [ 04/Dec/13 ]

We still need the patch to land to 2.5. Also their are separate SLES11 SP2 patches to back port to b2_4 and b2_5

Comment by Peter Jones [ 10/Dec/13 ]

Landed for 2.4.2 and 2.6. Will be landed for 2.5.1 when work commences on that release

Comment by Niu Yawei (Inactive) [ 17/Dec/13 ]

backport sles patch from Andreas to b2_4: http://review.whamcloud.com/8600

Comment by Niu Yawei (Inactive) [ 17/Dec/13 ]

rh patch for b2_5: http://review.whamcloud.com/8601
sles patch for b2_5: http://review.whamcloud.com/8602

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