Details
- Reviewers
stikonas cjlcarvalho
Diff Detail
- Repository
- R16 KPMCore
- Branch
- fs
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 11904 Build 11922: arc lint + arc unit
src/fs/btrfs.cpp | ||
---|---|---|
183 | This code should go to filesystem.cpp, it's not btrfs specific. |
Also in general, I think we should create a bool variable where we store data, so that we only run this
src/fs/btrfs.cpp | ||
---|---|---|
171–173 | I think the issue is that there might some other mount point that is read only even though this mountPoint is RW |
src/fs/filesystem.cpp | ||
---|---|---|
564 | I think the code does not yet do the correct thing. In this part of code you scan all volumes on the system. If there is any volume which is mounted read-only, then this isReadOnly function will return true for all filesystems, so you won't be able to resize any file system. What we wnat to look over is mount points for given volume, not all mount points on the system. |
Sorry for typos, What I meant was:
What we want to loop over is mount points for given volume, not all mount points on the system.
Let's say I have the following devices
/dev/sda1 and /dev/sda2.
Let's assume I mount /dev/sda1 to /mnt as read only.
Then let's say /dev/sda2 is the partition I want to resize. Your code will not let me resize /dev/sda2 even though it has no read only mounts.
This happens just because /dev/sda1 was mounted read only as it will be listed in QStorageInfo::mountedVolumes even though /dev/sda1
has nothing to do with /dev/sda2.
What we want to prevent, is if /dev/sda1 is mounted as read-only to /mnt1 (there might or might not be more read-write mounts /mnt2, /mnt3...). We want to disable resizing in this case.