Project

General

Profile

Actions

Bug #9995

closed

failing test_filelock

Added by Greg Farnum over 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Actions #1

Updated by Zheng Yan over 9 years ago

  • Status changed from New to Won't Fix

it's a bug in old version of libfuse, it calls our setlk callback for both fcntl setlk and flock requests

Actions #2

Updated by Greg Farnum over 9 years ago

  • Status changed from Won't Fix to 12

Is there something we can do as a workaround to prevent this blocking things? I expect people are going to use new ceph-fuse with old kernels. And our nightlies are going to keep turning up errors. :(

Oh, looking at it a bit more, you must mean that FUSE prior to 2.9 is translating flock calls into setlk calls? Why would that break our interfaces?

Actions #3

Updated by Zheng Yan over 9 years ago

static void do_setlk_common(fuse_req_t req, fuse_ino_t nodeid,
                            const void *inarg, int sleep)
{       
        struct fuse_lk_in *arg = (struct fuse_lk_in *) inarg;
        struct fuse_file_info fi;
        struct flock flock;

        memset(&fi, 0, sizeof(fi));
        fi.fh = arg->fh;
        fi.lock_owner = arg->owner;

        if (arg->lk_flags & FUSE_LK_FLOCK) {
                int op = 0;

                switch (arg->lk.type) {
                case F_RDLCK:
                        op = LOCK_SH;
                        break;
                case F_WRLCK:
                        op = LOCK_EX;
                        break;
                case F_UNLCK:
                        op = LOCK_UN;
                        break;
                }
                if (!sleep)
                        op |= LOCK_NB;

                if (req->f->op.flock)
                        req->f->op.flock(req, nodeid, &fi, op);
                else    
                        fuse_reply_err(req, ENOSYS);
        } else {
                convert_fuse_file_lock(&arg->lk, &flock);
                if (req->f->op.setlk)
                        req->f->op.setlk(req, nodeid, &fi, &flock, sleep);
                else    
                        fuse_reply_err(req, ENOSYS);
        }
}

old libfuse does not recognize FUSE_LK_FLOCK. I think we can't do anything with this bug.

Actions #4

Updated by Greg Farnum over 9 years ago

  • Assignee deleted (Zheng Yan)

We'll need to update the test then so that it detects this situation and aborts quietly instead of raising an error.

Actions #6

Updated by Zheng Yan over 9 years ago

  • Status changed from 12 to 7
Actions #7

Updated by Zheng Yan over 9 years ago

  • Status changed from 7 to Resolved
Actions #8

Updated by Greg Farnum almost 9 years ago

  • Status changed from Resolved to 12
  • Assignee set to Greg Farnum

I'm going to add something so the test IDs old FUSE and quits nicely instead of failing: http://pulpito.ceph.com/teuthology-2015-04-20_23:04:01-fs-master-testing-basic-multi/856815/

Actions #9

Updated by Greg Farnum almost 9 years ago

  • Priority changed from Urgent to High
Actions #10

Updated by Greg Farnum almost 9 years ago

  • Status changed from 12 to Fix Under Review
Actions #11

Updated by Greg Farnum almost 9 years ago

  • Status changed from Fix Under Review to Resolved
  • Regression set to No

Finally merged in ceph-qa-suite commit:8eb3255a4c5c62720cf5c749032cbeccc4f9b264

Actions

Also available in: Atom PDF