Re: [PATCH 12/18] xfs: introduce the xfs_iext_cursor abstraction

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

 



On Thu, Nov 02, 2017 at 01:14:37PM -0400, Brian Foster wrote:
> Can we just open code ext->idx here rather than maintain two counters,
> or will that go away later?

This area will change quite a bit.  Please take a look at the end result.

> > -	ASSERT(bma->idx >= 0);
> > -	ASSERT(bma->idx <= xfs_iext_count(ifp));
> 
> I think it might be useful to encapsulate this check (which is also part
> of xfs_iext_get_extent()) into a cursor validation helper so we can
> preserve these asserts (here and in the other bmap functions). E.g.,
> something like:
> 
> 	ASSERT(xfs_iext_valid(&bma->ext));

I'll take a look at that.

> 1.) Why do we place these new cursors directly on the stack as opposed
> to dynamic allocation?

Why would be do a dynamic allocation?

> 2.) Why not encode the fork/inode in the cursor rather than passing them
> around throughout the helper functions?

We could do that, but I'm not sure it's really worth the effort.
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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