9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] sd(3) and concurrent readers/writers?
Date: Sat, 12 Sep 2009 14:23:20 -0400	[thread overview]
Message-ID: <84d01c3bb61f8ed6970ed1c22364038a@quanstro.net> (raw)
In-Reply-To: <140e7ec30909121108l411080bam3a34bac1168f911f@mail.gmail.com>

On Sat Sep 12 14:10:20 EDT 2009, sqweek@gmail.com wrote:
>  I have a fairly simple task - I'm trying to mirror a disk. So I run
> the obvious:
>
> dd -if /dev/sdE0/data -of /dev/sdF0/data -bs 1048576
>
>  That's sitting there on it's merry way, and I get curious as to how
> much progress it has made. I think about acid briefly but I don't have
> much experience with it, and figure I can get the answer without
> touching the procs:

you can cat /proc/$pid/fd and look at the offsets instead.

>  With this crude tool I can easily find a block that differs between
> the disks and binary search to gauge how far through the process is.
>  However, something seems a little fragile. If I keep running chk
> eventually the dd falls over with an error of some sort. It just gave
> me "write: " (that's an empty error string by the looks of it) 3 times
> in a row, and the fourth time around dd didn't report an error itself
> but I get this in kmesg:
>
> atagenioretry: disabling dma
> sdE0: retry: dma 00000000 rwm 0000

the lba of the error should be printed here.  have
you gotten a chance to check the contrib sd stuff?
i have added debugging to my version on sources, if you are
interested.

i know there are some fixes that would only be noticable
for a few lbas.

it's also possible that there are some known jmicron bugs
that we need to be working around.  i'll take a look.

>  System details: SIL3112 sata controller... is there an easy way to
> tell if I'm in AHCI mode or not? can't see anything obvious in the
> bios. During boot I get these relevant looking lines:
>
> dev A0 port 170 config 85C0 capabilities 0F00 mwdma 0007 udma 0407
> dev A0 port 9400 config 0C5A capabilities 2F00 mwdma 0007 udma 207F
>   LLBA sectors 586072368
> dev A0 port 9C00 config 0C5A capabilities 2F00 mwdma 0007 udma 207F
>   LLBA sectors 586072368

you wouldn't get these messages in ahci mode.  also
/dev/sdctl will list each driver name and the drive letter,
one drive letter per line.

- erik



  reply	other threads:[~2009-09-12 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-12 18:08 sqweek
2009-09-12 18:23 ` erik quanstrom [this message]
2009-09-13 14:44 ` erik quanstrom
2009-09-14 18:43   ` sqweek

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=84d01c3bb61f8ed6970ed1c22364038a@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).