After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788326 - Automount interference at resize
Automount interference at resize
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-29 07:32 UTC by Kai Lüke
Modified: 2017-10-10 01:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Keep FS mounted while growing partition (10.60 KB, patch)
2017-09-29 07:41 UTC, Kai Lüke
reviewed Details | Review
Keep FS mounted while growing partition (10.58 KB, patch)
2017-09-29 15:47 UTC, Kai Lüke
committed Details | Review

Description Kai Lüke 2017-09-29 07:32:18 UTC
When a filesystem is resized by offline growing and the partiton is enlargened, the GVFs automount is executed at the same time as the filesystem should be resized. This is due to the fact that the partition and its filesystem is newly discovered in UDisks.
If the mounting is faster this leads to a failing resize operation.

As this would require changes in UDisks logic of processing udev events the best way to solve it, I think, is to just leave this corner case away and do the same thing as in the online grow procedure:

Let the filesystem mounted while enlargening the partition. This causes no problems because the kernel gets notified about the changed partition size. Because the filesystem is mounted there is no automount due to discovering the partition anew.
After the partition is grown the filesystem needs to be unmounted to be shrunk and in the following operations trigger no new discovery which would lead to automounts.

The patch takes also care of the corner case when the user unmounts the filesystem while the dialog is open and will not remount it if it would be unmounted directly for shrinking.
Comment 1 Kai Lüke 2017-09-29 07:41:32 UTC
Created attachment 360647 [details] [review]
Keep FS mounted while growing partition

correction: unmounted to be *grown* (not shrunk)
Comment 2 Ondrej Holy 2017-09-29 13:14:28 UTC
Review of attachment 360647 [details] [review]:

Makes sense and looks ok apart from one nitpick. However FAT resizing looks pretty broken currently, it is hard to resize without error (regardless of this patch) :-(

::: src/disks/gduresizedialog.c
@@ +984,2 @@
             }
+

Probably unwanted
Comment 3 Kai Lüke 2017-09-29 15:47:41 UTC
Created attachment 360675 [details] [review]
Keep FS mounted while growing partition

Thanks, will commit without the empty line.

Yes, I've tried to come up with a good bug report on FAT resize in UDisks/libblockdev besides "it's sometimes broken", but I've not found a good reproducible test case script today to narrow down where something goes wrong.