rgw_file: v3: fix write-timer action

For now, unify with v4 write-on-close path, by calling
RGWFileHandle::close() on write-timer expire, since it will
call write_finish() as a side-effect.

Fixes: http://tracker.ceph.com/issues/19932

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Matt Benjamin 2017-05-15 17:30:29 -04:00
parent 880dde8e47
commit ce6ecb553b
2 changed files with 3 additions and 1 deletions

View File

@ -1150,6 +1150,8 @@ namespace rgw {
int rc = write_finish(FLAG_LOCKED);
flags &= ~FLAG_OPEN;
flags &= ~FLAG_STATELESS_OPEN;
return rc;
} /* RGWFileHandle::close */

View File

@ -778,7 +778,7 @@ namespace rgw {
}
void operator()() {
rgw_fh.write_finish();
rgw_fh.close(); /* will finish in-progress write */
rgw_fh.get_fs()->unref(&rgw_fh);
}
};