]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: fix timestamp on create (another case)
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 14 Jan 2016 22:25:45 +0000 (17:25 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:08:03 +0000 (12:08 -0500)
In the rgw_create regular file case, the timestamp and size update
logic (though present) was being bypassed because the "FLAG_CREATE"
indicator which formerly propagated up from RGWLibFS::lookup_fh
was lost in the LRU change, which refactored the code for creating
new RGWFileHandle objects.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.h

index db928fbb84920e0474a7d3057bf9bf05d9868931..f1a4265b922c6ebaa1971c49177db471178ab930 100644 (file)
@@ -703,6 +703,7 @@ namespace rgw {
                        cohort::lru::FLAG_INITIAL));
        if (fh) {
          fh_cache.insert_latched(fh, lat, RGWFileHandle::FHCache::FLAG_UNLOCK);
+         get<1>(fhr) |= RGWFileHandle::FLAG_CREATE;
          goto out; /* !LATCHED */
        } else {
          lat.lock->unlock();