On Mon, Feb 25, 2019 at 01:26:57PM +0100, David Sterba wrote:
> On Mon, Feb 25, 2019 at 08:17:52PM +0800, Qu Wenruo wrote:
> >
> >
> > On 2019/2/25 下午8:15, David Sterba wrote:
> > > On Mon, Feb 25, 2019 at 01:50:43PM +0800, Qu Wenruo wrote:
> > >> All users of extent_io_tree::private_data are expecting struct inode*.
> > >> So just use struct inode* to replace extent_io_tree::private_data, and
> > >> this should provide better type check.
> > >>
> > >> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> > >> struct extent_io_tree {
> > >> struct rb_root state;
> > >> - void *private_data;
> > >> + struct inode *inode;
> > >> u64 dirty_bytes;
> > >> int track_uptodate;
> > >> spinlock_t lock;
> > >
> > > So this is effectively reverting c6100a4b4e3d1650deafd ("Btrfs: replace
> > > tree->mapping with tree->private_data"),
> >
> > That commit message doesn't explain why this is needed for btree_inode
> > removal.
> >
> > Any idea what the extra type would be used in that case?
>
> I don't know, Josef in CC to answer that.
Yeah there's a mapping tree thing I make to keep track of the metadata, it holds
the radix tree for the eb's and a bunch of other stuff. This needs to stay a
void *. Thanks,
Josef