public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: use alloc_pages_bulk_array() for buffers
Date: Fri, 21 May 2021 09:15:30 +0100	[thread overview]
Message-ID: <YKdsIEEoOpHjgY46@infradead.org> (raw)
In-Reply-To: <20210520234237.GC9675@magnolia>

On Thu, May 20, 2021 at 04:42:37PM -0700, Darrick J. Wong wrote:
> > @@ -292,8 +292,8 @@ _xfs_buf_get_pages(
> >  			if (bp->b_pages == NULL)
> >  				return -ENOMEM;
> >  		}
> > -		memset(bp->b_pages, 0, sizeof(struct page *) * page_count);
> >  	}
> > +	memset(bp->b_pages, 0, sizeof(struct page *) * bp->b_page_count);
> 
> Could this kmem_alloc be converted to kmem_zalloc?

Yes.

> And isn't the xfs_buf allocated with zalloc, which means we don't need
> to zero b_page_array itself?

Yes.

> Confused about why this is needed.

My series cleans up all this mess and the rebases the allocation change
from Dave on top.  Maybe that is a better start :)


      reply	other threads:[~2021-05-21  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  1:07 [PATCH] xfs: use alloc_pages_bulk_array() for buffers Dave Chinner
2021-05-20 23:42 ` Darrick J. Wong
2021-05-21  8:15   ` Christoph Hellwig [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=YKdsIEEoOpHjgY46@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@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