[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4b24afa0-7e3c-411e-ae29-9ba58ed86386@acm.org>
Date: Thu, 31 Jul 2025 08:29:42 -0700
From: Bart Van Assche <bvanassche@....org>
To: Richard Chang <richardycc@...gle.com>, Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>, Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: bgeffon@...gle.com, liumartin@...gle.com, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2 3/3] zram: enable asynchronous writeback
On 7/30/25 11:49 PM, Richard Chang wrote:
> + bio = bio_alloc(zram->bdev, 1, REQ_OP_WRITE, GFP_NOIO | __GFP_NOWARN);
> + if (!bio) {
> + err = -ENOMEM;
> + goto out_free_page;
> + }
> +
> + req = kmalloc(sizeof(struct zram_wb_request), GFP_NOIO | __GFP_NOWARN);
> + if (!req) {
> + err = -ENOMEM;
> + goto out_free_bio;
> + }
Why are 'req' and 'bio' allocated separately instead of creating a
bio_set with front padding? See also bioset_init().
Thanks,
Bart.
Powered by blists - more mailing lists