Project

General

Profile

Bug #44021

client: bad error handling in Client::_lseek

Added by Jeff Layton 10 months ago. Updated 7 months ago.

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

0%

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

Description

The SEEK_HOLE and SEEK_DATA error handling looks broken in the userland client:

  case SEEK_DATA:                                                               
    if (offset < 0 || static_cast<uint64_t>(offset) >= in->size) {              
      r = -ENXIO;                                                               
      return offset;                                                            
    }                                                                           
    pos = offset;                                                               
    break;                                                                      

  case SEEK_HOLE:                                                               
    if (offset < 0 || static_cast<uint64_t>(offset) >= in->size) {              
      r = -ENXIO;                                                               
      pos = offset;                                                             
    } else {                                                                    
      pos = in->size;                                                           
    }                                                                           
    break;                                                                      

Both of the cases where we have "r = -ENXIO" should probably be just "return -ENXIO".


Related issues

Copied to CephFS - Backport #44328: nautilus: client: bad error handling in Client::_lseek Resolved
Copied to CephFS - Backport #44329: mimic: client: bad error handling in Client::_lseek Rejected

History

#1 Updated by Patrick Donnelly 9 months ago

  • Subject changed from bad error handling in Client::_lseek to client: bad error handling in Client::_lseek
  • Status changed from New to Fix Under Review
  • Target version set to v15.0.0
  • Source set to Development
  • Backport set to nautilus,mimic
  • Pull request ID set to 33480
  • Component(FS) Client added

#2 Updated by Patrick Donnelly 9 months ago

  • Status changed from Fix Under Review to Pending Backport

#3 Updated by Nathan Cutler 9 months ago

  • Copied to Backport #44328: nautilus: client: bad error handling in Client::_lseek added

#4 Updated by Nathan Cutler 9 months ago

  • Copied to Backport #44329: mimic: client: bad error handling in Client::_lseek added

#5 Updated by Nathan Cutler 7 months ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF