diff --git a/headers/os/drivers/fs_interface.h b/headers/os/drivers/fs_interface.h index 299e779231..14227120f6 100644 --- a/headers/os/drivers/fs_interface.h +++ b/headers/os/drivers/fs_interface.h @@ -54,6 +54,7 @@ typedef struct fs_vnode_ops fs_vnode_ops; struct fs_volume { dev_t id; + partition_id partition; int32 layer; void* private_volume; fs_volume_ops* ops; diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 98b8eb339d..2ea6919d5d 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -6284,7 +6284,7 @@ fs_mount(char *path, const char *device, const char *fsName, uint32 flags, // Write lock the partition's device. For the time being, we keep the lock // until we're done mounting -- not nice, but ensure, that no-one is // interfering. - // TODO: Find a better solution. + // TODO: Just mark the partition busy while mounting! KDiskDevice *diskDevice = NULL; if (partition) { diskDevice = ddm->WriteLockDevice(partition->Device()->ID()); @@ -6364,6 +6364,7 @@ fs_mount(char *path, const char *device, const char *fsName, uint32 flags, mount->owns_file_device = false; mount->volume->id = mount->id; + mount->volume->partition = partition != NULL ? partition->ID() : -1; mount->volume->layer = 0; mount->volume->private_volume = NULL; mount->volume->ops = NULL;