Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Lukas Herbolt <lukas@herbolt.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE.
Date: Tue, 21 Oct 2025 08:56:57 -0700	[thread overview]
Message-ID: <20251021155657.GA4015566@frogsfrogsfrogs> (raw)
In-Reply-To: <20251021141744.1375627-4-lukas@herbolt.com>

On Tue, Oct 21, 2025 at 04:17:45PM +0200, Lukas Herbolt wrote:
> The krealloc prints out warning if allocation is bigger than 2x PAGE_SIZE,
> lets use kvrealloc for the memory allocation.
> 
> Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
> ---
>  fs/xfs/xfs_mount.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> index dc32c5e34d817..e728e61c9325a 100644
> --- a/fs/xfs/xfs_mount.c
> +++ b/fs/xfs/xfs_mount.c
> @@ -89,7 +89,7 @@ xfs_uuid_mount(
>  	}
>  
>  	if (hole < 0) {
> -		xfs_uuid_table = krealloc(xfs_uuid_table,
> +		xfs_uuid_table = kvrealloc(xfs_uuid_table,

Doesn't the table need to be kvfree'd if you make this change?

--D

>  			(xfs_uuid_table_size + 1) * sizeof(*xfs_uuid_table),
>  			GFP_KERNEL | __GFP_NOFAIL);
>  		hole = xfs_uuid_table_size++;
> -- 
> 2.51.0
> 

  reply	other threads:[~2025-10-21 15:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 14:17 [PATCH 0/2] Add FL_WRITE_ZEROES to XFS, fix krealloc on xfs_uuid_table Lukas Herbolt
2025-10-21 14:17 ` [PATCH] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base Lukas Herbolt
2025-10-21 15:55   ` Darrick J. Wong
2025-10-22  5:00   ` Christoph Hellwig
2025-10-22  7:13     ` Zhang Yi
2025-10-22  7:15       ` Christoph Hellwig
2025-10-22  7:27         ` Zhang Yi
2025-10-29 17:53           ` [PATCH v3] " Lukas Herbolt
2025-10-29 18:22             ` Darrick J. Wong
2025-10-30  7:27               ` Christoph Hellwig
2025-11-12 21:02                 ` [PATCH v4] " Lukas Herbolt
2025-11-13  6:59                   ` Christoph Hellwig
2025-11-14  8:55                     ` [PATCH v5] " Lukas Herbolt
2025-11-14  8:57                       ` Christoph Hellwig
2025-11-14 16:44                       ` Darrick J. Wong
2025-11-14 16:45                         ` Christoph Hellwig
2025-11-18  9:05                           ` lukas
2025-12-15 11:48                           ` [PATCH v6] " Lukas Herbolt
2025-12-15 14:28                             ` Christoph Hellwig
2025-10-30  7:29             ` [PATCH v3] " Christoph Hellwig
2025-10-21 14:17 ` [PATCH 2/2] xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE Lukas Herbolt
2025-10-21 15:56   ` Darrick J. Wong [this message]
2025-10-21 22:02   ` Dave Chinner
2025-10-26 17:49     ` lukas
2025-10-22  4:53   ` Christoph Hellwig

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=20251021155657.GA4015566@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lukas@herbolt.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