From: Fan Ni <nifan.cxl@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Navneet Singh <navneet.singh@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
Subject: Re: [ndctl PATCH v2 2/6] ndctl/cxl/region: Report max size for region creation
Date: Tue, 5 Nov 2024 13:46:54 -0800 [thread overview]
Message-ID: <ZyqSToxjsMlXC2NR@fan> (raw)
In-Reply-To: <20241104-dcd-region2-v2-2-be057b479eeb@intel.com>
On Mon, Nov 04, 2024 at 08:10:46PM -0600, Ira Weiny wrote:
> When creating a region if the size exceeds the max an error is printed.
> However, the max available space is not reported which makes it harder
> to determine what is wrong.
>
> Add the max size available to the output error.
>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
> ---
> cxl/region.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cxl/region.c b/cxl/region.c
> index 96aa5931d2281c7577679b7f6165218964fa0425..207cf2d003148992255c715f286bc0f38de2ca84 100644
> --- a/cxl/region.c
> +++ b/cxl/region.c
> @@ -677,8 +677,8 @@ static int create_region(struct cxl_ctx *ctx, int *count,
> }
> if (!default_size && size > max_extent) {
> log_err(&rl,
> - "%s: region size %#lx exceeds max available space\n",
> - cxl_decoder_get_devname(p->root_decoder), size);
> + "%s: region size %#lx exceeds max available space (%#lx)\n",
> + cxl_decoder_get_devname(p->root_decoder), size, max_extent);
> return -ENOSPC;
> }
>
>
> --
> 2.47.0
>
--
Fan Ni
next prev parent reply other threads:[~2024-11-05 21:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 2:10 [ndctl PATCH v2 0/6] ndctl: DCD additions Ira Weiny
2024-11-05 2:10 ` [ndctl PATCH v2 1/6] ndctl/cxl-events: Don't fail test until event counts are reported Ira Weiny
2024-11-05 15:44 ` Dave Jiang
2025-02-09 1:25 ` Alison Schofield
2024-11-05 2:10 ` [ndctl PATCH v2 2/6] ndctl/cxl/region: Report max size for region creation Ira Weiny
2024-11-05 15:45 ` Dave Jiang
2024-11-05 21:46 ` Fan Ni [this message]
2025-02-09 1:26 ` Alison Schofield
2024-11-05 2:10 ` [ndctl PATCH v2 3/6] ndctl: Separate region mode from decoder mode Ira Weiny
2024-11-05 15:56 ` Dave Jiang
2024-11-05 21:49 ` Fan Ni
2024-11-05 2:10 ` [ndctl PATCH v2 4/6] cxl/region: Add creation of Dynamic capacity regions ira.weiny
2024-11-05 16:38 ` Dave Jiang
2024-11-05 20:38 ` Ira Weiny
2024-11-06 3:16 ` Alison Schofield
2024-11-07 18:00 ` Alison Schofield
2024-11-07 21:28 ` Ira Weiny
2024-11-07 18:27 ` Alison Schofield
2024-11-07 18:52 ` Alison Schofield
2024-11-08 20:17 ` Ira Weiny
2024-11-05 2:10 ` [ndctl PATCH v2 5/6] ndctl/cxl: Add extent output to region query Ira Weiny
2024-11-05 17:04 ` Dave Jiang
2024-11-05 20:53 ` Ira Weiny
2024-11-07 18:13 ` Alison Schofield
2024-11-08 20:16 ` Ira Weiny
2024-11-05 2:10 ` [ndctl PATCH v2 6/6] ndctl/cxl/test: Add Dynamic Capacity tests Ira Weiny
2024-11-05 17:11 ` Dave Jiang
2024-11-05 19:53 ` Ira Weiny
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=ZyqSToxjsMlXC2NR@fan \
--to=nifan.cxl@gmail.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=navneet.singh@intel.com \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox