ceph: update the 'approaching max_size' code

The old 'approaching max_size' code expects MDS set max_size to
'2 * reported_size'. This is no longer true. The new code reports
file size when half of previous max_size increment has been used.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Yan, Zheng
2017-05-22 12:03:32 +08:00
committed by Ilya Dryomov
parent 84eea8c790
commit efb0ca765a
5 changed files with 23 additions and 11 deletions

View File

@@ -1040,8 +1040,8 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
int num_pages;
int written = 0;
int flags;
int check_caps = 0;
int ret;
bool check_caps = false;
struct timespec mtime = current_time(inode);
size_t count = iov_iter_count(from);