public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] src/t_stripealign.c: Use block size reported by fstatfs()
Date: Fri, 23 Nov 2018 14:20:03 +0800	[thread overview]
Message-ID: <20181123062003.GK3889@desktop> (raw)
In-Reply-To: <20181121162646.18117-1-chandan@linux.vnet.ibm.com>

On Wed, Nov 21, 2018 at 09:56:46PM +0530, Chandan Rajendra wrote:
> On ppc64le, block size reported by fstat(2) is 64k (the page size)
> i.e. the "preferred I/O size". However src/t_stripealign.c requires the
> actual block size of the filesystem. Hence this commit now makes use of
> the block size reported by fstatfs(2) syscall.
> 
> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>

Looks like that only XFS returns the preferred iosize
(xfs_preferred_iosize()) on stat(2), other filesystems will return block
size (I checked the code of ext4, f2fs, ocfs2).

On the other hand, statfs(2) returns the actual block size on all
filesystems I've checked, including XFS. So this patch looks fine to me.

Thanks,
Eryu

      reply	other threads:[~2018-11-23 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 16:26 [PATCH] src/t_stripealign.c: Use block size reported by fstatfs() Chandan Rajendra
2018-11-23  6:20 ` Eryu Guan [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=20181123062003.GK3889@desktop \
    --to=guaneryu@gmail.com \
    --cc=chandan@linux.vnet.ibm.com \
    --cc=fstests@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