• S
    ceph: throw out dirty caps metadata, data on session teardown · 6c99f254
    Sage Weil 提交于
    The remove_session_caps() helper is called when an MDS closes out our
    session (either normally, or as a result of a failed reconnect), and when
    we tear down state for umount.  If we remove the last cap, and there are
    no cap migrations in progress, then there is little hope of us flushing
    out that data to the mds (without heroic efforts to reconnect and flush).
    
    So, to avoid leaving inodes pinned (due to dirty state) and crashing after
    umount, throw out dirty caps state and unpin the inodes.  Print a warning
    to the console so we know something was lost.
    
    NOTE: Although we drop wrbuffer refs, we don't actually mark pages clean;
    maybe a truncate should be queued?
    Signed-off-by: NSage Weil <sage@newdream.net>
    6c99f254
mds_client.c 78.0 KB