mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
client: unmount cleanup
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
parent
f3c90f8d16
commit
1545d03c5a
@ -3292,18 +3292,12 @@ void Client::unmount()
|
||||
put_inode(cwd);
|
||||
cwd = NULL;
|
||||
|
||||
// NOTE: i'm assuming all caches are already flushing (because all files are closed).
|
||||
|
||||
// clean up any unclosed files
|
||||
if (!fd_map.empty())
|
||||
ldout(cct, 0) << "Warning: Some files were not closed prior to unmounting; closing them now" << dendl;
|
||||
while (!fd_map.empty()) {
|
||||
int fd = fd_map.begin()->first;
|
||||
assert(fd_map.count(fd));
|
||||
Fh *fh = fd_map[fd];
|
||||
Fh *fh = fd_map.begin()->second;
|
||||
fd_map.erase(fd_map.begin());
|
||||
ldout(cct, 0) << " destroying lost open file " << fh << " on " << *fh->inode << dendl;
|
||||
_release_fh(fh);
|
||||
fd_map.erase(fd);
|
||||
}
|
||||
|
||||
_ll_drop_pins();
|
||||
|
Loading…
Reference in New Issue
Block a user