On Wed, Jan 8, 2025 at 1:07 PM Damien Le Moal <dlemoal@xxxxxxxxxx> wrote: > > On 1/8/25 11:29 AM, Ming Lei wrote: > > On Mon, Jan 06, 2025 at 04:21:18PM +0100, Christoph Hellwig wrote: > >> On Mon, Jan 06, 2025 at 07:54:05AM -0700, Jens Axboe wrote: > >>> On 1/6/25 7:24 AM, Damien Le Moal wrote: > >>>> The first patch implements the new "zloop" zoned block device driver > >>>> which allows creating zoned block devices using one regular file per > >>>> zone as backing storage. > >>> > >>> Couldn't we do this with ublk and keep most of this stuff in userspace > >>> rather than need a whole new loop driver? > >> > >> I'm pretty sure we could do that. But dealing with ublk is complete > >> pain especially when setting up and tearing it down all the time for > >> test, and would require a lot more code, so why? As-is I can directly > > > > You can link with libublk or add it to rublk, which supports ramdisk zone > > already, then install rublk from crates.io directly for setup the > > test. > > Thanks, but memory backing is not what we want. We need to emulate large drives > for FS tests (to catch problems such as overflows), and for that, a file based > storage backing is better. It is backed by virtual memory, which can be big enough because of swap, and it is also easy to extend to file backed support since zloop doesn't store zone meta data, which is similar to ram backed zoned actually. Not like loop, zloop can only serve for test purposes, because each zone's meta data is always reset when adding a new device. Thanks, Ming