summaryrefslogtreecommitdiffstats
path: root/fsck/fsck.h
diff options
context:
space:
mode:
authorKarel Zak2010-10-26 12:58:32 +0200
committerKarel Zak2010-10-26 14:22:28 +0200
commitdd0bd943f94392d165c5903e271c966afb0d7b75 (patch)
treeaff9f3813365aa6d2b5948fc2078778fe40d0b13 /fsck/fsck.h
parentlibmount: optimize blkid_devno_to_devname() (diff)
downloadkernel-qcow2-util-linux-dd0bd943f94392d165c5903e271c966afb0d7b75.tar.gz
kernel-qcow2-util-linux-dd0bd943f94392d165c5903e271c966afb0d7b75.tar.xz
kernel-qcow2-util-linux-dd0bd943f94392d165c5903e271c966afb0d7b75.zip
fsck: add support for whole-disk locking (-l option)
This feature allows to call multiple independent fsck instances rather than use only one "fsck -A" process. The lock uses LOCK_EX flock(2). The lock request is ignored if the whole-disk is non-rotating disk. The verbose mode (-V) provides information about disk locking. Note that "fsck -l" does not care if the device is stacked, for example if you want to call "fsck -l /dev/md0" and "fsck -l /dev/md1" then the underlying devices will not be locked. The traditional "fsck -A" does not run in parallel for stacked devices. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fsck/fsck.h')
-rw-r--r--fsck/fsck.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fsck/fsck.h b/fsck/fsck.h
index d212622f1..5612b218a 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -58,6 +58,7 @@ struct fs_info {
struct fsck_instance {
int pid;
int flags;
+ int lock; /* flock()ed whole disk file descriptor or -1 */
int exit_status;
time_t start_time;
char * prog;