Project

General

Profile

Actions

Bug #63632

closed

client: fh obtained using O_PATH can stall the caller during async I/O

Added by Dhairya Parmar 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

If `O_PATH` flag is used with the call to obtain a fh; the internal function handling async I/O does check for the O_PATH flag and returns EBADF (since no I/O operations are directly possible with the fh obtained using `O_PATH` flag) but doesn't take care of the callback and the caller gets stalled, therefore complete the context while returning EBADF in Client::_preadv_pwritev_locked():

int64_t Client::_preadv_pwritev_locked(Fh *fh, const struct iovec *iov,
                                       unsigned iovcnt, int64_t offset,
                                       bool write, bool clamp_to_int,
                                       Context *onfinish, bufferlist *blp,
                                       bool do_fsync, bool syncdataonly)
{
ceph_assert(ceph_mutex_is_locked_by_me(client_lock));

#if defined(__linux__) && defined(O_PATH)
    if (fh->flags & O_PATH)
        return -CEPHFS_EBADF;

Related issues 1 (0 open1 closed)

Related to CephFS - Bug #63734: client: handle callback when async io failsResolvedDhairya Parmar

Actions
Actions #1

Updated by Dhairya Parmar 6 months ago

  • Category set to Correctness/Safety
  • Target version set to v19.0.0
  • Source set to Development
  • Backport set to quincy,reef
  • Component(FS) Client added
Actions #2

Updated by Dhairya Parmar 5 months ago

  • Status changed from New to In Progress
  • Assignee set to Dhairya Parmar
  • Pull request ID set to 54673
Actions #3

Updated by Xiubo Li 5 months ago

  • Status changed from In Progress to Fix Under Review
Actions #4

Updated by Dhairya Parmar 5 months ago

  • Status changed from Fix Under Review to Closed
Actions #5

Updated by Dhairya Parmar 5 months ago

  • Related to Bug #63734: client: handle callback when async io fails added
Actions

Also available in: Atom PDF