GNOME Bugzilla – Bug 788326
Automount interference at resize
Last modified: 2017-10-10 01:17:30 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.
Created attachment 360647 [details] [review] Keep FS mounted while growing partition correction: unmounted to be *grown* (not shrunk)
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
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.