All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Zirong Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH] xfs/194: fix the exception when run on 4k sector drives
Date: Wed, 19 Aug 2015 12:48:42 +1000	[thread overview]
Message-ID: <20150819024842.GI3902@dastard> (raw)
In-Reply-To: <1350742947.10406170.1439951099309.JavaMail.zimbra@redhat.com>

On Tue, Aug 18, 2015 at 10:24:59PM -0400, Zirong Lang wrote:
> 
> 
> ----- 原始邮件 -----
> > 发件人: "Dave Chinner" <david@fromorbit.com>
> > 收件人: "Zorro Lang" <zlang@redhat.com>
> > 抄送: fstests@vger.kernel.org, sandeen@redhat.com
> > 发送时间: 星期三, 2015年 8 月 19日 上午 6:28:32
> > 主题: Re: [PATCH] xfs/194: fix the exception when run on 4k sector drives
> > 
> > On Wed, Aug 19, 2015 at 01:21:51AM +0800, Zorro Lang wrote:
> > > The below command in "Test 4":
> > > 
> > >     xfs_io -c "pwrite -S 0x33 -b 512 `expr $blksize \* 2` 512"
> > > 
> > > will run failed on 4k sector drives. So I use min_alignment size
> > > to replace the hard-code 512.
> > > 
> > > Also I make sure the blksize won't less than min_alignment size,
> > > after blksize=`expr $pgsize / 8`.
> > > 
> > > If blksize really less than min_alignment size, I set blksize =
> > > min_alignment size, and for sure the consistency of test result,
> > > I repair pgsize(already not real page size) number according to
> > > the new blksize.
> > > 
> > > Because IRIX can't use _min_dio_alignment(), so remove it from
> > > supported os list.
> > 
> > Not true - that's what the 'feature -s' branch in
> > _min_dio_alignment() is supposed to be for. Just add another check
> > for "$HOSTOS" == "Linux"....
> 
> Do you mean change _min_dio_alignment() to:
> _min_dio_alignment()
> {
>     dev=$1
> 
>     if [ -b "$dev" -a $HOSTOS" == "Linux" ]; then
>         blockdev --getss $dev
>     else
>         $here/src/feature -s
>     fi
> }

Yes.

> I really don't understand why page size will be the minimum dio alignment?
> Do you mean in other OS(except linux), the sector size = page size?

No. It means that on other platforms the page size will be used as
alignment restrictions. If those platforms need anything different,
then they can add a similar 'elif [ "$HOSTOS" == "foo" ];' branch in
there to call the appropriate function. You don't need to worry
about that.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2015-08-19  2:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18 17:21 [PATCH] xfs/194: fix the exception when run on 4k sector drives Zorro Lang
2015-08-18 22:28 ` Dave Chinner
2015-08-18 22:33   ` Eric Sandeen
2015-08-18 22:43     ` Dave Chinner
2015-08-18 23:03       ` Eric Sandeen
2015-08-19  2:24         ` Zirong Lang
2015-08-19  2:42         ` Dave Chinner
2015-08-19  3:35           ` Eric Sandeen
2015-08-19  3:46           ` Zirong Lang
2015-08-19  2:24   ` Zirong Lang
2015-08-19  2:48     ` Dave Chinner [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=20150819024842.GI3902@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=zlang@redhat.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 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.