David Howells
2023-Jan-30 10:31 UTC
[PATCH 20/23] rxrpc: use bvec_set_page to initialize a bvec
Christoph Hellwig <hch at lst.de> wrote:> + bvec_set_page(&bv, ZERO_PAGE(0), len, 0);Maybe bvec_set_zero_page()? David
Christoph Hellwig
2023-Jan-30 10:33 UTC
[PATCH 20/23] rxrpc: use bvec_set_page to initialize a bvec
On Mon, Jan 30, 2023 at 10:31:23AM +0000, David Howells wrote:> Christoph Hellwig <hch at lst.de> wrote: > > > + bvec_set_page(&bv, ZERO_PAGE(0), len, 0); > > Maybe bvec_set_zero_page()?Why?
David Howells
2023-Jan-30 11:24 UTC
[PATCH 20/23] rxrpc: use bvec_set_page to initialize a bvec
Christoph Hellwig <hch at lst.de> wrote:> On Mon, Jan 30, 2023 at 10:31:23AM +0000, David Howells wrote: > > Christoph Hellwig <hch at lst.de> wrote: > > > > > + bvec_set_page(&bv, ZERO_PAGE(0), len, 0); > > > > Maybe bvec_set_zero_page()? > > Why?Seems to be something people want to do quite a lot and don't know about. I've seen places where someone allocates a buffer and clears it just to use as a source of zeros. There's at least one place in cifs, for example. I know about it from wrangling arch code, but most people working on Linux haven't done that. David