From: Steve Dickson <SteveD@redhat.com>
To: Luk Claes <luk@debian.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] blkmapd: Use getconf(_SC_PAGE_SIZE)
Date: Mon, 03 Oct 2011 08:54:44 -0400 [thread overview]
Message-ID: <4E89B094.4030308@RedHat.com> (raw)
In-Reply-To: <1317576450-26056-1-git-send-email-luk@debian.org>
On 10/02/2011 01:27 PM, Luk Claes wrote:
> PAGE_SIZE is not exported by all architectures as it is not fixed: it can depend on the model of the machine. So it's better to query the system configuration for the actual page size on the machine.
>
> Signed-off-by: Luk Claes <luk@debian.org>
Committed...
steved.
> ---
> utils/blkmapd/device-process.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/utils/blkmapd/device-process.c b/utils/blkmapd/device-process.c
> index 27ff374..652a7a8 100644
> --- a/utils/blkmapd/device-process.c
> +++ b/utils/blkmapd/device-process.c
> @@ -296,7 +296,7 @@ decode_blk_volume(uint32_t **pp, uint32_t *end, struct bl_volume *vols, int voln
> off_t stripe_unit = vol->param.bv_stripe_unit;
> /* Check limitations imposed by device-mapper */
> if ((stripe_unit & (stripe_unit - 1)) != 0
> - || stripe_unit < (off_t) (PAGE_SIZE >> 9))
> + || stripe_unit < (off_t) (sysconf(_SC_PAGE_SIZE) >> 9))
> return -EIO;
> BLK_READBUF(p, end, 4);
> READ32(vol->bv_vol_n);
prev parent reply other threads:[~2011-10-03 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-02 17:27 [PATCH] blkmapd: Use getconf(_SC_PAGE_SIZE) Luk Claes
2011-10-03 12:54 ` Steve Dickson [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=4E89B094.4030308@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=luk@debian.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;
as well as URLs for NNTP newsgroup(s).