Re: [PATCH 01/11] iomap: pass more arguments using struct iomap_writepage_ctx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 17, 2025 at 10:54:26AM -0700, Joanne Koong wrote:
> > -       struct iomap_writepage_ctx wpc = { };
> > +       struct iomap_writepage_ctx wpc = {
> > +               .inode          = mapping->host,
> > +               .wbc            = wbc,
> > +               .ops            = &blkdev_writeback_ops
> 
> Would it be worth defining the writeback ops inside the wpc struct as
> well instead of having that be in a separate "static const struct
> iomap_writeback_ops" definition outside the function? imo it makes it
> easier to follow to just have everything listed in one place

I'd rather not do that.  Having the structure that has function pointers
marked const and away from the data it operates on is nice to reduce the
attack surface. 





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux