+ if (!fs->is_stub()) {
+
+ /* Note that we're checking a list of all
+ * sources across all snapshots with the list
+ * of sources used by this snapshot.
+ */
+
+ if (sources_used_by_this_snapshot.find (i->second) != sources_used_by_this_snapshot.end()) {
+ /* this source is in use by this snapshot */
+ sources_used_by_all_snapshots.insert (fs->path());
+ cerr << "Source from source list found in used_by_this_snapshot (" << fs->path() << ")\n";
+ } else {
+ cerr << "Source from source list NOT found in used_by_this_snapshot (" << fs->path() << ")\n";
+ /* this source is NOT in use by this snapshot
+ */
+
+ /* remove all related regions from RegionFactory master list
+ */
+
+ RegionFactory::remove_regions_using_source (i->second);
+
+ /* remove from our current source list
+ * also. We may not remove it from
+ * disk, because it may be used by
+ * other snapshots, but it isn't used inside this
+ * snapshot anymore, so we don't need a
+ * reference to it.
+ */
+
+ sources.erase (i);