Project

General

Profile

Actions

Bug #41310

closed

client: lazyio synchronize does not get file size

Added by Sidharth Anupkrishnan over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Urgent
Category:
Correctness/Safety
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 (v1):
Crash signature (v2):

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 2 (0 open2 closed)

Copied to CephFS - Backport #41887: mimic: client: lazyio synchronize does not get file sizeRejectedPatrick DonnellyActions
Copied to CephFS - Backport #41888: nautilus: client: lazyio synchronize does not get file sizeResolvedNathan CutlerActions
Actions

Also available in: Atom PDF