]> err.no Git - util-linux/commit
fdisk: sleep-after-sync and fsync usage
authorKarel Zak <kzak@redhat.com>
Wed, 6 Jan 2010 10:12:43 +0000 (11:12 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Jan 2010 10:12:43 +0000 (11:12 +0100)
commite90709421ac86e2e81498143f75734e0b79f76d1
treeee6cac22d8b65cea4b9363b3a5371a70dd24c16d
parent999a10fa770deac2e2d80dcedff50219f681db87
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>
fdisk/cfdisk.c
fdisk/fdisk.c
fdisk/sfdisk.c