From: Andrew Morton <akpm@digeo.com>
To: Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Changes made by fdisk not being written to disk (2.5-bk)
Date: Thu, 12 Jun 2003 15:48:24 -0700 [thread overview]
Message-ID: <20030612154824.5af9bfde.akpm@digeo.com> (raw)
In-Reply-To: <20030612224153.GY4639@duckman.distro.conectiva>
Eduardo Pereira Habkost <ehabkost@conectiva.com.br> wrote:
>
> Today I changed the partition table of the disk, using fdisk, and
> noticed, after reboot, that the new partition table was not written to
> the disk. Before rebooting, 'fdisk -l /dev/hda' shows the new partition
> table, as if it were written.
>
> I've made a few more tests, and even if I sync() a dozen of times
> before rebooting (using /bin/sync and sysrq), the data is not written.
> Even when I've waited about 20 minutes after changing the partition table,
> before rebooting, the problem persisted.
>
> Although, after changing fdisk to call fsync() before closing the device,
> everything worked, the changes were written, and the new partition table
> were on the disk, after rebooting.
argh, is this a plot?
It is some interaction between sync() and the presence of dirty data against
the ramdisk driver. You can work around it by not using the ramdisk driver,
by using `blockdev --flushbufs /dev/hdXX' or by using fsync, as you have
done.
prev parent reply other threads:[~2003-06-12 22:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-12 22:41 Eduardo Pereira Habkost
2003-06-12 22:48 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030612154824.5af9bfde.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=ehabkost@conectiva.com.br \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®