Lines Matching refs:volume

25 		: fLock("volume event queue"),
28 fCounterSem = create_sem(0, "volume event count");
101 : Locker("volume manager"),
134 const char* parameters, int32 len, Volume** volume)
166 // create the volume event queue
177 "volume event deliverer", B_NORMAL_PRIORITY, this);
180 "volume event deliverer", B_NORMAL_PRIORITY, this);
185 // create the root volume
196 // add the root volume
203 // mount the root volume
212 *volume = rootVolume;
229 "root volume!\n"));
249 // The caller must have a reference to the volume and retains it.
251 VolumeManager::AddVolume(Volume* volume)
253 if (!volume)
258 if (fVolumes->Contains(volume))
261 // add the volume
262 return fVolumes->Add(volume);
270 Volume* volume = fNodeIDs2Volumes->Get(nodeID);
271 if (volume && GetVolume(volume))
272 return volume;
278 VolumeManager::GetVolume(Volume* volume)
280 if (!volume)
284 if (fVolumes->Contains(volume)) {
286 volume->AcquireReference();
287 return volume;
296 VolumeManager::PutVolume(Volume* volume)
298 if (!volume)
301 // If the volume is marked unmounting and is not yet marked removed, we
306 //volume, volume->CountReferences()));
307 if (volume->IsUnmounting() && !volume->IsRemoved()) {
309 //"removed and removing all nodes.\n", volume));
311 volume->MarkRemoved();
313 // get parent volume
314 Volume* parentVolume = volume->GetParentVolume();
321 volume->PrepareToUnmount();
323 // remove from parent volume
325 parentVolume->RemoveChildVolume(volume);
331 // If the volume is marked removed and it's reference count drops to 0,
335 if (volume->ReleaseReference() && volume->IsRemoved()) {
336 PRINT("VolumeManager::PutVolume(%p): Removed volume "
337 "unreferenced. Unmounting...\n", volume);
338 // remove from volume set -- now noone can get a reference to it
340 fVolumes->Remove(volume);
344 // unmount and delete the volume
345 // TODO: At some point all the volume's node IDs have to be removed from
346 // fNodeIDs2Volumes. For the time being we expect the volume to do that itself
348 volume->Unmount();
349 delete volume;
356 VolumeManager::NewNodeID(Volume* volume)
358 if (!volume)
363 status_t error = fNodeIDs2Volumes->Put(nodeID, volume);
399 if (Volume* volume = GetVolume(event->GetTarget())) {
400 volume->HandleEvent(event);
401 PutVolume(volume);