summaryrefslogtreecommitdiff
path: root/src/core/umount.c
AgeCommit message (Collapse)Author
2014-06-24use more _cleanup_ macroRonny Chevalier
2014-06-05umount: modernizationsLennart Poettering
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.
2014-02-17core: more exact test on the procfs special string "(deleted)"Jan Engelhardt
In other parts of systemd, the code checks for " (deleted)", but in one instance, it did not (yet). Make it do the same.
2013-12-18core,logind: libudev usage modernizationsLennart Poettering
Always use cleanup logic and don't eat up errors returned by libudev
2013-10-14list: make our list macros a bit easier to use by not requring type spec on ↵Lennart Poettering
each invocation We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use.
2013-10-13Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-15Fix spelling errors using 'codespell' toolAnatol Pomozov
2013-04-05Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek
Before, we would initialize many fields twice: first by filling the structure with zeros, and then a second time with the real values. We can let the compiler do the job for us, avoiding one copy. A downside of this patch is that text gets slightly bigger. This is because all zero() calls are effectively inlined: $ size build/.libs/systemd text data bss dec hex filename before 897737 107300 2560 1007597 f5fed build/.libs/systemd after 897873 107300 2560 1007733 f6075 build/.libs/systemd … actually less than 1‰. A few asserts that the parameter is not null had to be removed. I don't think this changes much, because first, it is quite unlikely for the assert to fail, and second, an immediate SEGV is almost as good as an assert.
2013-03-31ModernizationZbigniew Jędrzejewski-Szmek
Use _cleanup_ and wrap lines to ~80 chars and such.
2013-01-20shutdown: loop - convert to enumerate matchKay Sievers
2013-01-16shutdown: ignore loop devices without a backing fileKay Sievers
2013-01-16shutdown: in the final umount loop don't use MNT_FORCELennart Poettering
MNT_FORCE is honoured by NFS and FUSE and allows unmounting of the FS even if consumers still use it. For our brute-force loop we rely on EBUSY being reported as long as a file system is still used by a loopback device or suchlike. Hence, drop MNT_FORCE to make EBUSY reliable.
2012-12-07shutdown, umount: use verbs consistentlyMichal Schmidt
Mounts are "unmounted". Swaps are "deactivated", not "turned off" nor "disabled". Loop and DM devices are "detached", not "deleted". Especially the deleting sounded a bit scary.
2012-12-07shutdown, umount: logging improvementsMichal Schmidt
In bugreports about hangs during the late shutdown we are often missing important information - what were we trying to unmount/detach when it hung. Instead of printing what we successfully unmounted, print what we are going to unmount/detach. And add messages to mark the completion of categories (mount/swap/loop/DM).
2012-12-07umount: fix check for DM changedMichal Schmidt
delete_dm() returns 0 on success. The check for "r > 0" was likely a copy&paste error from the loopback code where "r > 0" makes sense.
2012-11-28shutdown: fix typoHermann Gausterer
2012-11-28shutdown: don't consider umounting of / and /usr failedTom Gundersen
In the words of Homer: If you don't try, you can't fail. This is a revert of 9279749b84cc87c7830280b7895a48bed03c9429. It used to be necessary to consider the umounting failed to make sure / and /usr were remounted read-only, but that is no longer necessary as everything is now remounted read-only anyway. Moreover, this avoids a warning at shutdown saying a filesystem was not unmounted. As the umounting of / is never attempted there was no corresponding warning message saying which fs that failed. This caused some spurious bug-reports from concerned users. Cc: Michael Biebl <biebl@debian.org>
2012-11-16umount: always remount read-only before unmounting in final shutdown loopLennart Poettering
2012-09-03shutdown: don't attempt read-only mounts in a containerLennart Poettering
2012-08-13umount: MS_MGC_VAL is so 90sLennart Poettering
2012-05-30shutdown: Don't skip bind mounts on shutdownDaniel Drake
This reverts commits d72238fcb34abc81aca97c5fb15888708ee937d3 and f3accc08. OLPC runs / as a bind-mount, so this must be remounted RO during shutdown to avoid corruption. As Lennert can't recall the exact reasons for making the shutdown code skip bind mounts, revert to previous behaviour to solve the issue for OLPC. http://lists.freedesktop.org/archives/systemd-devel/2012-April/004957.html
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-12shutdown: move shutdown to core since it replaces PID 1Lennart Poettering