From 7a0abc3776cd0bb82d09ffcf235537413e1491f0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 21 Jan 2009 10:42:57 -0800 Subject: [PATCH] uclient: flush/release buffered data on umount --- src/client/Client.cc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index c342e59e56aaf..d48638092bbaf 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2429,25 +2429,8 @@ int Client::unmount() lru.lru_set_max(0); trim_cache(); - // flush delayed caps - xlist::iterator p = delayed_caps.begin(); - while (!p.end()) { - Inode *in = *p; - ++p; - delayed_caps.pop_front(); - check_caps(in, true); - } - - // other caps, too - p = cap_list.begin(); - while (!p.end()) { - Inode *in = *p; - ++p; - check_caps(in, true); - } - if (g_conf.client_oc) { - // release any/all caps + // flush/release all buffered data hash_map::iterator next; for (hash_map::iterator p = inode_map.begin(); p != inode_map.end(); @@ -2468,6 +2451,23 @@ int Client::unmount() } } + // flush delayed caps + xlist::iterator p = delayed_caps.begin(); + while (!p.end()) { + Inode *in = *p; + ++p; + delayed_caps.pop_front(); + check_caps(in, true); + } + + // other caps, too + p = cap_list.begin(); + while (!p.end()) { + Inode *in = *p; + ++p; + check_caps(in, true); + } + //if (0) {// hack while (lru.lru_get_size() > 0 || !inode_map.empty()) { -- 2.39.5