summaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-04-01 09:33:46 -0700
committerSage Weil <sage@newdream.net>2010-04-01 09:34:38 -0700
commit819ccbfa448403992ceafc05d6d7097aaa74d4c3 (patch)
treee6b3592fd85fbb35a63d6d10c84a8d01913eddab /fs/ceph/messenger.c
parent6298a33757ba7361bb8f506c106daad77e5ac8cf (diff)
downloadblackbird-obmc-linux-819ccbfa448403992ceafc05d6d7097aaa74d4c3.tar.gz
blackbird-obmc-linux-819ccbfa448403992ceafc05d6d7097aaa74d4c3.zip
ceph: fix leaked inode ref due to snap metadata writeback race
We create a ceph_cap_snap if there is dirty cap metadata (for writeback to mds) OR dirty pages (for writeback to osd). It is thus possible that the metadata has been written back to the MDS but the OSD data has not when the cap_snap is created. This results in a cap_snap with dirty(caps) == 0. The problem is that cap writeback to the MDS isn't necessary, and a FLUSHSNAP cap op gets no ack from the MDS. This leaves the cap_snap attached to the inode along with its inode reference. Fix the problem by dropping the cap_snap if it becomes 'complete' (all pages written out) and dirty(caps) == 0 in ceph_put_wrbuffer_cap_refs(). Also, BUG() in __ceph_flush_snaps() if we encounter a cap_snap with dirty(caps) == 0. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud