Project

General

Profile

Bug #41310

client: lazyio synchronize does not get file size

Added by Sidharth Anupkrishnan about 1 month ago. Updated 2 days ago.

Status:
Pending Backport
Priority:
Urgent
Category:
Correctness/Safety
Target version:
Start date:
Due date:
% 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:

Description

LazyIO synchronize fails to do the task of making the propagated writes by other clients/fds visible to the current fd in the following situation:

1) write() by fda
2) lazyio_propagate() by fda
3) lazyio_synchronize() by fdb.
4) read() by fdb

In this scenario fdb is expected to read whatever is written by fda but it does not read anything (0 bytes returned). Upon debugging, it seems the read fails because the file size( in->size ) is still 0 during read() by fdb and hence returns without reading in this conditional in Client::_read_async():

if( off > in->size )
return 0;

Ideally the lazyio_synchronize() call before the read() should have taken care of this and hence should call a getattr(CEPH_STAT_CAP_SIZE) to update the in->size.


Related issues

Copied to fs - Backport #41887: mimic: client: lazyio synchronize does not get file size New
Copied to fs - Backport #41888: nautilus: client: lazyio synchronize does not get file size New

History

#1 Updated by Sidharth Anupkrishnan about 1 month ago

  • Pull request ID set to 29705

#2 Updated by Patrick Donnelly about 1 month ago

  • Subject changed from LazyIO synchronize does not work as expected to client: lazyio propagate does not update file size
  • Priority changed from Normal to Urgent
  • Target version set to v15.0.0
  • Start date deleted (08/16/2019)
  • Source set to Development
  • Backport set to nautilus,mimic

#3 Updated by Patrick Donnelly about 1 month ago

  • Subject changed from client: lazyio propagate does not update file size to client: lazyio synchronize does not get file size

#4 Updated by Patrick Donnelly 2 days ago

  • Status changed from New to Pending Backport

#5 Updated by Nathan Cutler 2 days ago

  • Copied to Backport #41887: mimic: client: lazyio synchronize does not get file size added

#6 Updated by Nathan Cutler 2 days ago

  • Copied to Backport #41888: nautilus: client: lazyio synchronize does not get file size added

Also available in: Atom PDF