Project

General

Profile

Bug #19912

kcephfs: Test failure: test_trim_caps

Added by Zheng Yan 7 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/12/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Component(FS):
Needs Doc:
No

Description

http://qa-proxy.ceph.com/teuthology/teuthology-2017-05-11_05:20:03-kcephfs-kraken-testing-basic-smithi/1122976/

    def test_trim_caps(self):
        # Trim capability when reconnecting MDS
        # ===================================

        count = 500
        # Create lots of files
        for i in range(count):
            self.mount_a.run_shell(["touch", "f{0}".format(i)])

        # Populate mount_b's cache
        self.mount_b.run_shell(["ls"])

        client_id = self.mount_b.get_global_id()
        num_caps = self._session_num_caps(client_id)
        self.assertGreaterEqual(num_caps, count)

the kernel client releases caps immediately after receiving the readdir reply. The reason inode gets released immediately is that linking the inode to dentry causes deadlock. (d_splice_alias() calls security_d_instantiate(), which calls calls getxattr(). deadlock happens if we send request inside the dispatch thread)

in ceph_readdir_prepopulate()

                if (d_really_is_negative(dn)) {
                        struct dentry *realdn;

                        if (ceph_security_xattr_deadlock(in)) {
                                dout(" skip splicing dn %p to inode %p" 
                                     " (security xattr deadlock)\n", dn, in);
                                iput(in);
                                skipped++;
                                goto next_item;
                        }

                        realdn = splice_dentry(dn, in);
                        if (IS_ERR(realdn)) {
                                err = PTR_ERR(realdn);
                                d_drop(dn);
                                dn = NULL;
                                goto next_item;
                        }
                        dn = realdn;
                }

History

#1 Updated by Zheng Yan 7 months ago

  • Status changed from New to Need Review

#2 Updated by John Spray 6 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF