-
Notifications
You must be signed in to change notification settings - Fork 3
0.30.8 #137
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This helper has been replaced by tmpdir-setup. Remove it.
Being tested on esodophobie |
Minor typos: realier → earlier; to cleanup → to clean up |
1d11d14
to
4c052e2
Compare
When mxqd restarts and finds finished jobs, it calls the tmpdir cleanup code for these jobs. As part of the recovery procedure, it later scans the system for any leftover mounts. When the regular tmpdir cleanup is done asynchronously, mxqd might discover a directory which is in the progress of being dismounted but still exists in which case it calls the tmpdir cleanup code a second time. There is no harm done, the jobs completed normally. The second attempted cleanup just produces some error messages in the logfile This bug is only triggered when jobs complete while mxqd is stopped. As the "old style" tmpdir setup is going away anyway, don't invent something complicated here and just do the cleanup synchronously.
Use a dm-device (linear target) between the filesystem and the loop device and then use this sequence for teardown: - fcntl EXT4_IOC_SHUTDOWN with EXT4_GOING_FLAGS_NOLOGFLUSH - dmestup reload $dmname --table "0 $sectors zero" - dmsetup resume $dmname --noflush - umount $mountpoint - dmsetup remove --deferred $dmname - rmdir $mountpoint The zero target prevents any real writes to the block device. However, if the filesystems reads back some data, it will get zeros, which could lead to all kinds of random behaviour. For this reason, we shut down the filesystem, which has the additional advantage, that some I/O is prevented in an even ealier stage. Shutdown alone, however, would not prevent all I/O (e.g. not cache writeback or superblock write), so we still need the zero target. Even with this setting, ext4 sometimes logs some errors ("ext4_writepages: jbd2_start: XXX pages, ino YYY; err -5"). We've patched our kernel to avoid that message if the filesystem is shut down. This goes on top of the patches which avoid the usual "mounted" and "unmounted" messages for ext4. To support rolling upgrades of mxqd, keep support to clean up mounts created the old way, which is to mount a loop device directly.
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to avoid extensive logging.