public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@namesys.com>
To: Jakob Oestergaard <jakob@unthought.net>,
	linux-kernel@vger.kernel.org, Hans Reiser <reiser@namesys.com>
Subject: Re: ReiserFS buglet
Date: Tue, 24 Sep 2002 14:54:21 +0400	[thread overview]
Message-ID: <20020924145421.A23754@namesys.com> (raw)
In-Reply-To: <20020924103923.GI2442@unthought.net>

Hello!

On Tue, Sep 24, 2002 at 12:39:24PM +0200, Jakob Oestergaard wrote:
> > amount of data. If it writes these sectors from the start of the data flow,
> > what will it do on data transefer timeout?
> > So I still think that data is written on disk in 512 bytes atomic blocks
> > until I see IDE device that does otherwise (and then I will probably
> > dig some IDE datasheet and find out they are violating some spec ;) )
> That would be really interesting.
> I mean, my point still stands even though my proof was wrong, unless
> someone can come up with a "proof" (a spec would be close enough) that
> writes must be 512 bytes.

Ok, here's what I have quckly found, it seems to proove that my assumptions are
right:
http://www.repairfaq.org/filipg/LINK/F_IDE-tech.html
Section: "9. Command Descriptions":
Here the quote:
   The recommended procedure for executing a command on the selected
   drive is:

    1. Wait for drive to clear BUSY.
    2. Load required parameters in the Command Block Registers.
    3. Activate the Interrupt Enable (nIEN) bit.
    4. Wait for drive to set DRDY.
    5. Write the command code to the Command Register.
   Execution of the command begins as soon as the drive loads the Command
   Block Register.

Commands:
   E8h: Write Buffer
          This command enables the host to overwrite the contents of the
          drive's sector buffer with any data pattern. On receipt of this
          comand the drive sets BUSY within 400 nsec, sets up the sector
          buffer for a write operation, sets DRQ and clears BUSY. The
          host then writes up to 512 bytes of data to the buffer. The
          Read Buffer and Write Buffer are synchronized so that back to
          back Read Buffer and Write Buffer commands access the same 512
          bytes within the buffer.
   30h: Write Sectors with Retry
   31h: Write Sectors without Retry
          This command writes from 1 to 256 sectors beginning at the
          specified sector and as stated earlier, a sector count of 0 in
          the Command Block Register will request 256 sectors. When the
          drive accepts this command it sets DRQ and wait for the host to
          fill the sector buffer with the data to be written to disk. No
          interrupt is generated to start the first buffer fill operation
          and once the buffer is full the drive clears the DRQ, sets BUSY
          and begins execution of the command.

          For single sector Write operations, the drive sets DRQ upon
          receipt of the command and waits for the host to fill the
          sector buffer. Once a sector has been transferred, the drive
          sets BUSY and clears DRQ. If the drive is not on the requested
          cylinder and head an inplied seek and/or head switch is
          performed. Once the desired track is reached the drive searches
          for the appropriate ID field.

....
End of quote

So no write should be even started until entire sector buffer is filled.

Bye,
    Oleg

  reply	other threads:[~2002-09-24 10:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  7:24 ReiserFS buglet Jakob Oestergaard
2002-09-24  9:21 ` Oleg Drokin
2002-09-24  9:27   ` Jakob Oestergaard
2002-09-24  9:42     ` Hans Reiser
2002-09-24  9:47       ` Jakob Oestergaard
2002-09-24  9:48     ` Oleg Drokin
2002-09-24 10:03       ` Jakob Oestergaard
2002-09-24 10:25         ` Oleg Drokin
2002-09-24 10:39           ` Jakob Oestergaard
2002-09-24 10:54             ` Oleg Drokin [this message]
2002-09-24 11:30           ` Hans Reiser
2002-09-24 11:35             ` Oleg Drokin

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=20020924145421.A23754@namesys.com \
    --to=green@namesys.com \
    --cc=jakob@unthought.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiser@namesys.com \
    /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