Message ID | 20241104-dcd-region2-v2-2-be057b479eeb@intel.com |
---|---|
State | New |
Headers | show |
Series | ndctl: DCD additions | expand |
On 11/4/24 7:10 PM, 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: Dave Jiang <dave.jiang@intel.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; > } > >
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 >
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; }
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> --- cxl/region.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)