Re: [PATCH v7 12/12] iomap: Put struct iomap_ops into struct iomap

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

 



2018-06-04 14:52 GMT+02:00 Christoph Hellwig <hch@xxxxxx>:
> On Mon, Jun 04, 2018 at 02:37:29PM +0200, Andreas Gruenbacher wrote:
>> We need access to the struct iomap_ops in iomap_write_end to call the
>> (optional) page_write_end hook, so instead of passing the operators to
>> iomap_write_end differently depending on the code path, add an ops field
>> to struct iomap.
>
> I don't really like this.  We already pass the iomap_ops to the
> function we call from iomap.c, and in fact ->iomap_begin is called
> through the ops.

There's no duplicate ops passing going on if that's what you mean.

> But what we could do is to move the page_write_end callback out of
> iomap_ops and just attached it to the iomap, especially given that
> it isn't really as generic as the other ops.

Given that struct iomap is allocated inside iomap_apply(), if
page_write_end is moved to struct iomap, how would the filesystem set
it?

> Can't say I like the implications of this callback in general, but
> the use case is real, so..

Yes, it's not very pretty.

Thanks,
Andreas



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux