From: Baoquan He <baoquan.he@linux.dev>
To: Jianyue Wu <wujianyue000@gmail.com>
Cc: Barry Song <baohua@kernel.org>, Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jens Axboe <axboe@kernel.dk>, Chris Li <chrisl@kernel.org>,
Kairui Song <kasong@tencent.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
linux-mm@kvack.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] zram: fix partial I/O config check
Date: Mon, 1 Jun 2026 08:44:24 +0800 [thread overview]
Message-ID: <ahzV6P4n2SICvh4R@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CAJxJ_jgk8o12OYAi68JznpwKYTUJOUizp2PAZvNz2VdVGJWstw@mail.gmail.com>
On 06/01/26 at 08:25am, Jianyue Wu wrote:
> On Mon, Jun 1, 2026 at 5:38 AM Barry Song <baohua@kernel.org> wrote:
> > > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> > > index 6e1330ce4bc1..72f89fd5572e 100644
> > > --- a/drivers/block/zram/zram_drv.c
> > > +++ b/drivers/block/zram/zram_drv.c
> > > @@ -1510,7 +1510,7 @@ static int read_from_bdev(struct zram *zram, struct page *page, u32 index,
> > > {
> > > atomic64_inc(&zram->stats.bd_reads);
> > > if (!parent) {
> > > - if (WARN_ON_ONCE(!IS_ENABLED(ZRAM_PARTIAL_IO)))
> > > + if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_ZRAM_PARTIAL_IO)))
> >
> > However, I don't see ZRAM_PARTIAL_IO defined as a Kconfig option.
>
> You are right. ZRAM_PARTIAL_IO is a local source-level define, not a
> Kconfig symbol.
How about removing ZRAM_PARTIAL_IO and use PAGE_SIZE to check?
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 07111455eecf..ca0c29482283 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -221,7 +221,6 @@ static inline bool is_partial_io(struct bio_vec *bvec)
{
return bvec->bv_len != PAGE_SIZE;
}
-#define ZRAM_PARTIAL_IO 1
#else
static inline bool is_partial_io(struct bio_vec *bvec)
{
@@ -1507,7 +1506,7 @@ static int read_from_bdev(struct zram *zram, struct page *page, u32 index,
{
atomic64_inc(&zram->stats.bd_reads);
if (!parent) {
- if (WARN_ON_ONCE(!IS_ENABLED(ZRAM_PARTIAL_IO)))
+ if (WARN_ON_ONCE(PAGE_SIZE == 4096))
return -EIO;
return read_from_bdev_sync(zram, page, index, blk_idx);
}
next prev parent reply other threads:[~2026-06-01 0:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 12:35 [PATCH] zram: fix partial I/O config check Jianyue Wu
2026-05-31 21:38 ` Barry Song
2026-06-01 0:25 ` Jianyue Wu
2026-06-01 0:44 ` Baoquan He [this message]
2026-06-01 1:38 ` Jianyue Wu
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=ahzV6P4n2SICvh4R@MiWiFi-R3L-srv \
--to=baoquan.he@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baohua@kernel.org \
--cc=chrisl@kernel.org \
--cc=hch@lst.de \
--cc=kasong@tencent.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=wujianyue000@gmail.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