]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: move readahead ref get/put to obj constr 9374/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 10 Jun 2016 21:33:04 +0000 (17:33 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 10 Jun 2016 22:02:31 +0000 (18:02 -0400)
commitb5a0773259ce9f2ef44e8e6925ab11dc1a5e55e6
treee9b0093c2931b29896d4d1b0378e1ca4608c9b59
parent01c179bcce2dc8a269d78eb1be8198b12bd161f7
client: move readahead ref get/put to obj constr

The readahead context was incrementing the file handle reference count but only
decreasing in finish which is not called if readahead is a no-op.

This fixes a bug caught in testing where readahead was causing inode to become
disconnected:

    2016-06-10 19:46:48.953018 7f2a4351be80  1 client.4125 dump_inode: DISCONNECTED inode 10000000502 #10000000502 ref 110000000502.head(faked_ino=2307 ref=1 ll_ref=0 cap_refs={1024=0,2048=0,4096=0,8192=0} open={1=0,2=0} mode=100666 size=4194304/0 mtime=2016-06-10 19:29:45.107417 caps=-(0=pAsLsXsFscr) objectset[10000000502 ts 2/4012653 objects 0 dirty_or_tx 0] 0x7f2a24300d00)
    2016-06-10 19:46:48.953032 7f2a4351be80  2 client.4125 cache still has 0+155 items, waiting (for caps to release?)

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/client/Client.cc
src/client/Client.h