Re: [RFC PATCHv5 0/6] zram: introduce writeback bio batching

From: Sergey Senozhatsky

Date: Sat Nov 22 2025 - 19:08:32 EST


On (25/11/22 22:09), Gao Xiang wrote:
> > I thought you were talking about the backing device being
> > ext4/btrfs. Sorry, I don't have enough context/knowledge
> > to understand what you're getting at. zram has been doing
> > writeback for ages, I really don't know what you mean by
> > "to act like this".
>
> I mean, if zram is formatted as ext4, and then mount it;
> and then there is a backing file which is also in another
> ext4, you'd need a workqueue to do writeback I/Os (or needs
> a loop device to transit), was that the original question
> raised by Yuwen?

We take pages of data from zram0 and write them straight to
the backing device. Those writes don't go through vfs/fs so
fs on the backing device will simply be corrupted, as far as
I can tell. This is not intendant use case for zram writeback.