diff options
author | Karel Zak | 2010-01-06 11:12:43 +0100 |
---|---|---|
committer | Karel Zak | 2010-01-06 11:12:43 +0100 |
commit | e90709421ac86e2e81498143f75734e0b79f76d1 (patch) | |
tree | ee6cac22d8b65cea4b9363b3a5371a70dd24c16d /fdisk/fdisk.c | |
parent | mount: fix typo in mount.8 (diff) | |
download | kernel-qcow2-util-linux-e90709421ac86e2e81498143f75734e0b79f76d1.tar.gz kernel-qcow2-util-linux-e90709421ac86e2e81498143f75734e0b79f76d1.tar.xz kernel-qcow2-util-linux-e90709421ac86e2e81498143f75734e0b79f76d1.zip |
fdisk: sleep-after-sync and fsync usage
It seems that sleep() after sync() is unnecessary legacy. It's very
probably unnecessary since kernel 1.3.20. For example the libparted
does not to use sleep() at all.
It seems that more important is fsync() usage in fdisks. For more
details see
http://marc.theaimsgroup.com/?l=linux-kernel&m=105545785306867&w=3
http://marc.theaimsgroup.com/?l=linux-kernel&m=105545848607353&w=3
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369
Currently we use fsync() in fdisk only. This patch also add fsync() to
sfdisk and cfdisk.
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=502639
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index af525badd..5ef24f665 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -2519,7 +2519,6 @@ reread_partition_table(int leave) { i = fstat(fd, &statbuf); if (i == 0 && S_ISBLK(statbuf.st_mode)) { sync(); - sleep(2); #ifdef BLKRRPART printf(_("Calling ioctl() to re-read partition table.\n")); i = ioctl(fd, BLKRRPART); @@ -2550,7 +2549,6 @@ reread_partition_table(int leave) { printf(_("Syncing disks.\n")); sync(); - sleep(4); /* for sync() */ exit(!!i); } } |