]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw_file: v3: fix write-timer action
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 15 May 2017 21:30:29 +0000 (17:30 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Mon, 15 May 2017 21:37:26 +0000 (17:37 -0400)
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>
src/rgw/rgw_file.cc
src/rgw/rgw_file.h

index 3fe8ba055916fc03dc994cef99a583b601357ad0..db66f852f6217c92a37c9ac3774907f378e9aa54 100644 (file)
@@ -1150,6 +1150,8 @@ namespace rgw {
     int rc = write_finish(FLAG_LOCKED);
 
     flags &= ~FLAG_OPEN;
+    flags &= ~FLAG_STATELESS_OPEN;
+
     return rc;
   } /* RGWFileHandle::close */
 
index 433356344e271dcaf842e7f3460219c52c7ba912..d063b1a6c3c88d5711e1f46c5ae84da7ad539eeb 100644 (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);
       }
     };