[LU-1579] osd_declare_xattr_set() doesn't reserve credits for version set Created: 28/Jun/12  Updated: 18/Apr/13  Resolved: 13/Sep/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.3.0, Lustre 2.4.0

Type: Bug Priority: Minor
Reporter: Niu Yawei (Inactive) Assignee: Niu Yawei (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 4472

 Description   

In the osd_declare_xattr_set() for ldiskfs:

        if (strcmp(name, XATTR_NAME_VERSION) == 0) {
                /* no credits for version */
                return 0;
        }

So if a caller calls only dt_version_set() to set inode version, the reserved credits for this transaction will be zero. I think we'd reserve 1 block for version set.



 Comments   
Comment by Mikhail Pershin [ 28/Jun/12 ]

As I remember there is always inode update when version is changed. So this inode block is reserved and we don't need to reserve one more. Do you have in mind any case when it is not so?

Comment by Niu Yawei (Inactive) [ 28/Jun/12 ]

I'm not sure if there is any use cases for now, but in orion_quota, we'll use the version as quota index file version, and sometimes, we need to bump version only.

Comment by Alex Zhuravlev [ 28/Jun/12 ]

to be honest, I wouldn't worry about quota index files, because related transactions will be rather small...

Comment by Niu Yawei (Inactive) [ 28/Jun/12 ]

The problem is that if we don't reserve anything for set version, we may end up with an 0 credits journal handle (and trigger LBUG in jbd) for the caller who calls declare_version_set() -> dt_version_set() only.

An alternative is that we can call some other declare functions before dt_version_set(), but which looks not clean.

Comment by Niu Yawei (Inactive) [ 29/Jun/12 ]

http://review.whamcloud.com/3242

Comment by Niu Yawei (Inactive) [ 13/Sep/12 ]

patch landed.

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