]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: v3: fix write-timer action 15456/head
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 15 May 2017 21:30:29 +0000 (17:30 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 19 Jun 2017 18:04:27 +0000 (20:04 +0200)
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>
(cherry picked from commit ce6ecb553b85ea158af28c22827b93135a75d159)

src/rgw/rgw_file.cc
src/rgw/rgw_file.h

index 595e6a48711b9f4fbfcdee7af71eb50e62ba2fef..7d77a137b07d1a91b345564dbba8b78fa33c21d4 100644 (file)
@@ -1101,6 +1101,8 @@ namespace rgw {
     int rc = write_finish(FLAG_LOCKED);
 
     flags &= ~FLAG_OPEN;
+    flags &= ~FLAG_STATELESS_OPEN;
+
     return rc;
   } /* RGWFileHandle::close */
 
index 7bc62785ed510f95db45db5e5841009d3028b9da..834a156e5d786d63d6b223cb15faeca2838aaf07 100644 (file)
@@ -770,7 +770,7 @@ namespace rgw {
       }
 
       void operator()() {
-       rgw_fh.write_finish();
+       rgw_fh.close(); /* will finish in-progress write */
        rgw_fh.get_fs()->unref(&rgw_fh);
       }
     };