All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas S. Iversen" <zensonic@zensonic.dk>
To: linux-kernel@vger.kernel.org
Subject: How to do IO across hardsector boundries
Date: Sun, 01 Aug 2004 02:22:15 +0200	[thread overview]
Message-ID: <410C37B7.3010504@zensonic.dk> (raw)

Hi There

As part of an assignment I am trying to port a piece of software from 
FreeBSD to linux. Essentially this software (crypto) makes a virtual 
blockdevice with "virtual" sectors on top. Under FreeBSD these virtual 
sectors are just read/written using a simple command:

buf=g_read(dev, offset, len)
error=g_write(dev,offset,buf,len)

In linux however I have only seen the BIO layer which operates on IO on 
hardsector boundaries.

So my question really is, how do I go about updating for instance the 
512 bytes located for at byte 64 to 64+511 on the actual media without 
getting in trouble regarding the data from offset 0-63 and 64+512->1023?

Regards Thomas

             reply	other threads:[~2004-08-01  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-01  0:22 Thomas S. Iversen [this message]
2004-07-31 23:32 ` How to do IO across hardsector boundries Alan Cox
2004-08-01  8:53 ` Arjan van de Ven
2004-08-01 13:10 ` Richard B. Johnson

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=410C37B7.3010504@zensonic.dk \
    --to=zensonic@zensonic.dk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.