]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: reset requested_max_size if file write is not wanted 34767/head
authorYan, Zheng <zyan@redhat.com>
Fri, 20 Mar 2020 05:15:45 +0000 (13:15 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 27 Apr 2020 10:30:09 +0000 (12:30 +0200)
commitff436bd6b39dce66ce0d948c37ad8d1fd686346c
tree7583c1fe65e00a8ec60fced8a50f712079a2d030
parente44d481069270099eb30ebdc453ea37004e0d203
client: reset requested_max_size if file write is not wanted

write can stuck at waiting for larger max_size in following sequence of
events:

- client opens a file and writes to position 'A' (larger than unit of
  max size increment)
- client closes the file handle and updates wanted caps (not wanting
  file write caps)
- client opens and truncates the file, writes to position 'A' again.

At the 1st event, client set inode's requested_max_size to 'A'. At the
2nd event, mds removes client's writable range, but client does not reset
requested_max_size. At the 3rd event, client does not request max size
because requested_max_size is already larger than 'A'.

Fixes: https://tracker.ceph.com/issues/44801
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 1d676851e3491c26d3bf543bf357731d11d82a85)
src/client/Client.cc