Re: [PATCH 16/17] zonefs: use bdev_rw_virt in zonefs_read_super

2025-04-29 Thread hch
On Tue, Apr 29, 2025 at 11:44:37AM +, Johannes Thumshirn wrote: > On 22.04.25 16:31, Christoph Hellwig wrote: > > + super = kmalloc(PAGE_SIZE, GFP_KERNEL); > > + if (!super) > > [...] > > > + ret = bdev_rw_virt(sb->s_bdev, 0, super, PAGE_SIZE, REQ_OP_READ); > > Can we change these two

Re: [PATCH 16/17] zonefs: use bdev_rw_virt in zonefs_read_super

2025-04-29 Thread Johannes Thumshirn
On 22.04.25 16:31, Christoph Hellwig wrote: > + super = kmalloc(PAGE_SIZE, GFP_KERNEL); > + if (!super) [...] > + ret = bdev_rw_virt(sb->s_bdev, 0, super, PAGE_SIZE, REQ_OP_READ); Can we change these two PAGE_SIZE into ZONEFS_SUPER_SIZE which is semantically more correct? Other tha

Re: [PATCH 16/17] zonefs: use bdev_rw_virt in zonefs_read_super

2025-04-23 Thread Damien Le Moal
On 4/22/25 23:26, Christoph Hellwig wrote: > Switch zonefs_read_super to allocate the superblock buffer using kmalloc > which falls back to the page allocator for PAGE_SIZE allocation but > gives us a kernel virtual address and then use bdev_rw_virt to perform > the synchronous read into it. > > S

[PATCH 16/17] zonefs: use bdev_rw_virt in zonefs_read_super

2025-04-22 Thread Christoph Hellwig
Switch zonefs_read_super to allocate the superblock buffer using kmalloc which falls back to the page allocator for PAGE_SIZE allocation but gives us a kernel virtual address and then use bdev_rw_virt to perform the synchronous read into it. Signed-off-by: Christoph Hellwig --- fs/zonefs/super.c