]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librgw: dir traversal state GC added
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 24 Dec 2015 17:45:16 +0000 (12:45 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:07:18 +0000 (12:07 -0500)
commit597f69d9538eb1b373611feaf5e96f0ec4c92605
treea09e0c88defb6e0da44571fda44c153b753929ae
parentb970fd005e835f8aeb6b3af2a1b4afbd50c31348
librgw: dir traversal state GC added

To minimize overhead, traversal events are modeled as a linear
sequence of fh_key, timestamp tuples.  GC operates out-of-line in
LIFO order, and includes a ref cycle.  If the matching directory
object can't be found by handle, it's already gone, and nothing
happens.

To avoid lock contention, scanning of the event sequence is done
in groups of 24 by default, but in groups of sequence/4 if the
event sequence grows larger than 500 events.

Push READDIR events on successful component readdir (bucket or
object listing partial result, as appropriate).

Revise locking, timestamp and update link count in all cases.  Link
counts are approximate (metadata to represent it is not stored).

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